Download MetaTrader 5

How to convert OrderProfit() to pips or points ?

To add comments, please log in or register
Syarif Nur Arief
1560
Syarif Nur Arief  

Let's say i have opened order 10 buy and 12 sell, and current order profit from OrderProfit() function is let's say 1 USD,

and i have profit target 5 USD, with this situation, can i calculate 5 USD - 1 USD = 4 USD 

that mean 4 USD from current market price i can make order modify to all order with TP in pips equal to next 4 USD (5 USD profit target)

how to code that ? 

Keith Watford
Moderator
10646
Keith Watford  
akhmadfx3:

Let's say i have opened order 10 buy and 12 sell,

I have no idea what that means

akhmadfx3:

and i have profit target 5 USD, with this situation, can i calculate 5 USD - 1 USD = 4 USD 

 Yes, 5 USD-1 USD=4 USD

Syarif Nur Arief
1560
Syarif Nur Arief  
mean, how to convert orderprofit() to pips
Carl Schreiber
7294
Carl Schreiber  
The difference of OrderClosePrice()  - OrderOpenPrice() (for a buy-order!) gives you the OrderProfit() in Ponits(!) but it is without Commission() and Swap().
To add comments, please log in or register