Better get an orders current profit

 

Not talking pips here.

But which formula is more accurate:

double TotalProfit=OrderProfit();

or

double TotalProfit=OrderProfit()+OrderSwap()+OrderCommission();
In other words, does OrderProfit() automatically include OrderSwap() and OrderCommission()?
 

OrderProfit

Returns profit of the currently selected order.

double  OrderProfit();

Returned value

The net profit value (without swaps or commissions) for the selected order. For open orders, it is the current unrealized profit. For closed orders, it is the fixed profit.

You could check the documentation.

https://docs.mql4.com/trading/orderprofit

OrderProfit - Trade Functions - MQL4 Reference
OrderProfit - Trade Functions - MQL4 Reference
  • docs.mql4.com
OrderProfit - Trade Functions - MQL4 Reference
Reason: