Improving Replay Data Validation and Configuration in MQL5
Summary
This article describes early reliability improvements to an MQL5 market replay system. It introduces a configuration file that lists bar files for historical context and tick files for replay, with checks intended to distinguish the expected file formats and headers. The replay service also gains settings for its configuration file and starting chart timeframe, plus checks for failed data loading, a closed chart, or a stopped service. Cleanup routines release loaded tick arrays and remove the replay chart and custom symbol when playback ends.
The account explains the motivation through practical limitations: earlier workflows required separate databases for different replay dates, and mismatched bar and tick data could disrupt the system. The configuration example shows multiple historical bar files followed by tick files, and the article describes replaying later data and returning to its start. It also acknowledges an error still present at this stage, to be addressed in a later installment. This is software-system guidance, not a market strategy or evidence that replay data reproduces live trading conditions.
Key ideas
- A configuration file can specify multiple historical bar files and tick files for replay.
- Header checks help prevent bar data from being mistaken for trade tick data, or the reverse.
- The service can validate data loading and stop if the replay chart or service is closed.
- Explicit cleanup releases loaded arrays and removes replay chart and symbol resources.
- The article describes an evolving implementation and acknowledges an unresolved replay error.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.