Skip to content
All library documents

Tracking Graphical Object Changes Across MetaTrader Charts

Article MQL5 articles

Summary

This article describes how a MetaTrader 5 library can monitor changes to graphical objects on multiple open charts when the main program runs on only one chart. A small indicator is created and attached to each chart under management. It listens for object change and drag events, then forwards them to the main chart as custom events. The event identifier, chart identifier, and object name allow the receiving program to identify what changed and where.

The article also outlines updates to the library's graphical object classes and event handling, including property refreshes and chart lifecycle reporting. A test procedure uses an expert advisor and additional open charts; the reported outcome is that object changes appear in the journal and newly opened charts receive monitoring indicators. At this stage, the forwarded events are logged rather than acted on by the controlling program, so the implementation demonstrates event capture and transport rather than a complete cross-chart response system.

Key ideas

  • Chart events are delivered to the program attached to the chart where they occur.
  • A helper indicator on each managed chart can capture object changes and drags.
  • Custom events can forward the originating chart and object details to a central chart.
  • The library refreshes object properties and reports when monitored charts close.
  • The demonstrated version logs forwarded events but does not yet make the main program respond to them.

Tags

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