Designing Typed Indicator Buffer Objects in MQL5
Summary
This installment of the DoEasy library series develops concrete indicator buffer classes from an abstract buffer base. It describes organizing drawing data into indexed arrays, protecting shared state, and adding support for multiple colors, empty values, labels, line styles, and plot types. A configurable color limit and index correction help manage buffer setup and avoid invalid array access. The article also outlines how derived buffer objects represent different graphical constructions, including bars and candles.
The evidence is an implementation walkthrough and a test indicator display, rather than a trading study or performance comparison. The focus is library architecture and MQL5 indicator construction; it does not establish that any plot type improves signals or profitability. The article is part of a larger series, and the planned buffer collection class is left for a later installment. The supplied files target MetaTrader 5 and are explicitly not tested for MetaTrader 4.
Key ideas
- Concrete buffer classes inherit common properties and methods from an abstract indicator buffer class.
- Drawing arrays are grouped into structures so a buffer object can manage multiple data series by index.
- Color-setting methods support individual colors and arrays of colors for indicator plots.
- Derived objects represent different plot constructions, such as bars and candles.
- The article demonstrates library implementation and chart display, not trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.