Skip to content
All library documents

Capping Tick Counts in a MetaTrader Replay Simulator

Article MQL5 articles

Summary

This replay-system installment addresses slow processing when a one-minute bar contains a very large number of ticks. It changes the simulation design to cap tick counts, including for replayed or externally supplied data, and describes distributing simulated times and volumes across generated ticks. The simulator also creates price paths within a bar's high-low range, using randomized prices or a constrained random walk while accounting for spread and tick size.

The article motivates the limit with platform processing delays, including cases involving futures data, but does not report benchmark results or quantify timing improvements. Its implementation is explicitly provisional: the author identifies unresolved defects involving minimum simulated tick counts and copying values into tick arrays, which can cause erratic bars or missing ticks. The material is therefore useful as a design discussion for replay simulation, but the described version should not be treated as a fully reliable market-data reconstruction method.

Key ideas

  • A high tick load can slow platform processing during live use and historical replay.
  • The simulator caps ticks per bar and distributes timestamps, prices, and volume across generated ticks.
  • Generated prices are constrained by the bar's high and low and use tick-size and spread settings.
  • The article describes design changes but gives no measured performance comparison.
  • The implementation still has identified defects that can distort replay bars or cause ticks to disappear.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.