Ordering Replay Data Loads for Flexible Forex Simulation
Summary
This installment explains how to make a market replay and simulation service more reliable when loading forex data. A configuration that loads one-minute bars before tick trades can cause the system to delete the bars when it switches price display modes, leaving the chart blank and preventing normal operation. Requiring users to list ticks first avoids that failure, but makes configuration order unnecessarily restrictive.
The proposed approach reads the configuration into memory and processes its entries in the sequence the system requires, regardless of how the user arranged them. The implementation uses string arrays to collect file references, then loads replay ticks and supporting historical bars in the appropriate order. It also reports errors for unrecognized commands, missing data, and file access failures. The article builds on earlier changes for bid-based displays and stalled replay when ticks are absent. It describes a software design and workflow, not trading performance, and notes that further replay-system challenges remain.
Key ideas
- Loading tick trades after one-minute bars can erase the bars when the display mode changes.
- A replay service can decouple configuration order from execution order by reading and processing the whole file.
- The loader groups file references by data type and then processes them in the sequence required by the simulation.
- Configuration errors and missing data should be surfaced so a failed service does not leave the user with a blank chart.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.