Designing a Multi-Symbol, Multi-Timeframe Timeseries Collection
Summary
This installment of the DoEasy library series describes organizing historical bars into a collection indexed by both trading symbol and timeframe. The collection is intended to give an MQL5 program access to the requested number of bars for every configured symbol-period combination, with separate data requirements for each timeframe. The article positions this as a higher-level layer built on earlier bar and timeseries objects.
It also refactors the library’s base object design: a minimal base class holds common properties and methods, while an extended descendant carries event handling and user-interaction features. The article outlines renaming and reassigning existing class references to separate these responsibilities. A test run reports requested, created, and server-available bar counts across EURUSD timeframes, along with initialization time, illustrating that available history can vary by period and that startup depends on prior use. Real-time updates, new-bar notifications, and data retrieval are deferred to a later installment, so this part focuses on construction and initialization rather than a complete live data workflow.
Key ideas
- A timeseries collection groups historical data by symbol and timeframe.
- Programs can request distinct history depths for each symbol-period combination.
- Separating a minimal base object from an event-capable extension limits unnecessary inherited functionality.
- The test output shows that server history availability differs across timeframes.
- Real-time updates and data access are reserved for a later installment.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.