Skip to content
All library documents

Adding Randomized Tick Paths to a Market Replay Simulator

Article MQL5 articles

Summary

The article develops a market replay simulator that turns one-minute OHLC bars into synthetic tick sequences. It seeds a pseudorandom number generator with a changing value so the generated paths vary between runs, while noting that a fixed seed can reproduce the same sequence. Randomly choosing whether the bar first visits its high or low removes a predictable path that a tested Expert Advisor might otherwise exploit.

The method adds intermediate pivots within the bar’s price range, increasing the number of possible paths, and distributes real volume and timestamps across the generated ticks. The author reports that dividing the range into more segments adds complexity, but that going beyond three subdivisions showed little observed benefit. The article also discusses replay navigation and acknowledges visible irregularities in bar construction, leaving them for later work. These simulated paths are an approximation: the text offers no empirical validation that they reproduce actual intrabar market behavior or eliminate all tester artifacts.

Key ideas

  • A changing random seed makes simulated tick paths vary between runs, while a fixed seed makes them reproducible.
  • Randomizing whether a bar visits its high or low first reduces one predictable path in the replay.
  • Adding intermediate pivots creates more candidate price paths within each one-minute bar.
  • The generated ticks receive apportioned volume and timestamps within the bar.
  • The author observes limited benefit from using more than three subdivisions and notes unresolved display irregularities.

Tags

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