how to show OrderProfit() in Points?

 

Hy,


i cant write the code to get the actual OrderProfit() of an already opened Order to a Point/Tick value...

does anyone knows better? (mql4)

double realOrderProfit = (OrderProfit()-OrderCommission()-OrderSwap()) / OrderLots() / MarketInfo( OrderSymbol(), MODE_TICKVALUE ); //???????
 
Tim Rittel:

Hy,


i cant write the code to get the actual OrderProfit() of an already opened Order to a Point/Tick value...

does anyone knows better? (mql4)

double realOrderProfit = OrderProfit() + OrderCommission() + OrderSwap();
 
nicholi shen:

thank you very much.... yes Ordercommission is a minus value and minus*minus is +, so it has to be +(OrderCommission()), because 30 + -10 is 20... THANK You for quick answer Nicholi...