How do I calculate the profit based on MODE_SWAPTYPE?

 
MODE_SWAPTYPE: 0 - in points; 1 - in the symbol base currency; 2 - by interest; 3 - in the margin currency.

How do I calculate the profit based on MODE_SWAPTYPE in MQL4?

Does anyone know where can I find a method with parameters and return values in profit?

Thanks.

 

Swap only comes in when you keep the order open past 4pm NY time.

OrderSelect followed by profit = OrderProfit() + OrderSwap() + OrderCommission()

 

Thank you for your replied.

I mean I need to work out before open the trade.

Thanks.

 

Search for it, I've made a long explanation before

Reason: