Designing a Collection Data Object for Indicator Buffer Values
Summary
This installment in a MetaTrader library series explains how to represent one indicator buffer's value on one timeseries bar as a reusable data object. Each object is intended to sit in a collection associated with a symbol and timeframe, making indicator observations searchable and sortable for later comparison and benchmarking. The author notes that direct indicator requests can already retrieve values, so the collection cache is mainly groundwork for future analysis.
The design assigns each record integer properties for bar time, timeframe, indicator type, buffer number, and indicator ID; a real property for the buffer value; and string properties for symbol and indicator names. These fields also become sort criteria. The article describes creating a class derived from the library's base object and outlines its standard property access and data handling. It is a software architecture tutorial rather than a trading method: it provides no trading results or evidence that caching improves analysis, and its proposed use depends on later collection functionality.
Key ideas
- The design stores one indicator buffer observation per bar in a dedicated data object.
- Records include time, timeframe, indicator identity, buffer number, value, symbol, and indicator names.
- The chosen properties support sorting and searching within future collections.
- The author presents cached collections as groundwork for comparing indicator data and benchmarking.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.