Expand description
Built-in indicators. Every indicator implements crate::Indicator.
Modules are organised internally by category (trend, momentum, volatility, volume) but every public name is also re-exported flat from this module and from the crate root for convenience.
Structs§
- Accelerator
Oscillator - Accelerator Oscillator — Bill Williams’ gauge of momentum’s acceleration.
- Adl
- Accumulation/Distribution Line — Marc Chaikin’s cumulative volume-flow indicator.
- Adx
- Wilder’s Average Directional Index.
- AdxOutput
- ADX output: the three Wilder lines.
- Aroon
- Aroon indicator: tracks how many bars since the highest high and lowest low
inside a
period + 1-bar window. Returned as a percentage. - Aroon
Oscillator - Aroon Oscillator — the single-line difference
AroonUp − AroonDown. - Aroon
Output - Aroon output: up and down strengths in [0, 100].
- Atr
- Average True Range with Wilder smoothing.
- AtrTrailing
Stop - ATR Trailing Stop — a stop level that trails price by a fixed ATR multiple and ratchets in the direction of the trend.
- Awesome
Oscillator - Awesome Oscillator:
SMA(median_price, 5) - SMA(median_price, 34). - Balance
OfPower - Balance of Power — where the close settled within the bar’s range relative to the open.
- Bollinger
Bands - Bollinger Bands with SMA middle band and population standard deviation envelopes.
- Bollinger
Bandwidth - Bollinger Bandwidth — the width of the Bollinger Bands relative to the middle band.
- Bollinger
Output - Bollinger Bands output.
- Cci
- Commodity Channel Index.
- Chaikin
Money Flow - Chaikin Money Flow — Marc Chaikin’s
period-window money-flow oscillator. - Chaikin
Oscillator - Chaikin Oscillator — the MACD of the Accumulation/Distribution Line.
- Chaikin
Volatility - Chaikin Volatility — the rate of change of a smoothed high-low spread.
- Chande
Kroll Stop - Chande Kroll Stop — Tushar Chande and Stanley Kroll’s two-stage ATR stop.
- Chande
Kroll Stop Output - Chande Kroll Stop output: the long-side and short-side stop levels.
- Chandelier
Exit - Chandelier Exit — Chuck LeBeau’s ATR trailing stop, hung from the highest high (for longs) or the lowest low (for shorts) of the lookback window.
- Chandelier
Exit Output - Chandelier Exit output: the long-side and short-side trailing stops.
- Choppiness
Index - Choppiness Index — is the market trending or just chopping sideways?
- Cmo
- Chande Momentum Oscillator — Tushar Chande’s bounded momentum gauge.
- Coppock
- Coppock Curve — Edwin Coppock’s long-term momentum indicator.
- Dema
- Double Exponential Moving Average:
2 * EMA - EMA(EMA). - Donchian
- Donchian Channels: rolling highest high / lowest low envelopes.
- Donchian
Output - Donchian Channels output.
- Dpo
- Detrended Price Oscillator — strips the trend out of price to expose its shorter cycles.
- Ease
OfMovement - Richard Arms’ Ease of Movement — how far price travels per unit of volume.
- Ema
- Exponential Moving Average with smoothing factor
alpha = 2 / (period + 1). - Force
Index - Alexander Elder’s Force Index — price change scaled by volume, EMA-smoothed.
- Historical
Volatility - Historical Volatility — the annualised standard deviation of log returns.
- Hma
- Hull Moving Average:
WMA(2 * WMA(n/2) - WMA(n), sqrt(n)). - Kama
- Kaufman’s Adaptive Moving Average.
- Keltner
- Keltner Channels: an EMA centerline with bands sized by ATR.
- Keltner
Output - Keltner Channels output.
- LinReg
Angle - Linear Regression Angle — the slope of the rolling least-squares fit, expressed as an angle in degrees.
- LinReg
Slope - Linear Regression Slope — the slope of a rolling least-squares fit.
- Linear
Regression - Linear Regression — the endpoint of a rolling least-squares fit.
- Macd
Indicator - MACD = EMA(fast) − EMA(slow), with a signal EMA on top.
- Macd
Output - MACD output: the three classic series at a given step.
- Mass
Index - Mass Index — Donald Dorsey’s range-expansion indicator.
- Median
Price - Median Price — the bar’s
(high + low) / 2. - Mfi
- Money Flow Index: a volume-weighted version of RSI.
- Mom
- Momentum: the raw price change over
periodbars,price_t − price_{t−period}. - Natr
- Normalized Average True Range —
Atrexpressed as a percentage of price. - Obv
- On-Balance Volume: a cumulative signed-volume series.
- PercentB
- Bollinger %b — where price sits within the Bollinger Bands.
- Pmo
- Price Momentum Oscillator — Carl Swenlin’s
DecisionPointPMO line. - Ppo
- Percentage Price Oscillator — MACD expressed as a percentage.
- Psar
- Parabolic Stop And Reverse.
- Roc
- Rate of Change as a percentage:
(close - close[period]) / close[period] * 100. - Rolling
Vwap - Rolling-window VWAP: a finite-memory variant for bots that don’t want unbounded accumulation.
- Rsi
- Relative Strength Index (Wilder, 1978).
- Sma
- Simple Moving Average over a fixed window.
- Smma
- Smoothed Moving Average — Wilder’s running moving average, also known as RMA.
- StdDev
- Rolling population standard deviation over the last
periodvalues. - Stoch
Rsi - Stochastic RSI — the Stochastic Oscillator formula applied to the RSI series instead of to price.
- Stochastic
- Fast Stochastic Oscillator.
- Stochastic
Output - Stochastic Oscillator output.
- Super
Trend SuperTrend— an ATR-banded trailing stop that flips sides on a close through the band.- Super
Trend Output SuperTrendoutput: the trailing-stop level and the trend direction.- T3
- Tillson’s T3 — a six-fold cascaded EMA recombined with a volume factor
v. - Tema
- Triple Exponential Moving Average:
3 * EMA1 - 3 * EMA2 + EMA3, whereEMA2 = EMA(EMA1)andEMA3 = EMA(EMA2). - Trima
- Triangular Moving Average — a simple moving average applied twice, which triangular-weights the window so the middle bars carry the most weight and the edges the least.
- Trix
- TRIX: the 1-period percent rate of change of a triple-smoothed EMA.
- True
Range - True Range — the single-bar building block of every ATR-based indicator.
- Tsi
- True Strength Index — William Blau’s double-smoothed momentum oscillator.
- Typical
Price - Typical Price — the bar’s
(high + low + close) / 3. - Ulcer
Index - Ulcer Index — Peter Martin’s downside-only volatility / risk measure.
- Ultimate
Oscillator - Ultimate Oscillator — Larry Williams’ three-timeframe momentum oscillator.
- Vertical
Horizontal Filter - Vertical Horizontal Filter — Adam White’s trend-versus-range gauge.
- Volume
Price Trend - Volume-Price Trend — a cumulative volume line weighted by percentage price change.
- Vortex
- Vortex Indicator — Botes & Siepman’s pair of oscillators (
VI+,VI−) that capture the relationship between two consecutive bars. - Vortex
Output - Vortex Indicator output: the two directional movement lines.
- Vwap
- Cumulative session VWAP. Call
Indicator::resetat the start of each session (e.g. trading-day boundary) to restart the accumulation. - Vwma
- Volume-Weighted Moving Average over a rolling window of
periodcandles. - Weighted
Close - Weighted Close — the bar’s
(high + low + 2·close) / 4. - WilliamsR
- Williams %R:
-100 * (HH - close) / (HH - LL)over the lookback window. - Wma
- Weighted Moving Average with linear weights
1, 2, ..., period. - ZScore
- Z-Score — how many standard deviations the latest price sits from its rolling mean.
- Zlema
- Zero-Lag Exponential Moving Average (Ehlers & Way).