Download MetaTrader 5
To add comments, please log in or register
MQL5 language supports OpenCL. Try it!
Syarif Nur Arief
1168
Syarif Nur Arief 2015.02.03 11:46 

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
8007
Keith Watford 2015.02.03 12:39  
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
1168
Syarif Nur Arief 2015.02.03 13:39  
mean, how to convert orderprofit() to pips
Carl Schreiber
5962
Carl Schreiber 2015.02.03 13:52  
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