Building MQL5 Graphical Objects and Tracking Their Properties
Summary
This article develops basic support in the DoEasy library for creating standard chart objects from programs and tracking changes to their properties. It adjusts which properties different object classes report as supported, distinguishing objects constructed from price, time, or multiple pivot points. The work also corrects a dynamic-array bug: repeatedly adding the same object pointer created several references to one instance, so edits to one pivot point appeared to affect the others. The proposed fix creates a distinct data object for each array cell.
The article describes moving multidimensional arrays into a reusable library unit and improving storage for changing object properties. A chart-based demonstration uses clicks to create a vertical line and inspects the object identifier and pivot-point changes for an equidistant channel. These are software-library implementation details rather than trading findings. The article provides no quantitative evaluation, and the graphical-object programming feature is described as basic functionality that will be extended in subsequent installments.
Key ideas
- Graphical object classes should report only the properties relevant to how each object is constructed.
- Duplicating a pointer in a property array does not create independent property objects.
- Creating a new data object for every array cell allows separate pivot-point values to be tracked.
- The library changes are demonstrated through chart interaction with a vertical line and an equidistant channel.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.