Skip to content
All library documents

Building an Averaged Multi-Symbol Synthetic Price Series in MQL5

Article MQL5 articles

Summary

The document explains how to construct a MetaTrader 5 custom symbol by averaging OHLC data from multiple instruments. An Expert Advisor collects and validates source symbols, aligns their candles by timestamp, calculates averaged open, high, low, close, and volume values, then writes the resulting history to the custom symbol. The example illustrates averaging prices from two instruments, and the workflow also covers describing and configuring the new symbol.

For ongoing synchronization, the EA refreshes only recent candles on a timer instead of rebuilding all history each time. The article describes a practical platform implementation rather than a tested trading strategy: it gives no performance results or evidence that an averaged series is predictive or tradable. Averaging raw prices across instruments with different scales or units may also make the resulting series hard to interpret; the document does not discuss normalization or weighting methods.

Key ideas

  • The EA aligns source candles by timestamp and averages their OHLC values to form each synthetic candle.
  • Source symbols are checked and selected before the custom symbol is created or updated.
  • Historical data is rebuilt in the custom symbol, while timer events refresh only recent candles.
  • The method describes data aggregation and platform setup, not evidence of trading performance.
  • Averaging raw prices can be difficult to interpret when source instruments use different price scales.

Tags

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