Value ref
rolling_statsA rolling statistic of source over lookback_bars — mean, std, zscore, sum, count, rank, percentile or ema.
source accepts ANY value ref, including a nested binary_expr, so
this is the general smoothing and normalisation primitive: an SMA of an
arbitrary expression is stat="mean", and a rolling z-score of a spread
is stat="zscore". Combined with rolling_max/rolling_min it
expresses whole indicator families that have no dedicated type — the %K of
a stochastic over any series is a 3-bar "mean" of the normalised ratio.
NaN propagates: one missing value in the window returns NaN, and a NaN
operand makes the enclosing compare false. Purpose-built indicators that
compact their buffers to finite samples (srsi_k, stochastic_k)
survive undefined stretches that this ref does not, so they are not
redundant with it.
percentile_level is required when stat="percentile" and must be
omitted otherwise.
Backing types
RollingStatsValueRef
Required fields
Optional fields
Backing types
The IR ValueRef classes this builder field resolves to.