Download MetaTrader 5

OrderProfit() into Pips conversion

To add comments, please log in or register
Register as a seller and start making profit!
Tom Maryland
77
Tom Maryland 2013.11.29 07:54 

Hi,what is the most efficient way to convert OrderProfit() which initially gives profits/losses in currency, into pips,just so i could see and use the profits/losses in pips.

Or if you can think of any other way of getting the current(not closed) profit/loss of a position that is opened right now.Thank you.

Simon Gniadkowski
Moderator
17998
Simon Gniadkowski 2013.11.29 08:24  
Redael777:

Hi,what is the most efficient way to convert OrderProfit() which initially gives profits/losses in currency, into pips,just so i could see and use the profits/losses in pips.

Or if you can think of any other way of getting the current(not closed) profit/loss of a position that is opened right now.Thank you.

Use OrderOpenPrice() and Bid/Ask depending upon OrderType() . . . this will not take into account Commission though. If you need to take account of commission you will need to work back from the OrderProfit() using the OrderLots() and tick value.
Tom Maryland
77
Tom Maryland 2013.11.29 08:41  
Thank you for your reply.
whroeder1
14480
whroeder1 2013.11.29 14:22  
Redael777: what is the most efficient way to convert OrderProfit() which initially gives profits/losses in currency, into pips,

OrderProfit() = ( OrderClosePrice() - OrderOpenPrice() )*DIR * DeltaValuePerLot() * OrderLots()

so Pips = OrderProfit() / DeltaValuePerLot() / OrderLots() / Pips2dbl

To add comments, please log in or register