
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
Hi folks,
I need clarification on how MT5 handles updating account info functions.
At the open of a new bar I read the following:
AccountInfoDouble(ACCOUNT_EQUITY))
AccountInfoDouble(ACCOUNT_MARGIN))
AccountInfoDouble(ACCOUNT_BALANCE))
If equity (drawdown) or margin are outside limits, I close the oldest trade.
I then read them again and repeat the process as many times as required, otherwise I wait until the next new bar.
But, I need to know I am using the updated equity, margin and balance values so how can I handle that?
I assume I am reading the account info functions from a database within in the MT5 terminal and the server is asynchronously updating the MT5 terminal database.
From the time the trade server closes the trade how long will it take to update the account info database in the MT5 terminal, obviously excluding the MT5 to server latency?
Is it updated on each trade event or tick or time based or how????
Otherwise, if my assumption is wrong could someone please advise how the account info updates are handled.
Thanks in advance,
Allan W.