Total Profit is OrderProfit() + OrderSwap() + OrderCommission(). Some brokers don't use the Commission/Swap fields. Instead, they add balance entries. (Maybe related to Government required accounting/tax laws.)
"balance" orders in account history - Day Trading Techniques - MQL4 programming forum (2017)
Broker History FXCM Commission - «TICKET»
Rollover - «TICKET»? >R/O - 1,000 EUR/USD @0.52 ? #«ticket» N/A OANDA Balance update
Financing (Swap: One entry for all open orders.)
Total Profit is OrderProfit() + OrderSwap() + OrderCommission(). Some brokers don't use the Commission/Swap fields. Instead, they add balance entries. (Maybe related to Government required accounting/tax laws.)
"balance" orders in account history - Day Trading Techniques - MQL4 programming forum (2017)
Broker History FXCM Commission - «TICKET»
Rollover - «TICKET»? >R/O - 1,000 EUR/USD @0.52 ? #«ticket» N/A OANDA Balance update
Financing (Swap: One entry for all open orders.)
Hello William;
Thanks for the response.
I got the formula ( Total Profit is OrderProfit() + OrderSwap() + OrderCommission()); so no problem there. Oanda is my broker and you are correct they add balance entries.
My problem is they add this entry under the "Type" heading in the history log (see image below) but the OrderType() does not provide for a custom search such as the word
"balance". So that's my dilemma. How can I auto-calculate the finance charge and subtract it from my overall profit?
Thank you again for your answer. I do appreciate your time.
Lode
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
Does anyone know how to calculate in EA the financing fees charged by the broker?
I wrote this code to calculate daily profit (see below). It works fine. Except it does not include
the broker's daily financing fee. That's because the broker will list the fee under the Profit heading
as a loss (example: -6.89) and the date of the transaction in the open order time field.
If I include the OrderOpenTime() formula in my code (see below) the result is wrong as it will include
ALL orders that were opened on that day.
Any suggestions anyone?
Thanks
Lode