Skip to content
All library documents

Synthesizing Cross Rates into Real-Time MT4 Charts

Article MQL5 code base

Summary

This document describes an MT4 chart tool that constructs a synthetic symbol from two source symbols in Market Watch and displays it as a real-time offline chart. Its calculation can multiply the source prices or divide one by the other, allowing users to build implied currency pairs and other cross rates. The examples show how shared currencies connect pairs such as EUR/GBP and GBP/USD to EUR/USD, or USD/JPY and EUR/JPY to EUR/USD.

The tool inherits basic operation from a period-conversion utility, but adds settings for the generated symbol name, its price precision, and the spread used in calculations. The attached chart symbol supplies the first source; the second must match its Market Watch name, including any broker prefix or suffix. For division, source order matters. The document also cautions that MT4 history does not retain past spread data, and that the first source needs adequate history for daily calculations. It explains configuration, rather than evaluating accuracy, trading performance, or execution suitability.

Key ideas

  • The tool synthesizes a virtual symbol by multiplying or dividing two available source symbols.
  • A shared currency can link two pairs to form an implied cross rate.
  • The attached chart symbol becomes the first input, while the second input must match its Market Watch name exactly.
  • Division requires the sources to remain in the specified order.
  • Spread and price precision are configurable, and historical spread data is unavailable in MT4 history.

Tags

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