Skip to main content

Module functions

Module functions 

Source
Expand description

Standalone batch indicator functions and incremental structs.

Ported from the original indicators crate lib. These work on slices (batch mode) or as incremental O(1)-per-tick structs.

Structs§

ATR
Incremental Wilder ATR.
EMA
Incremental EMA — O(1) update, SMA warm-up.
IndicatorCalculator
Multi-period indicator calculator (batch mode).
StrategyIndicators
Bundle of per-strategy indicator series.

Functions§

atr
Average True Range (EMA-smoothed).
ema
Exponential Moving Average over a price slice. Returns a Vec of the same length; leading values are NaN until warm-up.
macd
MACD — returns (macd_line, signal_line, histogram).
rsi
Relative Strength Index.
sma
Simple Moving Average over a price slice.
true_range
True Range = max(H-L, |H-prevC|, |L-prevC|).