EventSetMillisecondTimer() ?
- For every Tick, use OnTick() Event Handler
- Fore every ### sec or every ### ms, use OnTimer() Event Handler, setting the interval with either EventSetTimer() or EventSetMillisecondTimer().
But most importantly!
- First read the entire documentation and look at example code in the Code Base, as well as learn basic coding in a language like C or C++ before even contemplating coding in MQL.
- Also, learn the difference between MQL4 and MQL5. They are not the same! The link you provided is for MetaTrader 5 and not MetaTrader 4 (which the basis of this MQL4 forum).
The real question is why? No new tick, nothing has changed. |
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 want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms).
What is the best way to code this in MQL?
Thanks in advance!