Designing an Abstract Indicator Object for a Trading Library
Summary
This installment describes a software design for representing indicators as objects in the DoEasy MQL5 library. It introduces an abstract base indicator class, intended to be extended by standard and custom indicator classes. Each object records properties such as status, timeframe, handle, group, plotting empty value, symbol, and names, allowing indicators to be stored and accessed through a collection.
Indicators are grouped as trend, oscillator, volume, or arrow types, with enumerations for properties and sorting criteria. The article also covers adding library messages and identifiers so indicator objects fit the existing collection framework. Its contribution is architectural: it explains how to organize and sort indicator metadata, rather than presenting a new indicator formula, trading signal, or performance test. The excerpt focuses on the base class and its integration; it points to later installments for concrete standard and custom indicator objects.
Key ideas
- An abstract base class can provide shared properties and methods for standard and custom indicators.
- Indicator metadata includes status, timeframe, handle, group, plotting value, symbol, and names.
- Grouping indicators supports organization by trend, oscillator, volume, or arrow type.
- Enumerated properties and sort criteria connect indicator objects to a collection framework.
- The article addresses library architecture rather than trading performance or signal validity.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.