Skip to content
All library documents

Displaying Multiple Currency-Pair Charts in One Window

Article MQL5 code base

Summary

This MQL5 charting example shows how to place several currency-pair subcharts inside one chart window to monitor price movements and possible relationships between pairs. It uses a subchart graphical-object class and describes adjusting display settings such as background, scale, grid, scrolling, and visible area. It also demonstrates adding a rectangle and horizontal lines for average opening prices of long and short positions.

The example was developed for an automated-trading championship and can load line data from a text file in the terminal’s data folder. It offers a visualization technique for comparing instruments, but it does not define a correlation calculation, trading rule, or evidence that visual comparison improves decisions. Users need to adapt the code and data handling to their terminal setup and intended charts.

Key ideas

  • A subchart graphical object can display several currency-pair charts within one chart window.
  • Display settings such as scale, grid, background, and scrolling can be adjusted for each chart.
  • The example can annotate charts with rectangles and horizontal lines for average position entry prices.
  • The article describes visualization code, not a tested correlation strategy or trading signal.

Tags

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