Expand description
Batch and replay execution over a full bar history. Batch and replay execution over a full bar history.
Indicator::on_bar processes one bar and returns the
latest value; consumers wanting a full, timestamp-aligned output series over a backfill
(charting, backtesting, golden-fixture generation) previously had to hand-roll the loop. These
helpers standardize it: deterministic (always start from Indicator::reset), timestamp-
aligned (one entry per input bar, in order, None during warmup), and reproducible (pure
function of the indicator + bar slice, safe to call repeatedly for replay).
Structs§
- Batch
Result - Result of
run_batch_with_applicability: the batch output series plus the applicability verdict for the indicator/series-capabilities pair it was computed for. - Timestamped
Output - One entry of a batch/replay output series: the source bar’s timestamp paired with the
indicator’s output for that bar (
Nonewhile still inside the warmup period).
Functions§
- run_
batch - Resets
indicator, then feedsbarsthrough it in order, collecting oneTimestampedOutputper bar. Two calls with the same indicator type andbarsslice always produce identical results (deterministic backfill / reproducible replay). - run_
batch_ checked - Like
run_batch, but validates each bar viaIndicator::on_checked_barand stops at the first invalid bar, returning the entries collected so far plus the validation error. - run_
batch_ with_ applicability - Like
run_batch, but also attaches ancrate::applicability::Applicabilityverdict for the named indicator againstcapabilities.