How Tick Prices Contribute to Bar Highs and Lows
Summary
The document raises a question about why a bar-generation routine reads high_price and low_price from a tick when a tick may appear to contain only last_price. The code excerpt shows that the routine updates a bar’s high and low using the latest traded price, then also checks the tick’s reported high and low against those of the previous tick. This allows the bar to incorporate price extremes recorded within the tick interval, rather than relying only on the last trade.
The excerpt is useful for understanding how tick data can preserve intraperiod extremes when constructing bars. It does not include the discussion or answer that would clarify the specific data-feed semantics, such as whether high_price and low_price are cumulative session values or interval values. Correct interpretation therefore depends on the TickData definition and the feed’s conventions; the snippet alone cannot establish those details.
Key ideas
- The bar generator updates its high and low from each tick’s last traded price.
- It also compares tick high and low values with those from the previous tick.
- Tick extremes can capture price movement that is absent from the latest trade alone.
- The excerpt does not explain the data-feed semantics of the high and low fields.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.