OrderProfit() into Pips conversion

 

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.

 
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.
 
Thank you for your reply.
 
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

Reason: