Replay mode
A bar-by-bar playback state machine — train your eye, backtest a strategy by hand.
Replay rewinds the chart to a chosen historical point and steps forward bar-by-bar at a chosen speed. Useful for training (read the chart without leakage), demoing strategies, and recording walkthroughs.
Quick example
How it works
Replay is a state machine on useChartStore:
replayActive: boolean— gate flag.replayCursor: TimestampMs— current playback head.replaySpeed: 0.5 | 1 | 2 | 4 | 8— bars-per-second multiplier.replayPlaying: boolean— whether the cursor is auto-advancing.
When active, the renderer hides every bar with time > replayCursor.
Step buttons advance/retreat the cursor by one bar; play auto-advances
at replaySpeed × baseTickInterval.
The Replay toolbar in the bottom-right is draggable and remembers
its position across reloads. Toggle from the top
bar or Cmd-Shift-R.
Variations
Step manually
Exit replay back to live
API
| Action | Method |
|---|---|
| Enter replay | setReplayActive(true) |
| Exit replay | setReplayActive(false) |
| Move cursor | setReplayCursor(ts) |
| Step | replayStep(±1) |
| Speed | setReplaySpeed(0.5|1|2|4|8) |
| Play / pause | setReplayPlaying(bool) |