Simha:
Is access (Read/Write) to global variables assured to be race-condition-free?
More Generally: Can the MT4 terminal start processing a tick of symbol B, while a previous tick of symbol A is being processed?
Is access (Read/Write) to global variables assured to be race-condition-free?
More Generally: Can the MT4 terminal start processing a tick of symbol B, while a previous tick of symbol A is being processed?
- Only OnCondition could be, which I used it to write a mutex.
- Yes. That is exactly what "Each EA runs on its own thread" means.
The GlobalVariables have a time stamp of the last access: GlobalVariableTime("name") which seems to be the local (pc) time (not TimeCurrent()) and is accurate to the nearest second.
WHRoeder:
- Only OnCondition could be, which I used it to write a mutex.
- Yes. That is exactly what "Each EA runs on its own thread" means.
Thanks for the useful answer.
gooly:
The GlobalVariables have a time stamp of the last access: GlobalVariableTime("name") which seems to be the local (pc) time (not TimeCurrent()) and is accurate to the nearest second.
Thanks. I've found this useful.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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,
Terminal global variables are available for concurrent access from all running EAs. Each EA runs on its own thread (as stated on official documentation).
Is access (Read/Write) to global variables assured to be race-condition-free?
More Generally: Can the MT4 terminal start processing a tick of symbol B, while a previous tick of symbol A is being processed?
Thanks much.