Adapting Tick Replay and Bar Conversion for Bid-Based Markets
Summary
This installment explains why a replay system designed around traded-price data can produce incorrect charts and indicators when used with forex or other Bid-based markets. In the described data, tick volume can remain zero because it is tied to changes in the Last price, so the existing routine that builds one-minute bars only when volume is positive may skip Bid ticks entirely.
The proposed direction is to read the full tick file first, determine whether the data should be plotted using Bid or Last, and adjust when tick-to-bar conversion occurs. The article also distinguishes loading data for replay from using tick data to update prior rates, which affects where conversion can safely happen. It notes that simulations need additional handling for zero or very small volume to avoid hangs or crashes. The excerpt does not provide the full implementation or a measured comparison; it frames the changes as groundwork for later forex-style simulation work.
Key ideas
- Bid-based tick files may have zero volume even when Bid prices change.
- The existing volume-gated conversion can therefore fail to create bars from forex ticks.
- The replay system must determine the plotting mode after reading the complete tick file.
- Tick conversion must be placed carefully because replay loading and rate updates have different needs.
- Simulation logic should account for zero or very low tick volume to avoid failures.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.