Skip to content
All library documents

Processing Ticks Across Multiple Symbols in an MT5 Expert Advisor

Article MQL5 code base

Summary

This document explains a library approach for handling tick events from multiple symbols in an MT5 Expert Advisor. Since the platform's NewTick event is tied to the chart symbol running the advisor, the library provides a multisymbol callback that reports the symbol and its index when ticks arrive. The example initializes a per-symbol counter and increments it inside that callback.

A strategy tester run is presented as evidence that generated ticks for the configured symbols reached the callback, with reported counts for each symbol and a total. The stated benefits are that an advisor's tester result can be less dependent on the selected base symbol and that required-symbol ticks are not skipped. This is an implementation example, not a trading strategy or a benchmark across market conditions. Its result demonstrates behavior in the shown test setup; the document does not detail configuration limits, synchronization edge cases, or live execution behavior.

Key ideas

  • MT5's standard NewTick event is associated with the symbol on which the Expert Advisor runs.
  • The library provides a callback for ticks from a configured list of symbols.
  • The example tracks incoming ticks separately by symbol using the callback's symbol index.
  • A strategy tester example reports that all generated ticks for its configured symbols were processed.
  • The document demonstrates event handling in one test setup, not trading performance or live reliability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.