
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
Hello,
I would be very grateful if someone could help me with my problem. I need the amount of the balance in one of my indicators. Which I get with the function AccountBalance(). The problem is: when I change the Account in the MT4 (Login with an another account and the indicator is already in the chart), the function AccountBalance() does not deliver the actual balance but the balance of the account with whom I was logged previously. Do somebody know what I can do, respectively what the reason is for this behaviour? The error does not occur every time, but very often.
Thank you very much for you help!
I have found that the new balance has not been loaded into the terminal at the moment when the balance is requested by the code.
The problem is I can not use Sleep() function in the indicator to wait for some time. I am very grateful for any suggestion how I can solve this problem.