jollydragon: precise balance calculation after an order is closed
- The balance after all orders are closed is AccountBalance(). Having a different EA on the same account is irrelevant.
- The balance after the selected order, (if it is closed immediately,) would be AccountBalance() + OrderProfit() + OrderCommission() + OrderSwap().
- The balance after all orders are closed, (if it is closed immediately,) would be AccountBalance() + sum of all orders, or more simply, just AccountEquity - MQL4 Documentation.
WHRoeder:
- The balance after the selected order, (if it is closed immediately,) would be AccountBalance() + OrderProfit() + OrderCommission() + OrderSwap().
Thank you!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I don't want to use AccountBalance() as I want to calculate the balance of different EA on a same account.
I define accountBalance for the purpose. However how can I get a precise balance calculation after an order is closed considering commission and swap?
Is this correct?