Live and replay behave the same way
- In replay the script receives exactly the bars revealed up to the playhead, and the newest bar it receives is the one at the playhead. Nothing after the playhead is visible: not a bar, not a print, not a book snapshot, not an order change.
- On a live chart and in replay the script is recomputed over the loaded window as new data lands, at most about once a second, so the newest bar updates and completed bars stay stable.
- Because a run always starts from bar 0 of the window, a var accumulator does not double count when a run repeats.
- The newest bar in the window is the one still developing, and its values change until it closes. last_bar and is_forming are both true on it, live and in replay.
- Depth and individual orders have recorded twins, and everything a script reads from an indicator by name is what that indicator shows at the playhead, so a script reading them behaves the same in replay as live. Quotes and gamma have no recorded twin: in replay l1.supported() and gex.supported() are false, the Orderflow Stats family is empty, and Dealers Flow is not on the chart, so the script should draw what it can without them.
- On a live chart, quotes, depth and gamma are recorded bar by bar as they arrive, so their history starts when the script started running on the chart and starts again when the chart is reopened. In replay, depth and orders come from the recording on every bar up to the playhead.
