I have coded multi-symbol functionality into my EA. I am wondering, will it run through every tick for each symbol being traded or only the symbol of the chart that the EA is added to?
- EA clashing when using multiple pairs...
- how to edit Symbol()
- Help with code to execute code once per bar in MQL5
JoeMSC.FX: I have coded multi-symbol functionality into my EA. I am wondering, will it run through every tick for each symbol being traded or only the symbol of the chart that the EA is added to?
OnTick() is called almost every tick of the current chart symbol only. Never for ticks from other symbols. I say "almost" because new ticks may arrive while processing the event.
To receive "tick" events from other symbols, us the follow work-around from this article: The Implementation of a Multi-currency Mode in MetaTrader 5
An alternative method is to scan the symbols for new ticks during an OnTimer() event handling.
OnTick is called for the current symbol. If you want ticks (non-polling) from other symbols, you must code that.
The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles (2011)
The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles (2011)

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