how to show OrderProfit() in Points?

To add comments, please log in or register
Tim Rittel
275
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()) / OrderLots() / MarketInfo( OrderSymbol(), MODE_TICKVALUE ); //???????
nicholi shen
2241
nicholi shen  
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();
Tim Rittel
275
Tim Rittel  
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...

To add comments, please log in or register