Skip to content
All library documents

Customizing Multiple Indicator Charts with Period and Width Settings

Article MQL5 articles

Summary

This article extends an MQL5 system for displaying multiple indicators or symbols in chart subwindows. It explains how a class stores chart-object details in a structure and parses optional syntax for setting an indicator’s timeframe and pixel width. A fixed timeframe lets an indicator keep displaying data from its chosen period when the main chart changes; fixed widths let users control how subwindows share space. The article also describes reusing parsing logic with a macro, cleaning up chart objects and symbols, and applying templates to created charts.

The examples illustrate implementation choices rather than a trading strategy or performance test. The author notes that fixed-width windows may not shrink when the main chart is made narrower, which can cause layout problems. The piece is part of a programming series and presents a foundation for future extensions; it does not evaluate how the display settings affect trading results.

Key ideas

  • A chart-object class can group each subwindow’s symbol, object name, and width in a structure.
  • Optional syntax can specify an indicator’s timeframe and display width.
  • A fixed-period indicator can remain on its selected timeframe when the main chart changes.
  • Reusable parsing logic and cleanup routines help extend and maintain chart code.
  • Fixed-width windows may cause layout issues when the chart becomes narrower.

Tags

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