The details of OrderProfit()

 

I thought

OrderProfit()=OrderClosePrice()-OrderOpenPrice();

But when I check the log file I find it seems I am wrong.

Please, hope somebody can tell me the details of OrderProfit(), how to calculate it?


Thanks  a lot!

 

Profit for buy

OrderProfit() = (OrderClosePrice()-OrderOpenPrice())*OrderLots()*MarketInfo(OrderSymbol(),MODE_TICKVALUE)/Point;

 
tuoitrecuoi:

Profit for buy

OrderProfit() = (OrderClosePrice()-OrderOpenPrice())*OrderLots()*MarketInfo(OrderSymbol(),MODE_TICKVALUE)/Point;

Thanks a lot for the answer.

I add the below code in the EA program

 double profit;
 double CalProfit;

 profit=OrderProfit();
 CalProfit=(OrderClosePrice()-OrderOpenPrice())*OrderLots()*MarketInfo(OrderSymbol(),MODE_TICKVALUE)/Point;
 Print("Profit="+profit,",","CalProfit="+CalProfit); 

 But it seems the profit is not equal CalProfit.

Is there something wrong?

Reason: