F13c: restructure the indicator catalogue into eight families

The original taxonomy was four classical families plus a statistics group,
with the F1-F12 expansion slotted in as sub-categories. This regroups the
whole 71-indicator catalogue into eight top-level families, each with at
least five members:

  Moving Averages (12), Momentum Oscillators (13), Trend & Directional (9),
  Price Oscillators (5), Volatility & Bands (12), Trailing Stops (5),
  Volume (9), Price Statistics (7).

- Wiki: docs/wiki/indicators/ reorganised into eight family folders; all 71
  indicator pages moved with `git mv`. Every internal cross-link is
  normalised to `../<family>/Indicator-X.md`, each page's `Family` field is
  set to its new family, and two pre-existing `../Indicator-Chaining.md`
  links (should have been `../../`) are corrected. A link check confirms
  every relative wiki link resolves.
- Indicators-Overview.md fully rewritten around the eight families;
  Home.md indicator reference and the README family table follow suit.
- Warmup-Periods.md gains the eight F13 indicators; CHANGELOG records the
  46-indicator expansion (25 -> 71) and the eight-family taxonomy.
- Tests: Node indicators.test.js and Python test_new_indicators.py cover
  all eight new indicators (Node 91/91, Python 117/117 green).

cargo fmt + clippy (core/wickra/data/wasm/node) clean; 508 core tests,
25 data tests and 74 doctests green.
This commit is contained in:
kingchenc
2026-05-22 21:21:56 +02:00
parent 6643f7a81d
commit d2f99efd78
78 changed files with 612 additions and 616 deletions
+24 -11
View File
@@ -8,19 +8,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- 38 new technical indicators, taking the library from 25 to 63. Each is
implemented once in the Rust core and wired through the Python, Node and
WASM bindings, with reference-value tests and a dedicated wiki page:
- Trend: `Smma`, `Trima`, `Zlema`, `T3`, `Vwma`.
- Momentum: `Mom`, `Cmo`, `Tsi`, `Pmo`, `StochRsi`, `UltimateOscillator`,
`Ppo`, `Dpo`, `Coppock`, `AroonOscillator`, `Vortex`, `MassIndex`.
- Volatility: `Natr`, `StdDev`, `UlcerIndex`, `HistoricalVolatility`,
`BollingerBandwidth`, `PercentB`, `SuperTrend`, `ChandelierExit`,
`ChandeKrollStop`, `AtrTrailingStop`.
- 46 new technical indicators, taking the library from 25 to 71 and
reorganising the catalogue into **eight families**, each with at least five
members. Every indicator is implemented once in the Rust core and wired
through the Python, Node and WASM bindings, with reference-value tests and a
dedicated wiki page:
- Moving Averages: `Smma`, `Trima`, `Zlema`, `T3`, `Vwma`.
- Momentum Oscillators: `Mom`, `Cmo`, `Tsi`, `Pmo`, `StochRsi`,
`UltimateOscillator`.
- Trend & Directional: `AroonOscillator`, `Vortex`, `MassIndex`,
`ChoppinessIndex`, `VerticalHorizontalFilter`.
- Price Oscillators: `Ppo`, `Dpo`, `Coppock`, `AcceleratorOscillator`,
`BalanceOfPower`.
- Volatility & Bands: `Natr`, `StdDev`, `UlcerIndex`,
`HistoricalVolatility`, `BollingerBandwidth`, `PercentB`, `TrueRange`,
`ChaikinVolatility`.
- Trailing Stops: `SuperTrend`, `ChandelierExit`, `ChandeKrollStop`,
`AtrTrailingStop`.
- Volume: `Adl`, `VolumePriceTrend`, `ChaikinMoneyFlow`,
`ChaikinOscillator`, `ForceIndex`, `EaseOfMovement`.
- Statistics: `TypicalPrice`, `MedianPrice`, `WeightedClose`,
`LinearRegression`, `LinRegSlope`.
- Price Statistics: `TypicalPrice`, `MedianPrice`, `WeightedClose`,
`LinearRegression`, `LinRegSlope`, `ZScore`, `LinRegAngle`.
- `TickAggregator::with_gap_fill` — opt-in mode that emits a flat placeholder
candle for every empty bucket between two ticks, keeping the candle series
evenly spaced for downstream indicators.
@@ -33,6 +41,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Dependabot configuration.
### Changed
- The indicator wiki is reorganised into eight family folders under
`docs/wiki/indicators/` (`moving-averages/`, `momentum-oscillators/`,
`trend-directional/`, `price-oscillators/`, `volatility-bands/`,
`trailing-stops/`, `volume/`, `price-statistics/`); `Indicators-Overview.md`,
`Home.md` and the README indicator table follow the same eight families.
- `TickAggregator::push` returns `Result<Vec<Candle>>` (was
`Result<Option<Candle>>`) so a single tick can yield a closed bar plus gap
fillers.
+14 -11
View File
@@ -95,17 +95,20 @@ python -m benchmarks.compare_libraries
## Indicators
63 streaming-first indicators across four families plus a statistics group.
Every one passes the `batch == streaming` equivalence test, reference-value
tests, and reset semantics tests.
71 streaming-first indicators across eight families. Every one passes the
`batch == streaming` equivalence test, reference-value tests, and reset
semantics tests.
| Family | Indicators |
|-------------|-----------|
| Trend | SMA, EMA, WMA, DEMA, TEMA, HMA, KAMA, SMMA, TRIMA, ZLEMA, T3, VWMA |
| Momentum | RSI (Wilder), MACD, Stochastic, CCI, ROC, Williams %R, ADX (+DI/-DI), MFI, TRIX, Awesome Oscillator, Aroon, MOM, CMO, TSI, PMO, StochRSI, Ultimate Oscillator, PPO, DPO, Coppock, Aroon Oscillator, Vortex, Mass Index |
| Volatility | Bollinger Bands, ATR, Keltner Channels, Donchian Channels, Parabolic SAR, NATR, StdDev, Ulcer Index, Historical Volatility, Bollinger Bandwidth, %B, SuperTrend, Chandelier Exit, Chande Kroll Stop, ATR Trailing Stop |
| Volume | OBV, VWAP (cumulative + rolling), ADL, Volume-Price Trend, Chaikin Money Flow, Chaikin Oscillator, Force Index, Ease of Movement |
| Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope |
| Family | Indicators |
|--------|-----------|
| Moving Averages | SMA, EMA, WMA, DEMA, TEMA, HMA, KAMA, SMMA, TRIMA, ZLEMA, T3, VWMA |
| Momentum Oscillators | RSI (Wilder), Stochastic, CCI, ROC, Williams %R, MFI, Awesome Oscillator, MOM, CMO, TSI, PMO, StochRSI, Ultimate Oscillator |
| Trend & Directional | MACD, ADX (+DI/-DI), Aroon, TRIX, Aroon Oscillator, Vortex, Mass Index, Choppiness Index, Vertical Horizontal Filter |
| Price Oscillators | PPO, DPO, Coppock, Accelerator Oscillator, Balance of Power |
| Volatility & Bands | ATR, Bollinger Bands, Keltner Channels, Donchian Channels, NATR, StdDev, Ulcer Index, Historical Volatility, Bollinger Bandwidth, %B, True Range, Chaikin Volatility |
| Trailing Stops | Parabolic SAR, SuperTrend, Chandelier Exit, Chande Kroll Stop, ATR Trailing Stop |
| Volume | OBV, VWAP (cumulative + rolling), ADL, Volume-Price Trend, Chaikin Money Flow, Chaikin Oscillator, Force Index, Ease of Movement |
| Price Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope, Z-Score, Linear Regression Angle |
Adding a new indicator means implementing one trait in Rust; all four bindings
inherit it automatically.
@@ -175,7 +178,7 @@ A Python live-trading example using the public `websockets` package lives at
```
wickra/
├── crates/
│ ├── wickra-core/ core engine + all 63 indicators
│ ├── wickra-core/ core engine + all 71 indicators
│ ├── wickra/ top-level facade crate (publishes on crates.io)
│ │ + benches/ and examples/backtest.rs
│ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds
+26 -1
View File
@@ -1,5 +1,5 @@
// Comprehensive tests for the Wickra Node bindings: streaming-vs-batch
// equivalence, reference values, and lifecycle methods across all 63
// equivalence, reference values, and lifecycle methods across all 71
// indicators. Ported from the Python test_streaming_vs_batch / test_known_values
// suites.
@@ -13,6 +13,7 @@ const close = Array.from({ length: N }, (_, i) => 100 + Math.sin(i * 0.2) * 10 +
const high = close.map((c) => c + 1.5);
const low = close.map((c) => c - 1.5);
const volume = Array.from({ length: N }, (_, i) => 1000 + (i % 7) * 50);
const open = close.map((c) => c - 0.5);
function eq(a, b) {
if (Number.isNaN(a)) return Number.isNaN(b);
@@ -55,6 +56,9 @@ const scalarFactories = {
PercentB: () => new wickra.PercentB(20, 2),
LinearRegression: () => new wickra.LinearRegression(14),
LinRegSlope: () => new wickra.LinRegSlope(14),
VerticalHorizontalFilter: () => new wickra.VerticalHorizontalFilter(28),
ZScore: () => new wickra.ZScore(20),
LinRegAngle: () => new wickra.LinRegAngle(14),
};
for (const [name, make] of Object.entries(scalarFactories)) {
@@ -95,6 +99,11 @@ const candleScalar = {
TypicalPrice: { make: () => new wickra.TypicalPrice(), step: (ind, i) => ind.update(high[i], low[i], close[i]), batch: (ind) => ind.batch(high, low, close) },
MedianPrice: { make: () => new wickra.MedianPrice(), step: (ind, i) => ind.update(high[i], low[i]), batch: (ind) => ind.batch(high, low) },
WeightedClose: { make: () => new wickra.WeightedClose(), step: (ind, i) => ind.update(high[i], low[i], close[i]), batch: (ind) => ind.batch(high, low, close) },
AcceleratorOscillator: { make: () => new wickra.AcceleratorOscillator(5, 34, 5), step: (ind, i) => ind.update(high[i], low[i]), batch: (ind) => ind.batch(high, low) },
BalanceOfPower: { make: () => new wickra.BalanceOfPower(), step: (ind, i) => ind.update(open[i], high[i], low[i], close[i]), batch: (ind) => ind.batch(open, high, low, close) },
ChoppinessIndex: { make: () => new wickra.ChoppinessIndex(14), step: (ind, i) => ind.update(high[i], low[i], close[i]), batch: (ind) => ind.batch(high, low, close) },
TrueRange: { make: () => new wickra.TrueRange(), step: (ind, i) => ind.update(high[i], low[i], close[i]), batch: (ind) => ind.batch(high, low, close) },
ChaikinVolatility: { make: () => new wickra.ChaikinVolatility(10, 10), step: (ind, i) => ind.update(high[i], low[i]), batch: (ind) => ind.batch(high, low) },
};
for (const [name, d] of Object.entries(candleScalar)) {
@@ -232,3 +241,19 @@ test('SuperTrend flat market holds the lower band and an uptrend', () => {
assert.ok(Math.abs(out[2 * n - 2] - 4) < 1e-9); // value
assert.equal(out[2 * n - 1], 1); // direction
});
test('BalanceOfPower reference value', () => {
// (close - open) / (high - low) = (12 - 10) / (14 - 10) = 0.5.
assert.ok(Math.abs(new wickra.BalanceOfPower().update(10, 14, 10, 12) - 0.5) < 1e-9);
});
test('TrueRange reference values', () => {
const tr = new wickra.TrueRange();
assert.equal(tr.update(12, 8, 11), 4); // no prev close -> high - low
assert.equal(tr.update(10, 9, 9.5), 2); // prev close 11 -> max(1, 1, 2)
});
test('LinRegAngle of a unit-slope series is 45 degrees', () => {
const out = new wickra.LinRegAngle(5).batch([1, 2, 3, 4, 5, 6]);
assert.ok(Math.abs(out[4] - 45) < 1e-9);
});
@@ -60,6 +60,9 @@ SCALAR = [
(ta.PercentB, (20, 2.0)),
(ta.LinearRegression, (14,)),
(ta.LinRegSlope, (14,)),
(ta.VerticalHorizontalFilter, (28,)),
(ta.ZScore, (20,)),
(ta.LinRegAngle, (14,)),
]
@@ -131,6 +134,28 @@ CANDLE_SCALAR = {
lambda: ta.WeightedClose(),
lambda ind, h, l, c, v: ind.batch(h, l, c),
),
"AcceleratorOscillator": (
lambda: ta.AcceleratorOscillator(5, 34, 5),
lambda ind, h, l, c, v: ind.batch(h, l),
),
"BalanceOfPower": (
# The streaming 6-tuple feeds open == close, so batch matches with
# the close column standing in for open.
lambda: ta.BalanceOfPower(),
lambda ind, h, l, c, v: ind.batch(c, h, l, c),
),
"ChoppinessIndex": (
lambda: ta.ChoppinessIndex(14),
lambda ind, h, l, c, v: ind.batch(h, l, c),
),
"TrueRange": (
lambda: ta.TrueRange(),
lambda ind, h, l, c, v: ind.batch(h, l, c),
),
"ChaikinVolatility": (
lambda: ta.ChaikinVolatility(10, 10),
lambda ind, h, l, c, v: ind.batch(h, l),
),
}
@@ -239,6 +264,31 @@ def test_linreg_slope_reference():
assert out[2] == pytest.approx(4.0)
def test_balance_of_power_reference():
# (close - open) / (high - low) = (12 - 10) / (14 - 10) = 0.5.
bop = ta.BalanceOfPower()
assert bop.update((10.0, 14.0, 10.0, 12.0, 1.0, 0)) == pytest.approx(0.5)
def test_true_range_reference():
tr = ta.TrueRange()
assert tr.update((11.0, 12.0, 8.0, 11.0, 1.0, 0)) == pytest.approx(4.0)
assert tr.update((9.5, 10.0, 9.0, 9.5, 1.0, 1)) == pytest.approx(2.0)
def test_linreg_angle_reference():
# A series rising by 1 per step has slope 1, and atan(1) = 45 degrees.
out = ta.LinRegAngle(5).batch(np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0]))
assert out[4] == pytest.approx(45.0)
def test_z_score_reference():
# Window [1, 3]: mean 2, population stddev 1; latest 3 -> z = 1.
out = ta.ZScore(2).batch(np.array([1.0, 3.0]))
assert math.isnan(out[0])
assert out[1] == pytest.approx(1.0)
# --- Lifecycle ------------------------------------------------------------
+84 -67
View File
@@ -7,8 +7,9 @@ Node.js, WebAssembly, and Rust itself. The same `update` call you write inside
a live trading loop also drives the historical backtest of that same
strategy — there is no second code path that drifts behind the streaming one.
The project ships 63 indicators across the four classical families (trend,
momentum, volatility, volume) plus a statistics group, and a small set of
The project ships 71 indicators across eight families — moving averages,
momentum oscillators, trend & directional, price oscillators, volatility &
bands, trailing stops, volume, and price statistics — plus a small set of
supporting types (`Candle`, `Tick`, `Chain`). The Rust core forbids `unsafe`,
so every binding inherits a
memory-safe implementation. Install is one command on every supported
@@ -64,71 +65,85 @@ Release notes and tagged builds:
### Indicator reference
Start with [Indicators-Overview.md](Indicators-Overview.md) for the
cross-cutting taxonomy (trend / momentum / volatility / volume) and the
shared `Indicator` trait surface. The per-indicator pages below cover
formulas, parameters, warmup behaviour, edge cases, and verified
Rust / Python / Node examples. They are grouped by family, mirroring the
`indicators/<family>/` directory layout.
Start with [Indicators-Overview.md](Indicators-Overview.md) for the full
eight-family taxonomy and the shared `Indicator` trait surface. The
per-indicator pages below cover formulas, parameters, warmup behaviour, edge
cases, and verified Rust / Python / Node examples. They are grouped by family,
mirroring the `indicators/<family>/` directory layout.
**Trend** — smooth the price series to surface direction.
**Moving Averages** — smooth the price series to surface direction.
- [Indicator-Sma.md](indicators/trend/Indicator-Sma.md)
- [Indicator-Ema.md](indicators/trend/Indicator-Ema.md)
- [Indicator-Wma.md](indicators/trend/Indicator-Wma.md)
- [Indicator-Dema.md](indicators/trend/Indicator-Dema.md)
- [Indicator-Tema.md](indicators/trend/Indicator-Tema.md)
- [Indicator-Hma.md](indicators/trend/Indicator-Hma.md)
- [Indicator-Kama.md](indicators/trend/Indicator-Kama.md)
- [Indicator-Smma.md](indicators/trend/Indicator-Smma.md)
- [Indicator-Trima.md](indicators/trend/Indicator-Trima.md)
- [Indicator-Zlema.md](indicators/trend/Indicator-Zlema.md)
- [Indicator-T3.md](indicators/trend/Indicator-T3.md)
- [Indicator-Vwma.md](indicators/trend/Indicator-Vwma.md)
- [Indicator-Sma.md](indicators/moving-averages/Indicator-Sma.md)
- [Indicator-Ema.md](indicators/moving-averages/Indicator-Ema.md)
- [Indicator-Wma.md](indicators/moving-averages/Indicator-Wma.md)
- [Indicator-Dema.md](indicators/moving-averages/Indicator-Dema.md)
- [Indicator-Tema.md](indicators/moving-averages/Indicator-Tema.md)
- [Indicator-Hma.md](indicators/moving-averages/Indicator-Hma.md)
- [Indicator-Kama.md](indicators/moving-averages/Indicator-Kama.md)
- [Indicator-Smma.md](indicators/moving-averages/Indicator-Smma.md)
- [Indicator-Trima.md](indicators/moving-averages/Indicator-Trima.md)
- [Indicator-Zlema.md](indicators/moving-averages/Indicator-Zlema.md)
- [Indicator-T3.md](indicators/moving-averages/Indicator-T3.md)
- [Indicator-Vwma.md](indicators/moving-averages/Indicator-Vwma.md)
**Momentum** — measure the rate of price change rather than the level.
**Momentum Oscillators** — measure the rate of price change.
- [Indicator-Rsi.md](indicators/momentum/Indicator-Rsi.md)
- [Indicator-MacdIndicator.md](indicators/momentum/Indicator-MacdIndicator.md)
- [Indicator-Stochastic.md](indicators/momentum/Indicator-Stochastic.md)
- [Indicator-Cci.md](indicators/momentum/Indicator-Cci.md)
- [Indicator-Roc.md](indicators/momentum/Indicator-Roc.md)
- [Indicator-WilliamsR.md](indicators/momentum/Indicator-WilliamsR.md)
- [Indicator-Adx.md](indicators/momentum/Indicator-Adx.md)
- [Indicator-Mfi.md](indicators/momentum/Indicator-Mfi.md)
- [Indicator-Trix.md](indicators/momentum/Indicator-Trix.md)
- [Indicator-AwesomeOscillator.md](indicators/momentum/Indicator-AwesomeOscillator.md)
- [Indicator-Aroon.md](indicators/momentum/Indicator-Aroon.md)
- [Indicator-Mom.md](indicators/momentum/Indicator-Mom.md)
- [Indicator-Cmo.md](indicators/momentum/Indicator-Cmo.md)
- [Indicator-Tsi.md](indicators/momentum/Indicator-Tsi.md)
- [Indicator-Pmo.md](indicators/momentum/Indicator-Pmo.md)
- [Indicator-StochRsi.md](indicators/momentum/Indicator-StochRsi.md)
- [Indicator-UltimateOscillator.md](indicators/momentum/Indicator-UltimateOscillator.md)
- [Indicator-Ppo.md](indicators/momentum/Indicator-Ppo.md)
- [Indicator-Dpo.md](indicators/momentum/Indicator-Dpo.md)
- [Indicator-Coppock.md](indicators/momentum/Indicator-Coppock.md)
- [Indicator-AroonOscillator.md](indicators/momentum/Indicator-AroonOscillator.md)
- [Indicator-Vortex.md](indicators/momentum/Indicator-Vortex.md)
- [Indicator-MassIndex.md](indicators/momentum/Indicator-MassIndex.md)
- [Indicator-Rsi.md](indicators/momentum-oscillators/Indicator-Rsi.md)
- [Indicator-Stochastic.md](indicators/momentum-oscillators/Indicator-Stochastic.md)
- [Indicator-Cci.md](indicators/momentum-oscillators/Indicator-Cci.md)
- [Indicator-Roc.md](indicators/momentum-oscillators/Indicator-Roc.md)
- [Indicator-WilliamsR.md](indicators/momentum-oscillators/Indicator-WilliamsR.md)
- [Indicator-Mfi.md](indicators/momentum-oscillators/Indicator-Mfi.md)
- [Indicator-AwesomeOscillator.md](indicators/momentum-oscillators/Indicator-AwesomeOscillator.md)
- [Indicator-Mom.md](indicators/momentum-oscillators/Indicator-Mom.md)
- [Indicator-Cmo.md](indicators/momentum-oscillators/Indicator-Cmo.md)
- [Indicator-Tsi.md](indicators/momentum-oscillators/Indicator-Tsi.md)
- [Indicator-Pmo.md](indicators/momentum-oscillators/Indicator-Pmo.md)
- [Indicator-StochRsi.md](indicators/momentum-oscillators/Indicator-StochRsi.md)
- [Indicator-UltimateOscillator.md](indicators/momentum-oscillators/Indicator-UltimateOscillator.md)
**Volatility** — envelope width and per-bar dispersion measures.
**Trend & Directional** — is there a trend, and which way?
- [Indicator-BollingerBands.md](indicators/volatility/Indicator-BollingerBands.md)
- [Indicator-Atr.md](indicators/volatility/Indicator-Atr.md)
- [Indicator-Keltner.md](indicators/volatility/Indicator-Keltner.md)
- [Indicator-Donchian.md](indicators/volatility/Indicator-Donchian.md)
- [Indicator-Psar.md](indicators/volatility/Indicator-Psar.md)
- [Indicator-Natr.md](indicators/volatility/Indicator-Natr.md)
- [Indicator-StdDev.md](indicators/volatility/Indicator-StdDev.md)
- [Indicator-UlcerIndex.md](indicators/volatility/Indicator-UlcerIndex.md)
- [Indicator-HistoricalVolatility.md](indicators/volatility/Indicator-HistoricalVolatility.md)
- [Indicator-BollingerBandwidth.md](indicators/volatility/Indicator-BollingerBandwidth.md)
- [Indicator-PercentB.md](indicators/volatility/Indicator-PercentB.md)
- [Indicator-SuperTrend.md](indicators/volatility/Indicator-SuperTrend.md)
- [Indicator-ChandelierExit.md](indicators/volatility/Indicator-ChandelierExit.md)
- [Indicator-ChandeKrollStop.md](indicators/volatility/Indicator-ChandeKrollStop.md)
- [Indicator-AtrTrailingStop.md](indicators/volatility/Indicator-AtrTrailingStop.md)
- [Indicator-MacdIndicator.md](indicators/trend-directional/Indicator-MacdIndicator.md)
- [Indicator-Adx.md](indicators/trend-directional/Indicator-Adx.md)
- [Indicator-Aroon.md](indicators/trend-directional/Indicator-Aroon.md)
- [Indicator-Trix.md](indicators/trend-directional/Indicator-Trix.md)
- [Indicator-AroonOscillator.md](indicators/trend-directional/Indicator-AroonOscillator.md)
- [Indicator-Vortex.md](indicators/trend-directional/Indicator-Vortex.md)
- [Indicator-MassIndex.md](indicators/trend-directional/Indicator-MassIndex.md)
- [Indicator-ChoppinessIndex.md](indicators/trend-directional/Indicator-ChoppinessIndex.md)
- [Indicator-VerticalHorizontalFilter.md](indicators/trend-directional/Indicator-VerticalHorizontalFilter.md)
**Price Oscillators** — difference-of-averages momentum around zero.
- [Indicator-Ppo.md](indicators/price-oscillators/Indicator-Ppo.md)
- [Indicator-Dpo.md](indicators/price-oscillators/Indicator-Dpo.md)
- [Indicator-Coppock.md](indicators/price-oscillators/Indicator-Coppock.md)
- [Indicator-AcceleratorOscillator.md](indicators/price-oscillators/Indicator-AcceleratorOscillator.md)
- [Indicator-BalanceOfPower.md](indicators/price-oscillators/Indicator-BalanceOfPower.md)
**Volatility & Bands** — dispersion measures and price envelopes.
- [Indicator-Atr.md](indicators/volatility-bands/Indicator-Atr.md)
- [Indicator-BollingerBands.md](indicators/volatility-bands/Indicator-BollingerBands.md)
- [Indicator-Keltner.md](indicators/volatility-bands/Indicator-Keltner.md)
- [Indicator-Donchian.md](indicators/volatility-bands/Indicator-Donchian.md)
- [Indicator-Natr.md](indicators/volatility-bands/Indicator-Natr.md)
- [Indicator-StdDev.md](indicators/volatility-bands/Indicator-StdDev.md)
- [Indicator-UlcerIndex.md](indicators/volatility-bands/Indicator-UlcerIndex.md)
- [Indicator-HistoricalVolatility.md](indicators/volatility-bands/Indicator-HistoricalVolatility.md)
- [Indicator-BollingerBandwidth.md](indicators/volatility-bands/Indicator-BollingerBandwidth.md)
- [Indicator-PercentB.md](indicators/volatility-bands/Indicator-PercentB.md)
- [Indicator-TrueRange.md](indicators/volatility-bands/Indicator-TrueRange.md)
- [Indicator-ChaikinVolatility.md](indicators/volatility-bands/Indicator-ChaikinVolatility.md)
**Trailing Stops** — ATR-driven stop-loss trackers.
- [Indicator-Psar.md](indicators/trailing-stops/Indicator-Psar.md)
- [Indicator-SuperTrend.md](indicators/trailing-stops/Indicator-SuperTrend.md)
- [Indicator-ChandelierExit.md](indicators/trailing-stops/Indicator-ChandelierExit.md)
- [Indicator-ChandeKrollStop.md](indicators/trailing-stops/Indicator-ChandeKrollStop.md)
- [Indicator-AtrTrailingStop.md](indicators/trailing-stops/Indicator-AtrTrailingStop.md)
**Volume** — price moves weighted or confirmed by traded volume.
@@ -141,13 +156,15 @@ Rust / Python / Node examples. They are grouped by family, mirroring the
- [Indicator-ForceIndex.md](indicators/volume/Indicator-ForceIndex.md)
- [Indicator-EaseOfMovement.md](indicators/volume/Indicator-EaseOfMovement.md)
**Statistics** — price transforms and rolling regressions.
**Price Statistics** — per-bar transforms and rolling regressions.
- [Indicator-TypicalPrice.md](indicators/statistics/Indicator-TypicalPrice.md)
- [Indicator-MedianPrice.md](indicators/statistics/Indicator-MedianPrice.md)
- [Indicator-WeightedClose.md](indicators/statistics/Indicator-WeightedClose.md)
- [Indicator-LinearRegression.md](indicators/statistics/Indicator-LinearRegression.md)
- [Indicator-LinRegSlope.md](indicators/statistics/Indicator-LinRegSlope.md)
- [Indicator-TypicalPrice.md](indicators/price-statistics/Indicator-TypicalPrice.md)
- [Indicator-MedianPrice.md](indicators/price-statistics/Indicator-MedianPrice.md)
- [Indicator-WeightedClose.md](indicators/price-statistics/Indicator-WeightedClose.md)
- [Indicator-LinearRegression.md](indicators/price-statistics/Indicator-LinearRegression.md)
- [Indicator-LinRegSlope.md](indicators/price-statistics/Indicator-LinRegSlope.md)
- [Indicator-ZScore.md](indicators/price-statistics/Indicator-ZScore.md)
- [Indicator-LinRegAngle.md](indicators/price-statistics/Indicator-LinRegAngle.md)
## See also
+139 -196
View File
@@ -1,11 +1,9 @@
# Indicators Overview
Wickra ships 63 indicators, organised under the four classical families —
trend, momentum, volatility, volume — plus a fifth **statistics** group for
price transforms and rolling regressions. The same family labels are used
here, with a second-level grouping that reflects how the indicators actually
behave (which output range they live in, what data they need, what question
they answer).
Wickra ships **71 indicators** organised into **eight families**. Each family
collects indicators that answer the same kind of question and groups at least
five of them, so the taxonomy here maps one-to-one onto the
`docs/wiki/indicators/<family>/` directory layout.
Every indicator is an O(1) state machine that consumes one input at a time
and produces either `Option<f64>` (Rust), `float | None` (Python), or
@@ -14,255 +12,200 @@ and produces either `Option<f64>` (Rust), `float | None` (Python), or
trait surface and warmup-period semantics are covered in
[Quickstart: Rust](Quickstart-Rust.md) and [Warmup Periods](Warmup-Periods.md).
The "Output range" column below is the value bounds an indicator emits once
warm. "unbounded" means it tracks the price scale of the input. The
"Warmup" column quotes `warmup_period()` as the indicator reports it; this
is the **exact** first-emission index for every indicator — the first
non-`None` output lands on input `warmup_period()` (index
`warmup_period() - 1`).
The "Output range" column is the value bounds an indicator emits once warm;
"unbounded" means it tracks the price scale of the input. The "Warmup" column
quotes `warmup_period()` as the indicator reports it the **exact**
first-emission index: the first non-`None` output lands on input
`warmup_period()` (0-indexed `warmup_period() - 1`).
## Trend
The eight families:
Trend indicators smooth the price series to surface direction. They are
all single-input, single-output (`f64 → f64`).
| # | Family | Count | What it answers |
|---|--------|-------|-----------------|
| 1 | [Moving Averages](#moving-averages) | 12 | Where is the smoothed trend line? |
| 2 | [Momentum Oscillators](#momentum-oscillators) | 13 | How fast is price changing; is it overbought? |
| 3 | [Trend & Directional](#trend--directional) | 9 | Is there a trend, and which way? |
| 4 | [Price Oscillators](#price-oscillators) | 5 | Difference-of-averages momentum around zero. |
| 5 | [Volatility & Bands](#volatility--bands) | 12 | How wide is the range; where are the envelopes? |
| 6 | [Trailing Stops](#trailing-stops) | 5 | Where is the stop-loss for this trend? |
| 7 | [Volume](#volume) | 9 | Is volume confirming the move? |
| 8 | [Price Statistics](#price-statistics) | 7 | Per-bar price transforms and rolling regressions. |
### Simple averages
## Moving Averages
Pure linear weighting. Mostly used as fast baselines or as comparison
benchmarks against fancier averages.
Smooth the price series to surface direction. All are single-input,
single-output (`f64 → f64`) except `Vwma`, which weights by volume.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Sma` | Equal-weighted rolling mean over `period` closes. | `f64` | `f64` | unbounded (price scale) | `period` (no default in core; Python defaults vary by binding) | `period` | [Indicator-Sma.md](indicators/trend/Indicator-Sma.md) |
| `Wma` | Linear weights `1, 2, …, period` so the newest bar matters most. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Wma.md](indicators/trend/Indicator-Wma.md) |
| `Trima` | A `period`-window SMA applied twice; triangular weights centred on the middle bar. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Trima.md](indicators/trend/Indicator-Trima.md) |
| `Vwma` | Rolling mean of closes weighted by each bar's volume. | `Candle` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Vwma.md](indicators/trend/Indicator-Vwma.md) |
| `Sma` | Equal-weighted rolling mean over `period` closes. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Sma.md](indicators/moving-averages/Indicator-Sma.md) |
| `Ema` | EMA with `α = 2 / (period + 1)`, SMA-seeded. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Ema.md](indicators/moving-averages/Indicator-Ema.md) |
| `Wma` | Linear weights `1, 2, …, period`; newest bar matters most. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Wma.md](indicators/moving-averages/Indicator-Wma.md) |
| `Dema` | Mulloy's `2·EMA EMA(EMA)`; removes first-order EMA lag. | `f64` | `f64` | unbounded (price scale) | `period` | `period 1` | [Indicator-Dema.md](indicators/moving-averages/Indicator-Dema.md) |
| `Tema` | Mulloy's `3·EMA 3·EMA(EMA) + EMA(EMA(EMA))`. | `f64` | `f64` | unbounded (price scale) | `period` | `3·period 2` | [Indicator-Tema.md](indicators/moving-averages/Indicator-Tema.md) |
| `Hma` | Hull's near-zero-lag `WMA(2·WMA(n/2) WMA(n), √n)`. | `f64` | `f64` | unbounded (price scale) | `period` | `period + round(√period) 1` | [Indicator-Hma.md](indicators/moving-averages/Indicator-Hma.md) |
| `Kama` | Kaufman's adaptive average; efficiency ratio picks α per bar. | `f64` | `f64` | unbounded (price scale) | `(er_period=10, fast=2, slow=30)` | `er_period + 1` | [Indicator-Kama.md](indicators/moving-averages/Indicator-Kama.md) |
| `Smma` | Wilder's RMA: SMA-seeded exponential average, `1/period` factor. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Smma.md](indicators/moving-averages/Indicator-Smma.md) |
| `Trima` | A `period`-window SMA applied twice; triangular weights. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Trima.md](indicators/moving-averages/Indicator-Trima.md) |
| `Zlema` | EMA of the de-lagged series `2·price price[lag]`. | `f64` | `f64` | unbounded (price scale) | `period` | `lag + period` | [Indicator-Zlema.md](indicators/moving-averages/Indicator-Zlema.md) |
| `T3` | Tillson's six-EMA cascade recombined with a volume factor `v`. | `f64` | `f64` | unbounded (price scale) | `(period, v=0.7)` (Python) | `6·period 5` | [Indicator-T3.md](indicators/moving-averages/Indicator-T3.md) |
| `Vwma` | Rolling mean of closes weighted by each bar's volume. | `Candle` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Vwma.md](indicators/moving-averages/Indicator-Vwma.md) |
### Exponential family
## Momentum Oscillators
Recursive smoothing with one or more chained EMAs. Lag reduction grows as
you stack more EMAs, but so does responsiveness to noise.
Measure the *rate* of price change. Several are bounded by construction
(0100 / ±100 oscillators), the rest are difference-driven.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Ema` | EMA with `α = 2 / (period + 1)`, seeded from the SMA of the first `period` inputs. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Ema.md](indicators/trend/Indicator-Ema.md) |
| `Dema` | Mulloy's `2·EMA EMA(EMA)`; removes first-order EMA lag. | `f64` | `f64` | unbounded (price scale) | `period` | `2·period 1` | [Indicator-Dema.md](indicators/trend/Indicator-Dema.md) |
| `Tema` | Mulloy's `3·EMA 3·EMA(EMA) + EMA(EMA(EMA))`; removes more lag than DEMA. | `f64` | `f64` | unbounded (price scale) | `period` | `period 2` | [Indicator-Tema.md](indicators/trend/Indicator-Tema.md) |
| `Smma` | Wilder's RMA: an SMA-seeded exponential average with the slow `1/period` factor. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Smma.md](indicators/trend/Indicator-Smma.md) |
| `Zlema` | EMA of the de-lagged series `2·price price[lag]`; near-zero group delay. | `f64` | `f64` | unbounded (price scale) | `period` | `lag + period` | [Indicator-Zlema.md](indicators/trend/Indicator-Zlema.md) |
| `T3` | Tillson's six-EMA cascade recombined with a volume factor `v`. | `f64` | `f64` | unbounded (price scale) | `(period, v=0.7)` (Python) | `period 5` | [Indicator-T3.md](indicators/trend/Indicator-T3.md) |
| `Rsi` | Wilder's RSI; smoothed `gain / (gain + loss) × 100`. | `f64` | `f64` | `[0, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Rsi.md](indicators/momentum-oscillators/Indicator-Rsi.md) |
| `Stochastic` | `%K = (close low_n)/(high_n low_n) × 100`, smoothed into `%D`. | `Candle` | `(k, d)` | each in `[0, 100]` | `(k_period=14, d_period=3)` (Python) | `k_period + d_period 1` | [Indicator-Stochastic.md](indicators/momentum-oscillators/Indicator-Stochastic.md) |
| `Cci` | `(typical SMA(typical)) / (0.015 · mean_dev)`. | `Candle` | `f64` | unbounded (typically `±100``±200`) | `period = 20` (Python) | `period` | [Indicator-Cci.md](indicators/momentum-oscillators/Indicator-Cci.md) |
| `Roc` | `(price price_n) / price_n × 100`; raw percentage change. | `f64` | `f64` | unbounded around zero | `period` | `period + 1` | [Indicator-Roc.md](indicators/momentum-oscillators/Indicator-Roc.md) |
| `WilliamsR` | `100 × (high_n close) / (high_n low_n)`. | `Candle` | `f64` | `[100, 0]` | `period = 14` (Python) | `period` | [Indicator-WilliamsR.md](indicators/momentum-oscillators/Indicator-WilliamsR.md) |
| `Mfi` | "Volume-weighted RSI": Wilder smoothing of money-flow ratios. | `Candle` | `f64` | `[0, 100]` | `period = 14` (Python) | `period` | [Indicator-Mfi.md](indicators/momentum-oscillators/Indicator-Mfi.md) |
| `AwesomeOscillator` | `SMA(median, fast) SMA(median, slow)`; zero-line crossover. | `Candle` | `f64` | unbounded around zero | `(fast=5, slow=34)` (Python) | `slow_period` | [Indicator-AwesomeOscillator.md](indicators/momentum-oscillators/Indicator-AwesomeOscillator.md) |
| `Mom` | `price price[period]`; raw price-difference momentum. | `f64` | `f64` | unbounded around zero | `period = 10` (Python) | `period + 1` | [Indicator-Mom.md](indicators/momentum-oscillators/Indicator-Mom.md) |
| `Cmo` | Chande Momentum Oscillator; `100·(Σgain Σloss)/(Σgain + Σloss)`. | `f64` | `f64` | `[100, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Cmo.md](indicators/momentum-oscillators/Indicator-Cmo.md) |
| `Tsi` | True Strength Index; double-EMA-smoothed momentum ratio. | `f64` | `f64` | ≈ `[100, 100]` | `(long=25, short=13)` (Python) | `long + short` | [Indicator-Tsi.md](indicators/momentum-oscillators/Indicator-Tsi.md) |
| `Pmo` | DecisionPoint Price Momentum Oscillator; doubly-smoothed ROC. | `f64` | `f64` | unbounded around zero | `(smoothing1=35, smoothing2=20)` (Python) | `2` | [Indicator-Pmo.md](indicators/momentum-oscillators/Indicator-Pmo.md) |
| `StochRsi` | Stochastic Oscillator applied to the RSI series. | `f64` | `f64` | `[0, 100]` | `(rsi_period=14, stoch_period=14)` (Python) | `rsi_period + stoch_period` | [Indicator-StochRsi.md](indicators/momentum-oscillators/Indicator-StochRsi.md) |
| `UltimateOscillator` | Larry Williams' weighted three-timeframe buying-pressure oscillator. | `Candle` | `f64` | `[0, 100]` | `(short=7, mid=14, long=28)` (Python) | `max(short,mid,long) + 1` | [Indicator-UltimateOscillator.md](indicators/momentum-oscillators/Indicator-UltimateOscillator.md) |
`Trix` is also built from a triple-smoothed EMA, but it is a *momentum
oscillator* — it emits the rate of change of that EMA, not a price-scale
trend line — so it is listed under [Momentum](#momentum), matching the
`indicators/momentum/` source layout.
## Trend & Directional
### Adaptive & hybrid
These two adjust their effective smoothing on the fly. They are the
"smart" trend filters; both also live in Trend by directory placement.
Answer whether a trend exists and which way it points — directional systems,
crossover packages and trend-versus-range filters.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Hma` | Hull's `WMA(2·WMA(n/2) WMA(n), √n)`; near-zero lag with a built-in noise filter. | `f64` | `f64` | unbounded (price scale) | `period` | `period + round(√period) 1` (see notes) | [Indicator-Hma.md](indicators/trend/Indicator-Hma.md) |
| `Kama` | Kaufman's adaptive average: efficiency ratio picks an α between a fast and slow EMA per bar. | `f64` | `f64` | unbounded (price scale) | `(er_period=10, fast=2, slow=30)` | `er_period + 1` (see notes) | [Indicator-Kama.md](indicators/trend/Indicator-Kama.md) |
| `MacdIndicator` | `EMA(fast) EMA(slow)` plus a signal EMA and the histogram. | `f64` | `(macd, signal, histogram)` | unbounded around zero | `(fast=12, slow=26, signal=9)` (Python) | `slow + signal 1` | [Indicator-MacdIndicator.md](indicators/trend-directional/Indicator-MacdIndicator.md) |
| `Adx` | Wilder's directional system: `+DI`, `DI` and the `ADX` strength index. | `Candle` | `(plus_di, minus_di, adx)` | each in `[0, 100]` | `period = 14` (Python) | `2·period` | [Indicator-Adx.md](indicators/trend-directional/Indicator-Adx.md) |
| `Aroon` | Bars-since-high and bars-since-low scaled to `[0, 100]`. | `Candle` | `(up, down)` | each in `[0, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Aroon.md](indicators/trend-directional/Indicator-Aroon.md) |
| `Trix` | Rate of change of a triple-smoothed EMA, `× 10000`. | `f64` | `f64` | unbounded around zero | `period = 15` (Python) | `3·period 1` | [Indicator-Trix.md](indicators/trend-directional/Indicator-Trix.md) |
| `AroonOscillator` | `AroonUp AroonDown`; the two Aroon lines as one gauge. | `Candle` | `f64` | `[100, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-AroonOscillator.md](indicators/trend-directional/Indicator-AroonOscillator.md) |
| `Vortex` | Vortex Indicator `VI+` / `VI`; crossings mark trend onset. | `Candle` | `(plus, minus)` | each `>= 0` | `period = 14` (Python) | `period + 1` | [Indicator-Vortex.md](indicators/trend-directional/Indicator-Vortex.md) |
| `MassIndex` | Dorsey's range-expansion sum of the EMA-of-range ratio. | `Candle` | `f64` | `> 0` | `(ema_period=9, sum_period=25)` (Python) | `2·ema_period + sum_period 2` | [Indicator-MassIndex.md](indicators/trend-directional/Indicator-MassIndex.md) |
| `ChoppinessIndex` | Summed true range over the high-low span, log-scaled. | `Candle` | `f64` | `[0, 100]` | `period = 14` (Python) | `period` | [Indicator-ChoppinessIndex.md](indicators/trend-directional/Indicator-ChoppinessIndex.md) |
| `VerticalHorizontalFilter` | Net price move divided by total move over `period`. | `f64` | `f64` | `[0, 1]` | `period = 28` (Python) | `period + 1` | [Indicator-VerticalHorizontalFilter.md](indicators/trend-directional/Indicator-VerticalHorizontalFilter.md) |
## Momentum
## Price Oscillators
Momentum indicators measure the *rate* of price change, not the level.
Several are bounded by construction (0100 oscillators); others are
unbounded; one (`Adx`) is directional and bundles three values.
### Bounded oscillators (0 100)
These all share the "overbought above 70/80, oversold below 30/20"
mental model, though the exact thresholds differ in the literature.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|--------------|-----------|-------|--------|-------|----------|--------|-----------|
| `Rsi` | Wilder's RSI; smoothed `gain / (gain + loss) × 100`. | `f64` | `f64` | `[0, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Rsi.md](indicators/momentum/Indicator-Rsi.md) |
| `Stochastic` | `%K = (close low_n)/(high_n low_n) × 100`, smoothed into `%D`. | `Candle` | `(k, d)` | each in `[0, 100]` | `(k_period=14, d_period=3)` (Python) | `k_period + d_period 1` | [Indicator-Stochastic.md](indicators/momentum/Indicator-Stochastic.md) |
| `Mfi` | "Volume-weighted RSI": Wilder smoothing of money-flow ratios. | `Candle` | `f64` | `[0, 100]` | `period = 14` (Python) | `period` | [Indicator-Mfi.md](indicators/momentum/Indicator-Mfi.md) |
| `Aroon` | Bars-since-high and bars-since-low scaled to `[0, 100]`. | `Candle` | `(up, down)` | each in `[0, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Aroon.md](indicators/momentum/Indicator-Aroon.md) |
| `StochRsi` | Stochastic Oscillator applied to the RSI series; sharpens RSI extremes. | `f64` | `f64` | `[0, 100]` | `(rsi_period=14, stoch_period=14)` (Python) | `rsi_period + stoch_period` | [Indicator-StochRsi.md](indicators/momentum/Indicator-StochRsi.md) |
| `UltimateOscillator` | Larry Williams' weighted three-timeframe buying-pressure oscillator. | `Candle` | `f64` | `[0, 100]` | `(short=7, mid=14, long=28)` (Python) | `max(short,mid,long) + 1` | [Indicator-UltimateOscillator.md](indicators/momentum/Indicator-UltimateOscillator.md) |
### Unbounded oscillators
Centered on zero or driven by raw price differences; no fixed cap.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|---------------------|-----------|-------|--------|-------|----------|--------|-----------|
| `MacdIndicator` | `EMA(fast) EMA(slow)` plus a signal-line EMA and the difference histogram. | `f64` | `(macd, signal, histogram)` | unbounded around zero | `(fast=12, slow=26, signal=9)` (Python) | `slow + signal 1` | [Indicator-MacdIndicator.md](indicators/momentum/Indicator-MacdIndicator.md) |
| `Cci` | `(typical SMA(typical)) / (0.015 · mean_dev)`; unbounded but typically `±100`. | `Candle` | `f64` | unbounded (typically `±100` to `±200`) | `period = 20` (Python) | `period` | [Indicator-Cci.md](indicators/momentum/Indicator-Cci.md) |
| `Roc` | `(price price_n) / price_n × 100`; raw percentage change over `period` bars. | `f64` | `f64` | unbounded around zero | `period` | `period + 1` | [Indicator-Roc.md](indicators/momentum/Indicator-Roc.md) |
| `AwesomeOscillator` | `SMA(median, fast) SMA(median, slow)`; Bill Williams' zero-line crossover oscillator. | `Candle` | `f64` | unbounded around zero | `(fast=5, slow=34)` (Python) | `slow_period` | [Indicator-AwesomeOscillator.md](indicators/momentum/Indicator-AwesomeOscillator.md) |
| `WilliamsR` | `100 × (high_n close) / (high_n low_n)`; same family as Stochastic but inverted to `[100, 0]`. | `Candle` | `f64` | `[100, 0]` | `period = 14` (Python) | `period` | [Indicator-WilliamsR.md](indicators/momentum/Indicator-WilliamsR.md) |
| `Trix` | `(EMA(EMA(EMA(price))).pct_change × 10000)`; oscillator built from a triple-smoothed EMA. | `f64` | `f64` | unbounded around zero | `period = 15` (Python) | `3·period 1` | [Indicator-Trix.md](indicators/momentum/Indicator-Trix.md) |
| `Mom` | `price price[period]`; raw price-difference momentum. | `f64` | `f64` | unbounded around zero | `period = 10` (Python) | `period + 1` | [Indicator-Mom.md](indicators/momentum/Indicator-Mom.md) |
| `Cmo` | Chande Momentum Oscillator; `100·(Σgain Σloss)/(Σgain + Σloss)` over `period` changes. | `f64` | `f64` | `[100, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-Cmo.md](indicators/momentum/Indicator-Cmo.md) |
| `Tsi` | True Strength Index; ratio of double-EMA-smoothed momentum to its absolute value. | `f64` | `f64` | ≈ `[100, 100]` around zero | `(long=25, short=13)` (Python) | `long + short` | [Indicator-Tsi.md](indicators/momentum/Indicator-Tsi.md) |
| `Pmo` | DecisionPoint Price Momentum Oscillator; doubly-smoothed rate of change. | `f64` | `f64` | unbounded around zero | `(smoothing1=35, smoothing2=20)` (Python) | `2` | [Indicator-Pmo.md](indicators/momentum/Indicator-Pmo.md) |
| `Ppo` | Percentage Price Oscillator; `100·(EMA_fast EMA_slow)/EMA_slow`. | `f64` | `f64` | unbounded around zero (percent) | `(fast=12, slow=26)` (Python) | `slow` | [Indicator-Ppo.md](indicators/momentum/Indicator-Ppo.md) |
| `Dpo` | Detrended Price Oscillator; `price[t period/2 1] SMA(period)`. | `f64` | `f64` | unbounded around zero | `period = 20` (Python) | `max(period, period/2 + 2)` | [Indicator-Dpo.md](indicators/momentum/Indicator-Dpo.md) |
| `Coppock` | Coppock Curve; `WMA(ROC(long) + ROC(short), wma_period)`. | `f64` | `f64` | unbounded around zero | `(roc_long=14, roc_short=11, wma_period=10)` (Python) | `max(roc_long, roc_short) + wma_period` | [Indicator-Coppock.md](indicators/momentum/Indicator-Coppock.md) |
### Directional
Difference-of-averages and intrabar oscillators that swing around a zero line.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Adx` | Wilder's directional system: `+DI`, `DI` (each `[0, 100]`) and `ADX` trend-strength index. | `Candle` | `(plus_di, minus_di, adx)` | each in `[0, 100]` | `period = 14` (Python) | `2·period` | [Indicator-Adx.md](indicators/momentum/Indicator-Adx.md) |
| `AroonOscillator` | `AroonUp AroonDown`; the two Aroon lines as one trend gauge. | `Candle` | `f64` | `[100, 100]` | `period = 14` (Python) | `period + 1` | [Indicator-AroonOscillator.md](indicators/momentum/Indicator-AroonOscillator.md) |
| `Vortex` | Vortex Indicator `VI+` / `VI`; crossings mark trend onset. | `Candle` | `(plus, minus)` | each `>= 0` | `period = 14` (Python) | `period + 1` | [Indicator-Vortex.md](indicators/momentum/Indicator-Vortex.md) |
| `MassIndex` | Dorsey's range-expansion sum of the EMA-of-range ratio. | `Candle` | `f64` | `> 0` (around `sum_period`) | `(ema_period=9, sum_period=25)` (Python) | `2·ema_period + sum_period 2` | [Indicator-MassIndex.md](indicators/momentum/Indicator-MassIndex.md) |
| `Ppo` | Percentage Price Oscillator; `100·(EMA_fast EMA_slow)/EMA_slow`. | `f64` | `f64` | unbounded around zero (percent) | `(fast=12, slow=26)` (Python) | `slow` | [Indicator-Ppo.md](indicators/price-oscillators/Indicator-Ppo.md) |
| `Dpo` | Detrended Price Oscillator; `price[t period/2 1] SMA(period)`. | `f64` | `f64` | unbounded around zero | `period = 20` (Python) | `max(period, period/2 + 2)` | [Indicator-Dpo.md](indicators/price-oscillators/Indicator-Dpo.md) |
| `Coppock` | Coppock Curve; `WMA(ROC(long) + ROC(short), wma_period)`. | `f64` | `f64` | unbounded around zero | `(roc_long=14, roc_short=11, wma_period=10)` (Python) | `max(roc_long, roc_short) + wma_period` | [Indicator-Coppock.md](indicators/price-oscillators/Indicator-Coppock.md) |
| `AcceleratorOscillator` | `AO SMA(AO, signal)`; the acceleration of momentum. | `Candle` | `f64` | unbounded around zero | `(ao_fast=5, ao_slow=34, signal_period=5)` (Python) | `ao_slow + signal_period 1` | [Indicator-AcceleratorOscillator.md](indicators/price-oscillators/Indicator-AcceleratorOscillator.md) |
| `BalanceOfPower` | `(close open) / (high low)`; intrabar buyer/seller control. | `Candle` | `f64` | `[1, +1]` | (no parameters) | `1` | [Indicator-BalanceOfPower.md](indicators/price-oscillators/Indicator-BalanceOfPower.md) |
## Volatility
## Volatility & Bands
Volatility indicators sit in three functional groups: those that draw an
envelope around price, those that report a scalar dispersion/range, and a
set of trailing stops — ATR-driven stop-loss trackers rather than width
measures — that live in the volatility module by source convention.
### Envelopes
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-------------------|-----------|-------|--------|-------|----------|--------|-----------|
| `BollingerBands` | SMA middle band with `±multiplier × population_stddev` upper/lower bands. | `f64` | `(upper, middle, lower, stddev)` | unbounded (price scale) | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-BollingerBands.md](indicators/volatility/Indicator-BollingerBands.md) |
| `Keltner` | EMA middle band with `±multiplier × ATR` upper/lower bands. | `Candle` | `(upper, middle, lower)` | unbounded (price scale) | `(ema_period=20, atr_period=10, multiplier=2.0)` (Python) | `max(ema_period, atr_period)` | [Indicator-Keltner.md](indicators/volatility/Indicator-Keltner.md) |
| `Donchian` | Highest high and lowest low over `period` bars; middle = mean of the two. | `Candle` | `(upper, middle, lower)` | unbounded (price scale) | `period = 20` (Python) | `period` | [Indicator-Donchian.md](indicators/volatility/Indicator-Donchian.md) |
| `BollingerBandwidth` | `(upper lower) / middle` of the Bollinger Bands; the "squeeze" gauge. | `f64` | `f64` | `[0, ∞)` | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-BollingerBandwidth.md](indicators/volatility/Indicator-BollingerBandwidth.md) |
| `PercentB` | `(price lower) / (upper lower)`; price position within the bands. | `f64` | `f64` | unbounded (`0``1` inside the bands) | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-PercentB.md](indicators/volatility/Indicator-PercentB.md) |
### Range-average
Indicators that measure dispersion / range and those that draw an envelope
around price.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Atr` | Wilder-smoothed True Range; per-bar absolute volatility. | `Candle` | `f64` | `[0, ∞)` (price scale) | `period = 14` (Python) | `period` | [Indicator-Atr.md](indicators/volatility/Indicator-Atr.md) |
| `Natr` | `100·ATR/close`; ATR as a percentage, comparable across instruments. | `Candle` | `f64` | `[0, ∞)` (percent) | `period = 14` (Python) | `period` | [Indicator-Natr.md](indicators/volatility/Indicator-Natr.md) |
| `StdDev` | Rolling population standard deviation of price. | `f64` | `f64` | `[0, ∞)` (price scale) | `period = 20` (Python) | `period` | [Indicator-StdDev.md](indicators/volatility/Indicator-StdDev.md) |
| `UlcerIndex` | RMS of trailing-high drawdowns; downside-only risk. | `f64` | `f64` | `[0, ∞)` (percent) | `period = 14` (Python) | `period 1` | [Indicator-UlcerIndex.md](indicators/volatility/Indicator-UlcerIndex.md) |
| `HistoricalVolatility` | Annualised sample stddev of log returns. | `f64` | `f64` | `[0, ∞)` (annualised percent) | `(period=20, trading_periods=252)` (Python) | `period + 1` | [Indicator-HistoricalVolatility.md](indicators/volatility/Indicator-HistoricalVolatility.md) |
| `Atr` | Wilder-smoothed True Range; per-bar absolute volatility. | `Candle` | `f64` | `[0, ∞)` (price scale) | `period = 14` (Python) | `period` | [Indicator-Atr.md](indicators/volatility-bands/Indicator-Atr.md) |
| `BollingerBands` | SMA middle band with `±multiplier × population_stddev` bands. | `f64` | `(upper, middle, lower, stddev)` | unbounded (price scale) | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-BollingerBands.md](indicators/volatility-bands/Indicator-BollingerBands.md) |
| `Keltner` | EMA middle band with `±multiplier × ATR` bands. | `Candle` | `(upper, middle, lower)` | unbounded (price scale) | `(ema_period=20, atr_period=10, multiplier=2.0)` (Python) | `max(ema_period, atr_period)` | [Indicator-Keltner.md](indicators/volatility-bands/Indicator-Keltner.md) |
| `Donchian` | Highest high and lowest low over `period` bars. | `Candle` | `(upper, middle, lower)` | unbounded (price scale) | `period = 20` (Python) | `period` | [Indicator-Donchian.md](indicators/volatility-bands/Indicator-Donchian.md) |
| `Natr` | `100·ATR/close`; ATR as a percentage. | `Candle` | `f64` | `[0, ∞)` (percent) | `period = 14` (Python) | `period` | [Indicator-Natr.md](indicators/volatility-bands/Indicator-Natr.md) |
| `StdDev` | Rolling population standard deviation of price. | `f64` | `f64` | `[0, ∞)` (price scale) | `period = 20` (Python) | `period` | [Indicator-StdDev.md](indicators/volatility-bands/Indicator-StdDev.md) |
| `UlcerIndex` | RMS of trailing-high drawdowns; downside-only risk. | `f64` | `f64` | `[0, ∞)` (percent) | `period = 14` (Python) | `2·period 1` | [Indicator-UlcerIndex.md](indicators/volatility-bands/Indicator-UlcerIndex.md) |
| `HistoricalVolatility` | Annualised sample stddev of log returns. | `f64` | `f64` | `[0, ∞)` (annualised percent) | `(period=20, trading_periods=252)` (Python) | `period + 1` | [Indicator-HistoricalVolatility.md](indicators/volatility-bands/Indicator-HistoricalVolatility.md) |
| `BollingerBandwidth` | `(upper lower) / middle` of the Bollinger Bands. | `f64` | `f64` | `[0, ∞)` | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-BollingerBandwidth.md](indicators/volatility-bands/Indicator-BollingerBandwidth.md) |
| `PercentB` | `(price lower) / (upper lower)`; price position in the bands. | `f64` | `f64` | unbounded (`0``1` inside) | `(period=20, multiplier=2.0)` (Python) | `period` | [Indicator-PercentB.md](indicators/volatility-bands/Indicator-PercentB.md) |
| `TrueRange` | `max(HL, |HprevC|, |LprevC|)`; raw single-bar volatility. | `Candle` | `f64` | `[0, ∞)` (price scale) | (no parameters) | `1` | [Indicator-TrueRange.md](indicators/volatility-bands/Indicator-TrueRange.md) |
| `ChaikinVolatility` | Rate of change of an EMA-smoothed high-low spread. | `Candle` | `f64` | unbounded around zero (percent) | `(ema_period=10, roc_period=10)` (Python) | `ema_period + roc_period` | [Indicator-ChaikinVolatility.md](indicators/volatility-bands/Indicator-ChaikinVolatility.md) |
### Trailing stop
## Trailing Stops
ATR-driven stop-loss trackers: per-bar levels that follow a trend and flip
when price closes through them.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `Psar` | Wilder's Parabolic Stop-and-Reverse; per-bar stop level that flips sides on price crossing. | `Candle` | `f64` | unbounded (price scale) | `(af_start=0.02, af_step=0.02, af_max=0.20)` (Python) | `2` | [Indicator-Psar.md](indicators/volatility/Indicator-Psar.md) |
| `SuperTrend` | ATR-banded trailing stop that flips on a close through the band; reports the line and the trend direction. | `Candle` | `(value, direction)` | `value` price scale; `direction` `±1` | `(atr_period=10, multiplier=3.0)` (Python) | `atr_period` | [Indicator-SuperTrend.md](indicators/volatility/Indicator-SuperTrend.md) |
| `ChandelierExit` | `highest_high k·ATR` (long stop) and `lowest_low + k·ATR` (short stop). | `Candle` | `(long_stop, short_stop)` | unbounded (price scale) | `(period=22, multiplier=3.0)` (Python) | `period` | [Indicator-ChandelierExit.md](indicators/volatility/Indicator-ChandelierExit.md) |
| `ChandeKrollStop` | Two-stage ATR stop: an extreme-based stop, then smoothed over a shorter window. | `Candle` | `(stop_long, stop_short)` | unbounded (price scale) | `(atr_period=10, atr_multiplier=1.0, stop_period=9)` (Python) | `atr_period + stop_period 1` | [Indicator-ChandeKrollStop.md](indicators/volatility/Indicator-ChandeKrollStop.md) |
| `AtrTrailingStop` | A single line trailing the close by `k·ATR`, ratcheting toward the trend and flipping on a cross. | `Candle` | `f64` | unbounded (price scale) | `(atr_period=14, multiplier=3.0)` (Python) | `atr_period` | [Indicator-AtrTrailingStop.md](indicators/volatility/Indicator-AtrTrailingStop.md) |
| `Psar` | Wilder's Parabolic Stop-and-Reverse; flips sides on a crossing. | `Candle` | `f64` | unbounded (price scale) | `(af_start=0.02, af_step=0.02, af_max=0.20)` (Python) | `2` | [Indicator-Psar.md](indicators/trailing-stops/Indicator-Psar.md) |
| `SuperTrend` | ATR-banded trailing stop with explicit flip logic. | `Candle` | `(value, direction)` | `value` price scale; `direction` `±1` | `(atr_period=10, multiplier=3.0)` (Python) | `atr_period` | [Indicator-SuperTrend.md](indicators/trailing-stops/Indicator-SuperTrend.md) |
| `ChandelierExit` | `highest_high k·ATR` (long) and `lowest_low + k·ATR` (short). | `Candle` | `(long_stop, short_stop)` | unbounded (price scale) | `(period=22, multiplier=3.0)` (Python) | `period` | [Indicator-ChandelierExit.md](indicators/trailing-stops/Indicator-ChandelierExit.md) |
| `ChandeKrollStop` | Two-stage ATR stop: extreme-based, then smoothed. | `Candle` | `(stop_long, stop_short)` | unbounded (price scale) | `(atr_period=10, atr_multiplier=1.0, stop_period=9)` (Python) | `atr_period + stop_period 1` | [Indicator-ChandeKrollStop.md](indicators/trailing-stops/Indicator-ChandeKrollStop.md) |
| `AtrTrailingStop` | A single line trailing the close by `k·ATR`, ratcheting. | `Candle` | `f64` | unbounded (price scale) | `(atr_period=14, multiplier=3.0)` (Python) | `atr_period` | [Indicator-AtrTrailingStop.md](indicators/trailing-stops/Indicator-AtrTrailingStop.md) |
## Volume
Volume indicators all take `Candle` input because they need `close` and
`volume` together (some also need `high`/`low`).
### Cumulative
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|---------------|-----------|-------|--------|-------|----------|--------|-----------|
| `Obv` | On-Balance Volume: cumulative signed volume driven by close-vs-prior-close sign. | `Candle` | `f64` | unbounded (drifts with cumulative volume) | (no parameters) | `1` | [Indicator-Obv.md](indicators/volume/Indicator-Obv.md) |
| `Vwap` | Cumulative volume-weighted average price from the start of the stream (intraday reset is your responsibility). | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-Vwap.md](indicators/volume/Indicator-Vwap.md) |
| `Adl` | Accumulation/Distribution Line; cumulative range-weighted volume. | `Candle` | `f64` | unbounded (drifts with volume) | (no parameters) | `1` | [Indicator-Adl.md](indicators/volume/Indicator-Adl.md) |
| `VolumePriceTrend` | Cumulative `volume · ROC`; volume flow weighted by percentage move. | `Candle` | `f64` | unbounded (drifts with volume) | (no parameters) | `1` | [Indicator-VolumePriceTrend.md](indicators/volume/Indicator-VolumePriceTrend.md) |
### Rolling
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|---------------|-----------|-------|--------|-------|----------|--------|-----------|
| `RollingVwap` | VWAP over a sliding window instead of since-start; useful for session-independent VWAP. | `Candle` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Vwap.md → RollingVwap](indicators/volume/Indicator-Vwap.md#rollingvwap-finite-window) |
### Oscillators
Volume-flow oscillators: bounded or zero-centred readings derived from where
price closes within each bar and how much volume backed the move.
Price moves weighted or confirmed by traded volume. All take `Candle` input.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `ChaikinMoneyFlow` | Summed money-flow volume divided by summed volume over `period` bars. | `Candle` | `f64` | `[1, +1]` | `period = 20` (Python) | `period` | [Indicator-ChaikinMoneyFlow.md](indicators/volume/Indicator-ChaikinMoneyFlow.md) |
| `Obv` | On-Balance Volume: cumulative signed volume. | `Candle` | `f64` | unbounded (drifts with volume) | (no parameters) | `1` | [Indicator-Obv.md](indicators/volume/Indicator-Obv.md) |
| `Vwap` | Cumulative volume-weighted average price from the stream start. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-Vwap.md](indicators/volume/Indicator-Vwap.md) |
| `RollingVwap` | VWAP over a sliding window instead of since-start. | `Candle` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Vwap.md → RollingVwap](indicators/volume/Indicator-Vwap.md#rollingvwap-finite-window) |
| `Adl` | Accumulation/Distribution Line; cumulative range-weighted volume. | `Candle` | `f64` | unbounded (drifts with volume) | (no parameters) | `1` | [Indicator-Adl.md](indicators/volume/Indicator-Adl.md) |
| `VolumePriceTrend` | Cumulative `volume · ROC`; volume weighted by percentage move. | `Candle` | `f64` | unbounded (drifts with volume) | (no parameters) | `1` | [Indicator-VolumePriceTrend.md](indicators/volume/Indicator-VolumePriceTrend.md) |
| `ChaikinMoneyFlow` | Summed money-flow volume over summed volume across `period` bars. | `Candle` | `f64` | `[1, +1]` | `period = 20` (Python) | `period` | [Indicator-ChaikinMoneyFlow.md](indicators/volume/Indicator-ChaikinMoneyFlow.md) |
| `ChaikinOscillator` | `EMA(ADL, fast) EMA(ADL, slow)`; the MACD of the ADL. | `Candle` | `f64` | unbounded around zero | `(fast=3, slow=10)` (Python) | `slow` | [Indicator-ChaikinOscillator.md](indicators/volume/Indicator-ChaikinOscillator.md) |
| `ForceIndex` | `EMA((close prev_close) · volume, period)`; the conviction behind a move. | `Candle` | `f64` | unbounded around zero | `period = 13` (Python) | `period + 1` | [Indicator-ForceIndex.md](indicators/volume/Indicator-ForceIndex.md) |
| `EaseOfMovement` | `SMA` of distance travelled per unit of volume. | `Candle` | `f64` | unbounded around zero | `(period=14, divisor=1e8)` (Python) | `period + 1` | [Indicator-EaseOfMovement.md](indicators/volume/Indicator-EaseOfMovement.md) |
| `ForceIndex` | `EMA((close prev_close) · volume, period)`. | `Candle` | `f64` | unbounded around zero | `period = 13` (Python) | `period + 1` | [Indicator-ForceIndex.md](indicators/volume/Indicator-ForceIndex.md) |
| `EaseOfMovement` | `SMA` of distance travelled per unit of volume. | `Candle` | `f64` | unbounded around zero | `(period=14, divisor=1e8)` (Python) | `period + 1` | [Indicator-EaseOfMovement.md](indicators/volume/Indicator-EaseOfMovement.md) |
## Statistics
## Price Statistics
Price transforms and rolling regressions. The transforms collapse a full
OHLC bar to a single representative price; the regressions fit a
least-squares line to a sliding window of prices.
### Price transforms
Stateless per-bar reductions of an OHLC candle to one price. Each emits from
the very first candle (`warmup = 1`).
Per-bar price transforms and rolling least-squares regressions.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `TypicalPrice` | `(high + low + close) / 3`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-TypicalPrice.md](indicators/statistics/Indicator-TypicalPrice.md) |
| `MedianPrice` | `(high + low) / 2`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-MedianPrice.md](indicators/statistics/Indicator-MedianPrice.md) |
| `WeightedClose` | `(high + low + 2·close) / 4`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-WeightedClose.md](indicators/statistics/Indicator-WeightedClose.md) |
### Regression
Rolling ordinary-least-squares fits over the last `period` prices.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive |
|-----------|-----------|-------|--------|-------|----------|--------|-----------|
| `LinearRegression` | Endpoint of the rolling least-squares line — a low-lag smoothed price. | `f64` | `f64` | unbounded (price scale) | `period = 14` (Python) | `period` | [Indicator-LinearRegression.md](indicators/statistics/Indicator-LinearRegression.md) |
| `LinRegSlope` | Slope of the rolling least-squares line — trend steepness per bar. | `f64` | `f64` | unbounded around zero | `period = 14` (Python) | `period` | [Indicator-LinRegSlope.md](indicators/statistics/Indicator-LinRegSlope.md) |
| `TypicalPrice` | `(high + low + close) / 3`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-TypicalPrice.md](indicators/price-statistics/Indicator-TypicalPrice.md) |
| `MedianPrice` | `(high + low) / 2`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-MedianPrice.md](indicators/price-statistics/Indicator-MedianPrice.md) |
| `WeightedClose` | `(high + low + 2·close) / 4`. | `Candle` | `f64` | unbounded (price scale) | (no parameters) | `1` | [Indicator-WeightedClose.md](indicators/price-statistics/Indicator-WeightedClose.md) |
| `LinearRegression` | Endpoint of the rolling least-squares line. | `f64` | `f64` | unbounded (price scale) | `period = 14` (Python) | `period` | [Indicator-LinearRegression.md](indicators/price-statistics/Indicator-LinearRegression.md) |
| `LinRegSlope` | Slope of the rolling least-squares line. | `f64` | `f64` | unbounded around zero | `period = 14` (Python) | `period` | [Indicator-LinRegSlope.md](indicators/price-statistics/Indicator-LinRegSlope.md) |
| `ZScore` | `(price SMA(n)) / population_stddev(n)`. | `f64` | `f64` | unbounded around zero | `period = 20` (Python) | `period` | [Indicator-ZScore.md](indicators/price-statistics/Indicator-ZScore.md) |
| `LinRegAngle` | The rolling regression slope as a degree angle. | `f64` | `f64` | `(90°, +90°)` | `period = 14` (Python) | `period` | [Indicator-LinRegAngle.md](indicators/price-statistics/Indicator-LinRegAngle.md) |
## Pick the right indicator for…
A short cheat-sheet of "I want X, which indicator?" answers, grounded in
what each indicator actually computes.
- **Fast trend filter, minimal lag, single line.** `Hma` for smoothness +
responsiveness, `Tema` for further lag reduction at the cost of more
noise. If you want adaptiveness instead of fixed lag, `Kama`.
- **Slow trend filter, smooth as glass.** `Sma` is the simplest; `Ema`
responds slightly faster with the same smoothness budget. For long
trend filters either is appropriate; the difference is mostly aesthetic.
- **Trend-following crossovers.** Two-line crossovers (`Ema(fast)` vs
`Ema(slow)`, or any of the trend pairs) are the textbook entry signal;
`MacdIndicator` packages the same idea with a signal line and histogram.
- **Trend strength (is there a trend at all?).** `Adx` is the canonical
answer: `adx > 25` is "trending", `adx < 20` is "ranging". `Aroon` is
a softer alternative when you want directional confirmation.
- **Overbought / oversold reversal candidate.** `Rsi` is the default;
`Stochastic` for faster signals; `WilliamsR` for the same logic with an
inverted scale; `Mfi` if you have volume and want a volume-aware RSI.
- **Volatility expansion / contraction.** `BollingerBands` width
(`upper lower`) for relative volatility; `Atr` for absolute per-bar
volatility in price units; `Keltner` to compare price against an
ATR-scaled envelope.
- **Breakout level.** `Donchian` upper/lower bands are the textbook
Turtle-style breakout trigger.
- **Trailing stop.** `Psar` gives you a per-bar stop level that flips
sides as the trend reverses. `Atr · k` (compute `Atr` yourself, multiply
by your preferred `k`) is the common alternative.
- **Volume confirmation.** `Obv` is the simplest; `Mfi` adds price into
the equation; `Vwap` / `RollingVwap` give you the volume-weighted
reference price.
- **Bill Williams setups.** `AwesomeOscillator` for the zero-line cross /
twin-peaks pattern from his suite.
- **Rate-of-change scalar.** `Roc` is the unsmoothed percentage change;
`Trix` is the same idea but on a triple-smoothed EMA.
- **Fast trend filter, minimal lag.** `Hma` for smoothness + responsiveness,
`Tema` for further lag reduction at the cost of noise, `Kama` for
adaptiveness instead of fixed lag.
- **Slow trend filter.** `Sma` is the simplest; `Ema` responds slightly
faster with the same smoothness budget.
- **Trend-following crossovers.** Two-line crossovers are the textbook entry;
`MacdIndicator` packages the idea with a signal line and histogram.
- **Trend strength — is there a trend at all?** `Adx` (`> 25` trending,
`< 20` ranging); `ChoppinessIndex` / `VerticalHorizontalFilter` answer the
same question without a direction.
- **Overbought / oversold.** `Rsi` is the default; `Stochastic` for faster
signals; `WilliamsR` for an inverted scale; `Mfi` for a volume-aware RSI.
- **Volatility level vs. momentum.** `Atr` / `TrueRange` for the level;
`ChaikinVolatility` for whether ranges are expanding or contracting.
- **Breakout level.** `Donchian` upper/lower bands are the Turtle-style
trigger.
- **Trailing stop.** `Psar`, `SuperTrend`, `ChandelierExit`,
`ChandeKrollStop` and `AtrTrailingStop` are a whole family of them.
- **Volume confirmation.** `Obv` is the simplest; `ChaikinMoneyFlow` is a
bounded balance; `Vwap` / `RollingVwap` give a volume-weighted reference.
- **Mean reversion.** `ZScore` flags statistically stretched prices;
`BollingerBandwidth` / `PercentB` locate price within the bands.
## Source-of-truth files
Every claim above can be checked against the source in
[`crates/wickra-core/src/indicators/`](https://github.com/kingchenc/wickra/tree/main/crates/wickra-core/src/indicators)
— one file per indicator. The Rust unit tests inside each module are the
ground truth for sample values. Python defaults (the `period = 14` etc. in
tables above) come from the `#[pyo3(signature = …)]` attributes in
ground truth for sample values. Python defaults (the `period = 14` etc.) come
from the `#[pyo3(signature = …)]` attributes in
[`bindings/python/src/lib.rs`](https://github.com/kingchenc/wickra/blob/main/bindings/python/src/lib.rs);
indicators not listed with a Python default require an explicit `period`
argument.
indicators without a Python default require an explicit argument.
## See also
- [Warmup Periods](Warmup-Periods.md) — full verified table of every
indicator's `warmup_period()`.
- [Warmup Periods](Warmup-Periods.md) — verified table of every indicator's
`warmup_period()`.
- [Indicator Chaining](Indicator-Chaining.md) — combining indicators with
`Chain` and the stacked-warmup rule.
- [Quickstart: Rust](Quickstart-Rust.md), [Quickstart: Python](Quickstart-Python.md),
+8
View File
@@ -76,6 +76,14 @@ index" in 0-indexed terms is `warmup_period 1`.
| `WeightedClose` | `WeightedClose::new()` | constant `1` | 1 | 1st |
| `LinearRegression` | `LinearRegression::new(14)` | `period` | 14 | 14th |
| `LinRegSlope` | `LinRegSlope::new(14)` | `period` | 14 | 14th |
| `AcceleratorOscillator` | `AcceleratorOscillator::classic()` | `ao_slow + signal_period - 1` | 38 | 38th |
| `BalanceOfPower` | `BalanceOfPower::new()` | constant `1` | 1 | 1st |
| `ChoppinessIndex` | `ChoppinessIndex::new(14)` | `period` | 14 | 14th |
| `VerticalHorizontalFilter` | `VerticalHorizontalFilter::new(28)` | `period + 1` | 29 | 29th |
| `TrueRange` | `TrueRange::new()` | constant `1` | 1 | 1st |
| `ChaikinVolatility` | `ChaikinVolatility::new(10, 10)` | `ema_period + roc_period` | 20 | 20th |
| `ZScore` | `ZScore::new(20)` | `period` | 20 | 20th |
| `LinRegAngle` | `LinRegAngle::new(14)` | `period` | 14 | 14th |
## Multi-output indicators
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | unbounded oscillator (zero-centred) |
| Family | Momentum Oscillators |
| Input type | `Candle` |
| Output type | `f64` |
| Output range | unbounded (centred on 0; in price-difference units) |
@@ -189,8 +188,8 @@ row 39: 14.5
## See also
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — sister
- [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — sister
oscillator on closes (with an extra signal line on top).
- [Indicator: Trix](Indicator-Trix.md) — momentum oscillator on a
- [Indicator: Trix](../trend-directional/Indicator-Trix.md) — momentum oscillator on a
triple-smoothed series.
- [Warmup Periods](../../Warmup-Periods.md) — bare `slow_period`.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | unbounded oscillator |
| Family | Momentum Oscillators |
| Input type | `Candle` |
| Output type | `f64` |
| Output range | unbounded (typically `[200, +200]` thanks to the 0.015 factor) |
@@ -191,9 +190,9 @@ row 24: 126.66666666666667
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — bounded sibling for comparison.
- [Indicator: WilliamsR](Indicator-WilliamsR.md) — another candle-input
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — bounded sibling for comparison.
- [Indicator: WilliamsR](../momentum-oscillators/Indicator-WilliamsR.md) — another candle-input
oscillator, range-based rather than deviation-based.
- [Indicator: Mfi](Indicator-Mfi.md) — volume-weighted RSI; useful as a
- [Indicator: Mfi](../momentum-oscillators/Indicator-Mfi.md) — volume-weighted RSI; useful as a
confirmation alongside CCI.
- [Warmup Periods](../../Warmup-Periods.md) — `period` (no off-by-one).
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Bounded oscillators (100 … 100) |
| Family | Momentum Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[100, 100]` |
@@ -151,6 +150,6 @@ gain/loss sum here matches the original definition and TA-Lib's `CMO`.
## See also
- [Indicator-Rsi.md](Indicator-Rsi.md) — the Wilder-smoothed relative.
- [Indicator-Mom.md](Indicator-Mom.md) — raw price-difference momentum.
- [Indicator-Rsi.md](../momentum-oscillators/Indicator-Rsi.md) — the Wilder-smoothed relative.
- [Indicator-Mom.md](../momentum-oscillators/Indicator-Mom.md) — raw price-difference momentum.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | bounded oscillator (volume-driven) |
| Family | Momentum Oscillators |
| Input type | `Candle` (volume needed) |
| Output type | `f64` |
| Output range | `[0, 100]` |
@@ -198,7 +197,7 @@ row 19: 100
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — the price-only ancestor.
- [Indicator: Adx](Indicator-Adx.md) — directional/trend strength to
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — the price-only ancestor.
- [Indicator: Adx](../trend-directional/Indicator-Adx.md) — directional/trend strength to
pair with MFI's overbought/oversold reading.
- [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one).
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Momentum Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded around zero (price-difference scale) |
@@ -24,7 +23,7 @@ MOM_t = price_t price_{tperiod}
The simplest momentum primitive. Positive output means price is higher
than it was `period` bars ago, negative means lower, and the magnitude is
the change in raw price units. [`Roc`](Indicator-Roc.md) is the same idea
the change in raw price units. [`Roc`](../momentum-oscillators/Indicator-Roc.md) is the same idea
expressed as a percentage of the old price.
## Parameters
@@ -128,7 +127,7 @@ Output:
cross (momentum flipping sign) and divergence (price making a new high
while `Mom` makes a lower high — a stalling trend). Because the output is
in price units, `Mom` values are not comparable across instruments at
different price levels; use [`Roc`](Indicator-Roc.md) when you need a
different price levels; use [`Roc`](../momentum-oscillators/Indicator-Roc.md) when you need a
scale-free percentage instead.
## Common pitfalls
@@ -147,6 +146,6 @@ is the standard `price price[period]` difference, matching TA-Lib's
## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the percentage-scaled counterpart.
- [Indicator-Cmo.md](Indicator-Cmo.md) — bounded momentum from summed changes.
- [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the percentage-scaled counterpart.
- [Indicator-Cmo.md](../momentum-oscillators/Indicator-Cmo.md) — bounded momentum from summed changes.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Momentum Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded around zero |
@@ -31,7 +30,7 @@ scaled by `10`, then smoothed again.
The classic PMO **signal line** is a 10-period EMA of this PMO line. It is
deliberately not bundled in — compose it yourself with
[`Chain`](../Indicator-Chaining.md) and an `Ema(10)`.
[`Chain`](../../Indicator-Chaining.md) and an `Ema(10)`.
## Parameters
@@ -144,7 +143,7 @@ crossing its zero line (momentum changing sign), PMO crossing its signal
line (a 10-EMA of PMO — build it with `Chain`), and PMO turning up/down
from an extreme. Because the rate of change is taken in percentage terms,
PMO values *are* comparable across instruments — unlike raw
[`Mom`](Indicator-Mom.md).
[`Mom`](../momentum-oscillators/Indicator-Mom.md).
## Common pitfalls
@@ -162,9 +161,9 @@ Carl Swenlin, DecisionPoint Price Momentum Oscillator. The
## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the raw rate of change PMO smooths.
- [Indicator-Tsi.md](Indicator-Tsi.md) — another double-smoothed momentum
- [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the raw rate of change PMO smooths.
- [Indicator-Tsi.md](../momentum-oscillators/Indicator-Tsi.md) — another double-smoothed momentum
oscillator.
- [Indicator-Chaining.md](../Indicator-Chaining.md) — how to add the
- [Indicator-Chaining.md](../../Indicator-Chaining.md) — how to add the
signal-line EMA.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | unbounded oscillator |
| Family | Momentum Oscillators |
| Input type | `f64` (close) |
| Output type | `f64` |
| Output range | unbounded (centred on 0; expressed as a percent) |
@@ -164,10 +163,10 @@ warmup: 4
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — same `period + 1` warmup, but
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — same `period + 1` warmup, but
bounded.
- [Indicator: Trix](Indicator-Trix.md) — also a rate of change, but on
- [Indicator: Trix](../trend-directional/Indicator-Trix.md) — also a rate of change, but on
a triple-smoothed EMA.
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — momentum
- [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — momentum
cousin operating on EMA differences instead of raw close differences.
- [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | bounded oscillator |
| Family | Momentum Oscillators |
| Input type | `f64` (close) |
| Output type | `f64` |
| Output range | `[0, 100]` |
@@ -204,9 +203,9 @@ last : 57.91502067008556
## See also
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — also momentum,
- [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — also momentum,
but trend-following and unbounded.
- [Indicator: Stochastic](Indicator-Stochastic.md) — sibling bounded
- [Indicator: Stochastic](../momentum-oscillators/Indicator-Stochastic.md) — sibling bounded
oscillator, faster and noisier than RSI.
- [Warmup Periods](../../Warmup-Periods.md) — the canonical `period + 1`
off-by-one explained.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Bounded oscillators (0 … 100) |
| Family | Momentum Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[0, 100]` |
@@ -155,11 +154,11 @@ it further (an SMA of StochRSI) and trade the crossover.
Tushar Chande and Stanley Kroll, *The New Technical Trader* (1994). The
implementation is the standard Stochastic-of-RSI; the flat-window
convention (`50`) matches this library's [`Stochastic`](Indicator-Stochastic.md).
convention (`50`) matches this library's [`Stochastic`](../momentum-oscillators/Indicator-Stochastic.md).
## See also
- [Indicator-Rsi.md](Indicator-Rsi.md) — the underlying oscillator.
- [Indicator-Stochastic.md](Indicator-Stochastic.md) — the same formula on
- [Indicator-Rsi.md](../momentum-oscillators/Indicator-Rsi.md) — the underlying oscillator.
- [Indicator-Stochastic.md](../momentum-oscillators/Indicator-Stochastic.md) — the same formula on
price instead of RSI.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -13,8 +13,7 @@ a `Chain` with `Sma::new(slow_period)`.
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | bounded oscillator |
| Family | Momentum Oscillators |
| Input type | `Candle` |
| Output type | `StochasticOutput { k, d }` |
| Output range | `k, d ∈ [0, 100]` |
@@ -212,9 +211,9 @@ row 19 : { k: 47.26766986190959, d: 62.55762656278284 }
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — sister bounded oscillator, slower
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — sister bounded oscillator, slower
and smoother than `%K`.
- [Indicator: WilliamsR](Indicator-WilliamsR.md) — the negated mirror of
- [Indicator: WilliamsR](../momentum-oscillators/Indicator-WilliamsR.md) — the negated mirror of
fast `%K`, plotted on `[100, 0]`.
- [Warmup Periods](../../Warmup-Periods.md) — `k_period + d_period 1` rule
in context.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Momentum Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | roughly `[100, 100]`, centred on zero |
@@ -154,7 +153,7 @@ The double-EMA-of-momentum definition here follows Blau's original.
## See also
- [Indicator-Mom.md](Indicator-Mom.md) — the raw momentum TSI smooths.
- [Indicator-MacdIndicator.md](Indicator-MacdIndicator.md) — another
- [Indicator-Mom.md](../momentum-oscillators/Indicator-Mom.md) — the raw momentum TSI smooths.
- [Indicator-MacdIndicator.md](../trend-directional/Indicator-MacdIndicator.md) — another
EMA-difference momentum oscillator with a signal line.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Bounded oscillators (0 … 100) |
| Family | Momentum Oscillators |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | `[0, 100]` |
@@ -173,7 +172,7 @@ Larry Williams, "The Ultimate Oscillator", *Technical Analysis of Stocks
## See also
- [Indicator-Stochastic.md](Indicator-Stochastic.md) — single-timeframe
- [Indicator-Stochastic.md](../momentum-oscillators/Indicator-Stochastic.md) — single-timeframe
bounded oscillator.
- [Indicator-Rsi.md](Indicator-Rsi.md) — the canonical momentum oscillator.
- [Indicator-Rsi.md](../momentum-oscillators/Indicator-Rsi.md) — the canonical momentum oscillator.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | bounded oscillator |
| Family | Momentum Oscillators |
| Input type | `Candle` |
| Output type | `f64` |
| Output range | `[100, 0]` |
@@ -177,8 +176,8 @@ row 2: -0
## See also
- [Indicator: Stochastic](Indicator-Stochastic.md) — the positive-axis
- [Indicator: Stochastic](../momentum-oscillators/Indicator-Stochastic.md) — the positive-axis
sibling; `%R` and `%K` are linked by `%R = %K 100`.
- [Indicator: Rsi](Indicator-Rsi.md) — slower bounded oscillator,
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — slower bounded oscillator,
better behaved in trending markets.
- [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one).
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -208,7 +207,7 @@ Commodities**, February 1994 (TEMA).
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the building block.
- [Indicator-Tema.md](Indicator-Tema.md) — three-EMA version, less lag still.
- [Indicator-Hma.md](Indicator-Hma.md) — same lag-reduction goal, built on WMAs.
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the building block.
- [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — three-EMA version, less lag still.
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — same lag-reduction goal, built on WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -195,7 +194,7 @@ smoothing identity attributed to Robert Brown (1956).
## See also
- [Indicator-Sma.md](Indicator-Sma.md) — equal weights, identical seed.
- [Indicator-Dema.md](Indicator-Dema.md) — `2·EMA EMA(EMA)`.
- [Indicator-Tema.md](Indicator-Tema.md) — `3·EMA 3·EMA(EMA) + EMA(EMA(EMA))`.
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — equal weights, identical seed.
- [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — `2·EMA EMA(EMA)`.
- [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — `3·EMA 3·EMA(EMA) + EMA(EMA(EMA))`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Adaptive & hybrid |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -223,7 +222,7 @@ original HMA derivation, hosted on Hull's site at
## See also
- [Indicator-Wma.md](Indicator-Wma.md) — the building block.
- [Indicator-Tema.md](Indicator-Tema.md) — same lag-reduction goal, EMA-based.
- [Indicator-Kama.md](Indicator-Kama.md) — adaptive smoothing instead of fixed.
- [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — the building block.
- [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — same lag-reduction goal, EMA-based.
- [Indicator-Kama.md](../moving-averages/Indicator-Kama.md) — adaptive smoothing instead of fixed.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Adaptive & hybrid |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -244,8 +243,8 @@ empirically.
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the two endpoints (`fast` and
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the two endpoints (`fast` and
`slow`) KAMA interpolates between.
- [Indicator-Hma.md](Indicator-Hma.md) — the other "smart" trend filter in
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — the other "smart" trend filter in
Wickra.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Simple averages |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -177,8 +176,8 @@ and pandas (`rolling(period).mean()`).
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — same smoothness budget, less lag.
- [Indicator-Wma.md](Indicator-Wma.md) — linear weights instead of equal.
- [Indicator-Hma.md](Indicator-Hma.md) — built on three WMAs for near-zero
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — same smoothness budget, less lag.
- [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — linear weights instead of equal.
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — built on three WMAs for near-zero
lag.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -142,7 +141,7 @@ factor is `1 / period` rather than `2 / (period + 1)`, an `Smma(n)` is
roughly as smooth as an `Ema(2n 1)` — useful when you want maximum
noise rejection from a single line. Its main role in this library,
however, is structural: it is the exact smoothing kernel inside
[`Rsi`](../momentum/Indicator-Rsi.md) and [`Atr`](../volatility/Indicator-Atr.md),
[`Rsi`](../momentum-oscillators/Indicator-Rsi.md) and [`Atr`](../volatility-bands/Indicator-Atr.md),
so reaching for `Smma` directly lets you reproduce Wilder-style averages
on any series.
@@ -164,8 +163,8 @@ the standard SMA-seeded formulation, matching TA-Lib's `RMA`.
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — faster exponential average.
- [Indicator-Sma.md](Indicator-Sma.md) — the equal-weighted mean used as
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — faster exponential average.
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the equal-weighted mean used as
the SMMA seed.
- [Indicator-Trima.md](Indicator-Trima.md) — the other F1 average.
- [Indicator-Trima.md](../moving-averages/Indicator-Trima.md) — the other F1 average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -166,7 +165,7 @@ match Tillson's published derivation and TA-Lib's `T3`.
## See also
- [Indicator-Tema.md](Indicator-Tema.md) — the three-EMA relative.
- [Indicator-Dema.md](Indicator-Dema.md) — the two-EMA relative.
- [Indicator-Zlema.md](Indicator-Zlema.md) — low-lag average via de-lagging.
- [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — the three-EMA relative.
- [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — the two-EMA relative.
- [Indicator-Zlema.md](../moving-averages/Indicator-Zlema.md) — low-lag average via de-lagging.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -202,7 +201,7 @@ in the same article.
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the building block.
- [Indicator-Dema.md](Indicator-Dema.md) — second-order's sibling.
- [Indicator-Hma.md](Indicator-Hma.md) — similar lag profile, built on WMAs.
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the building block.
- [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — second-order's sibling.
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — similar lag profile, built on WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Simple averages |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -144,7 +143,7 @@ triangular weight profile damps the most recent bar far more than a plain
`Sma` does, so whipsaws are rare. The cost is lag — a `Trima(n)` lags
roughly like an `Sma(n/2)` doubled. Use it as a slow trend filter where a
clean, low-noise line matters more than fast reaction; prefer
[`Ema`](Indicator-Ema.md) or [`Hma`](Indicator-Hma.md) when responsiveness
[`Ema`](../moving-averages/Indicator-Ema.md) or [`Hma`](../moving-averages/Indicator-Hma.md) when responsiveness
matters.
## Common pitfalls
@@ -161,7 +160,7 @@ odd/even split used here (`n1`, `n2`) matches TA-Lib's `TRIMA`.
## See also
- [Indicator-Sma.md](Indicator-Sma.md) — the building block applied twice.
- [Indicator-Wma.md](Indicator-Wma.md) — linear (not triangular) weights.
- [Indicator-Smma.md](Indicator-Smma.md) — the other F1 average.
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the building block applied twice.
- [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — linear (not triangular) weights.
- [Indicator-Smma.md](../moving-averages/Indicator-Smma.md) — the other F1 average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Volume-weighted averages |
| Family | Moving Averages |
| Input type | `Candle` (uses `close` and `volume`) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -170,7 +169,7 @@ with an explicit zero-volume fallback added for robustness.
## See also
- [Indicator-Sma.md](Indicator-Sma.md) — the equal-weighted counterpart.
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the equal-weighted counterpart.
- [Indicator-Vwap.md](../volume/Indicator-Vwap.md) — volume-weighted price
since the start of the stream.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Simple averages |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -156,7 +155,7 @@ fast-WMA-vs-slow-WMA) apply.
The most important downstream use of `Wma` inside Wickra is `Hma`:
`Hma` is built entirely from three `Wma` instances (see
[Indicator-Hma.md](Indicator-Hma.md)).
[Indicator-Hma.md](../moving-averages/Indicator-Hma.md)).
## Common pitfalls
@@ -180,7 +179,7 @@ reference implementation and matches Wickra's output bit-for-bit.
## See also
- [Indicator-Sma.md](Indicator-Sma.md) — equal weights instead of linear.
- [Indicator-Ema.md](Indicator-Ema.md) — exponential decay instead of linear.
- [Indicator-Hma.md](Indicator-Hma.md) — Hull MA, built from three WMAs.
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — equal weights instead of linear.
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — exponential decay instead of linear.
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — Hull MA, built from three WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Trend |
| Sub-category | Exponential family |
| Family | Moving Averages |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded; tracks the input price scale |
@@ -161,7 +160,7 @@ of Stocks & Commodities* (2010). The implementation here uses the standard
## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the inner average ZLEMA de-lags.
- [Indicator-Hma.md](Indicator-Hma.md) — another low-lag average, via WMAs.
- [Indicator-T3.md](Indicator-T3.md) — low-lag average via a six-EMA cascade.
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the inner average ZLEMA de-lags.
- [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — another low-lag average, via WMAs.
- [Indicator-T3.md](../moving-averages/Indicator-T3.md) — low-lag average via a six-EMA cascade.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -22,7 +22,7 @@ AO = SMA(median, ao_fast) SMA(median, ao_slow) (the Awesome Oscillator)
AC = AO SMA(AO, signal_period)
```
Where the [`AwesomeOscillator`](Indicator-AwesomeOscillator.md) measures
Where the [`AwesomeOscillator`](../momentum-oscillators/Indicator-AwesomeOscillator.md) measures
momentum, the Accelerator measures the *change* in momentum — it is the AO
minus a short moving average of itself. Because acceleration leads speed, the
`AC` tends to turn before the `AO` does. Bill Williams' classic configuration
@@ -139,6 +139,6 @@ Bill Williams' Accelerator Oscillator, from *Trading Chaos*.
## See also
- [Indicator-AwesomeOscillator.md](Indicator-AwesomeOscillator.md) — the
- [Indicator-AwesomeOscillator.md](../momentum-oscillators/Indicator-AwesomeOscillator.md) — the
momentum oscillator the Accelerator is built on.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -133,6 +133,6 @@ Balance of Power, popularised by Igor Livshin; the `(close open) /
## See also
- [Indicator-AwesomeOscillator.md](Indicator-AwesomeOscillator.md) — another
- [Indicator-AwesomeOscillator.md](../momentum-oscillators/Indicator-AwesomeOscillator.md) — another
Bill Williams-era price oscillator.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Price Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded around zero |
@@ -24,7 +23,7 @@ Coppock = WMA( ROC(roc_long) + ROC(roc_short), wma_period )
Edwin Coppock built this in 1962 as a long-horizon buy signal for stock
indices. The two rates of change blend a slightly longer and a slightly
shorter momentum horizon; the [`Wma`](../trend/Indicator-Wma.md) smooths
shorter momentum horizon; the [`Wma`](../moving-averages/Indicator-Wma.md) smooths
their sum. On a **monthly** chart with the conventional
`(14, 11, 10)` settings, the curve turning *up from below zero* has
historically marked the start of a new bull phase.
@@ -149,6 +148,6 @@ The `WMA(ROC(14) + ROC(11), 10)` construction here is Coppock's original.
## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the rate-of-change building block.
- [Indicator-Wma.md](../trend/Indicator-Wma.md) — the smoothing average.
- [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the rate-of-change building block.
- [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — the smoothing average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Price Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded around zero (price-difference scale) |
@@ -144,7 +143,7 @@ into the past, the latest DPO value does not correspond to the latest bar.
- **Trading the zero cross.** DPO is detrended *and* time-shifted; its
latest value is historical. Use it to size cycles, not to time entries.
- **Reading it as momentum.** It is a detrended price, not a rate of
change — see [`Roc`](Indicator-Roc.md) or [`Mom`](Indicator-Mom.md) for
change — see [`Roc`](../momentum-oscillators/Indicator-Roc.md) or [`Mom`](../momentum-oscillators/Indicator-Mom.md) for
momentum.
## References
@@ -155,8 +154,8 @@ The Detrended Price Oscillator is a standard cycle-analysis study; the
## See also
- [Indicator-Sma.md](../trend/Indicator-Sma.md) — the moving average DPO
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the moving average DPO
detrends against.
- [Indicator-Roc.md](Indicator-Roc.md) — momentum, the indicator DPO is
- [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — momentum, the indicator DPO is
often confused with.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | Unbounded oscillators |
| Family | Price Oscillators |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded around zero (percent) |
@@ -22,13 +21,13 @@
PPO = 100 · (EMA_fast EMA_slow) / EMA_slow
```
PPO is [`MacdIndicator`](Indicator-MacdIndicator.md) divided by the slow
PPO is [`MacdIndicator`](../trend-directional/Indicator-MacdIndicator.md) divided by the slow
EMA. That single change makes it **scale-free**: a `PPO` of `1.5` always
means "the fast EMA is 1.5 % above the slow EMA", whether the instrument
trades at $5 or $5000 — so PPO values can be compared across assets and
across time, which raw MACD values cannot. The classic PPO **signal
line** is a 9-period EMA of this PPO line; compose it with
[`Chain`](../Indicator-Chaining.md) and an `Ema(9)`.
[`Chain`](../../Indicator-Chaining.md) and an `Ema(9)`.
## Parameters
@@ -149,7 +148,7 @@ follows the standard PPO definition and matches TA-Lib's `PPO`.
## See also
- [Indicator-MacdIndicator.md](Indicator-MacdIndicator.md) — the price-unit
- [Indicator-MacdIndicator.md](../trend-directional/Indicator-MacdIndicator.md) — the price-unit
original, with a bundled signal line and histogram.
- [Indicator-Ema.md](../trend/Indicator-Ema.md) — the underlying average.
- [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the underlying average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -22,7 +22,7 @@ LinRegAngle = atan(LinRegSlope) · 180 / π
```
The angle carries exactly the same information as
[`LinRegSlope`](Indicator-LinRegSlope.md) — positive while price trends up,
[`LinRegSlope`](../price-statistics/Indicator-LinRegSlope.md) — positive while price trends up,
negative while it trends down — but maps the unbounded slope through `atan`
onto `(90°, +90°)`. That bounded, price-unit-free scale makes "how steep is
the trend" comparable at a glance and across instruments. This is TA-Lib's
@@ -121,7 +121,7 @@ The angle is read like a slope: sign gives trend direction, magnitude gives
how steeply price is pitched. Because it is bounded to `±90°` it is convenient
for thresholds — e.g. "only trade with the trend while the angle exceeds
`30°`" — and for comparing trend pitch across instruments with different price
scales, which the raw [`LinRegSlope`](Indicator-LinRegSlope.md) cannot do.
scales, which the raw [`LinRegSlope`](../price-statistics/Indicator-LinRegSlope.md) cannot do.
## Common pitfalls
@@ -136,8 +136,8 @@ TA-Lib's `LINEARREG_ANGLE`.
## See also
- [Indicator-LinRegSlope.md](Indicator-LinRegSlope.md) — the same fit's slope,
- [Indicator-LinRegSlope.md](../price-statistics/Indicator-LinRegSlope.md) — the same fit's slope,
in raw price-per-bar units.
- [Indicator-LinearRegression.md](Indicator-LinearRegression.md) — the
- [Indicator-LinearRegression.md](../price-statistics/Indicator-LinearRegression.md) — the
endpoint of the same rolling fit.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Statistics |
| Sub-category | Regression |
| Family | Price Statistics |
| Input type | `f64` (price) |
| Output type | `f64` |
| Output range | unbounded around zero (price units per bar) |
@@ -25,7 +24,7 @@ b = (n·Σxy Σx·Σy) / (n·Σxx (Σx)²)
```
`LinRegSlope` fits a straight line to the window by ordinary least squares —
the same fit as [`LinearRegression`](Indicator-LinearRegression.md) — but
the same fit as [`LinearRegression`](../price-statistics/Indicator-LinearRegression.md) — but
reports the *slope* `b` instead of the endpoint. The slope is in price units
per bar: positive while price trends up, negative while it trends down, near
zero when it is ranging. This is TA-Lib's `LINEARREG_SLOPE`.
@@ -143,8 +142,8 @@ TA-Lib's `LINEARREG_SLOPE`.
## See also
- [Indicator-LinearRegression.md](Indicator-LinearRegression.md) — the
- [Indicator-LinearRegression.md](../price-statistics/Indicator-LinearRegression.md) — the
endpoint of the same rolling fit.
- [Indicator-Mom.md](../momentum/Indicator-Mom.md) — raw price-difference
- [Indicator-Mom.md](../momentum-oscillators/Indicator-Mom.md) — raw price-difference
momentum, the unsmoothed cousin.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Statistics |
| Sub-category | Regression |
| Family | Price Statistics |
| Input type | `f64` (price) |
| Output type | `f64` |
| Output range | unbounded (price scale) |
@@ -29,7 +28,7 @@ LinearReg = a + b·(period 1)
The indicator fits a straight line to the window by ordinary least squares,
then reports that line's value at the most recent bar. Because it
extrapolates the *local trend* forward rather than averaging it away, it lags
a same-period [`Sma`](../trend/Indicator-Sma.md) noticeably less. This is
a same-period [`Sma`](../moving-averages/Indicator-Sma.md) noticeably less. This is
TA-Lib's `LINEARREG`.
## Parameters
@@ -129,7 +128,7 @@ Read `LinearRegression` as a low-lag moving average: it tracks price more
closely than an SMA of the same period because it projects the window's trend
to the current bar instead of centring on the window. A shorter `period`
hugs price; a longer one is a smoother trend line. Pair it with
[`LinRegSlope`](Indicator-LinRegSlope.md) to read the same fit's steepness.
[`LinRegSlope`](../price-statistics/Indicator-LinRegSlope.md) to read the same fit's steepness.
## Common pitfalls
@@ -145,8 +144,8 @@ the endpoint formulation matches TA-Lib's `LINEARREG`.
## See also
- [Indicator-LinRegSlope.md](Indicator-LinRegSlope.md) — the slope of the same
- [Indicator-LinRegSlope.md](../price-statistics/Indicator-LinRegSlope.md) — the slope of the same
rolling fit.
- [Indicator-Sma.md](../trend/Indicator-Sma.md) — the centred average it is
- [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the centred average it is
often compared against.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -6,8 +6,7 @@
| Field | Value |
|-------|-------|
| Family | Statistics |
| Sub-category | Price transforms |
| Family | Price Statistics |
| Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` |
| Output range | unbounded (price scale) |
@@ -23,7 +22,7 @@ MedianPrice = (high + low) / 2
The median price is the centre of the bar's range — it discards where the bar
opened and closed entirely. It is the price series Bill Williams'
[`AwesomeOscillator`](../momentum/Indicator-AwesomeOscillator.md) is built on,
[`AwesomeOscillator`](../momentum-oscillators/Indicator-AwesomeOscillator.md) is built on,
and a useful close substitute when the close is noisy relative to the range.
## Parameters
@@ -131,6 +130,6 @@ The Median Price; the `(H + L) / 2` definition is standard (TA-Lib's
## See also
- [Indicator-TypicalPrice.md](Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-WeightedClose.md](Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicator-TypicalPrice.md](../price-statistics/Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-WeightedClose.md](../price-statistics/Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Statistics |
| Sub-category | Price transforms |
| Family | Price Statistics |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | unbounded (price scale) |
@@ -24,7 +23,7 @@ TypicalPrice = (high + low + close) / 3
The typical price collapses a full OHLC bar to one number, giving the close
no more weight than the two extremes. It is the price series that
[`Cci`](../momentum/Indicator-Cci.md) and [`Mfi`](../momentum/Indicator-Mfi.md)
[`Cci`](../momentum-oscillators/Indicator-Cci.md) and [`Mfi`](../momentum-oscillators/Indicator-Mfi.md)
are defined on, and a common input to feed any close-driven indicator when you
want the bar's range reflected in the value.
@@ -132,6 +131,6 @@ standard (StockCharts, TA-Lib's `TYPPRICE`).
## See also
- [Indicator-MedianPrice.md](Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicator-WeightedClose.md](Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicator-MedianPrice.md](../price-statistics/Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicator-WeightedClose.md](../price-statistics/Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Statistics |
| Sub-category | Price transforms |
| Family | Price Statistics |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | unbounded (price scale) |
@@ -22,7 +21,7 @@
WeightedClose = (high + low + 2·close) / 4
```
Like the [`TypicalPrice`](Indicator-TypicalPrice.md), the weighted close
Like the [`TypicalPrice`](../price-statistics/Indicator-TypicalPrice.md), the weighted close
collapses an OHLC bar to one number — but it counts the close twice, so the
result sits closer to where the bar settled than to its range. Reach for it
when the closing print carries more signal than the extremes.
@@ -117,7 +116,7 @@ Output:
## Interpretation
The weighted close sits on the spectrum between the raw close and the
[`TypicalPrice`](Indicator-TypicalPrice.md): closer to the close, but still
[`TypicalPrice`](../price-statistics/Indicator-TypicalPrice.md): closer to the close, but still
nudged by the bar's range. Use it as a drop-in close replacement when you want
the settlement to dominate without ignoring the extremes entirely.
@@ -132,6 +131,6 @@ The Weighted Close; the `(H + L + 2C) / 4` definition is standard (TA-Lib's
## See also
- [Indicator-TypicalPrice.md](Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-MedianPrice.md](Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicator-TypicalPrice.md](../price-statistics/Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-MedianPrice.md](../price-statistics/Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -132,8 +132,8 @@ window.
## See also
- [Indicator-StdDev.md](../volatility/Indicator-StdDev.md) — the rolling
- [Indicator-StdDev.md](../volatility-bands/Indicator-StdDev.md) — the rolling
standard deviation in the denominator.
- [Indicator-LinearRegression.md](Indicator-LinearRegression.md) — another
- [Indicator-LinearRegression.md](../price-statistics/Indicator-LinearRegression.md) — another
rolling statistical fit.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Trailing stop |
| Family | Trailing Stops |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | unbounded (price scale) |
@@ -32,7 +31,7 @@ This is the trailing stop popularised by the "UT Bot": a single line that sits
stop the level only ratchets *toward* price — up in an uptrend, down in a
downtrend — and never away from it. When a close crosses the stop the level
snaps to the opposite side of the new close, flipping the trade. Unlike the
[`ChandelierExit`](Indicator-ChandelierExit.md), it hangs off the close
[`ChandelierExit`](../trailing-stops/Indicator-ChandelierExit.md), it hangs off the close
itself, not the window's extreme, and reports one line rather than two.
## Parameters
@@ -151,7 +150,7 @@ the trade more room — fewer flips, wider risk; a smaller one flips sooner.
## Common pitfalls
- **Expecting it off the window high.** It trails the *close*, so it can sit
closer to price than a [`ChandelierExit`](Indicator-ChandelierExit.md).
closer to price than a [`ChandelierExit`](../trailing-stops/Indicator-ChandelierExit.md).
- **Feeding it scalar prices.** It needs the full `high`/`low`/`close` bar to
drive the ATR.
@@ -162,9 +161,9 @@ here matches the common Sylvain Vervoort formulation.
## See also
- [Indicator-SuperTrend.md](Indicator-SuperTrend.md) — an ATR trailing stop
- [Indicator-SuperTrend.md](../trailing-stops/Indicator-SuperTrend.md) — an ATR trailing stop
with band ratcheting and an explicit direction flag.
- [Indicator-ChandelierExit.md](Indicator-ChandelierExit.md) — an ATR stop hung
- [Indicator-ChandelierExit.md](../trailing-stops/Indicator-ChandelierExit.md) — an ATR stop hung
off the window's extreme instead of the close.
- [Indicator-Atr.md](Indicator-Atr.md) — the volatility measure underneath.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the volatility measure underneath.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Trailing stop |
| Family | Trailing Stops |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(stop_long, stop_short)` |
| Output range | unbounded (price scale) |
@@ -31,7 +30,7 @@ final (window q = stop_period):
Tushar Chande and Stanley Kroll's stop runs in two stages. The first builds a
preliminary ATR stop off the recent extreme — the same idea as a
[`ChandelierExit`](Indicator-ChandelierExit.md). The second smooths it: rather
[`ChandelierExit`](../trailing-stops/Indicator-ChandelierExit.md). The second smooths it: rather
than use that preliminary stop directly, it takes the *most extreme*
preliminary stop seen over a shorter window `q`. That second pass keeps a
single unusually wide bar from yanking the stop around. The classic
@@ -149,7 +148,7 @@ Output:
## Interpretation
Use `stop_long` to trail a long position and `stop_short` to trail a short.
Compared with a one-stage [`ChandelierExit`](Indicator-ChandelierExit.md), the
Compared with a one-stage [`ChandelierExit`](../trailing-stops/Indicator-ChandelierExit.md), the
extra smoothing window makes the Chande Kroll Stop steadier — it will not lurch
on a single wide-range bar — at the cost of reacting a little slower to a
genuine trend change.
@@ -169,9 +168,9 @@ the two-stage formulation here matches the common TradingView implementation.
## See also
- [Indicator-ChandelierExit.md](Indicator-ChandelierExit.md) — the one-stage
- [Indicator-ChandelierExit.md](../trailing-stops/Indicator-ChandelierExit.md) — the one-stage
ATR stop this smooths.
- [Indicator-SuperTrend.md](Indicator-SuperTrend.md) — an ATR trailing stop
- [Indicator-SuperTrend.md](../trailing-stops/Indicator-SuperTrend.md) — an ATR trailing stop
with explicit flip logic.
- [Indicator-Atr.md](Indicator-Atr.md) — the volatility measure underneath.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the volatility measure underneath.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Trailing stop |
| Family | Trailing Stops |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(long_stop, short_stop)` |
| Output range | unbounded (price scale) |
@@ -158,9 +157,9 @@ matches the standard definition.
## See also
- [Indicator-SuperTrend.md](Indicator-SuperTrend.md) — an ATR trailing stop
- [Indicator-SuperTrend.md](../trailing-stops/Indicator-SuperTrend.md) — an ATR trailing stop
with explicit flip logic and a single line.
- [Indicator-ChandeKrollStop.md](Indicator-ChandeKrollStop.md) — a two-stage
- [Indicator-ChandeKrollStop.md](../trailing-stops/Indicator-ChandeKrollStop.md) — a two-stage
ATR stop that smooths the preliminary level.
- [Indicator-Atr.md](Indicator-Atr.md) — the volatility measure underneath.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the volatility measure underneath.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value |
|---------------------|------------------------------------------------------------------------------------|
| Family | Volatility |
| Sub-category | trailing-stop (state machine) |
| Family | Trailing Stops |
| Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` |
| Output range | unbounded; bracketed by the prior two highs/lows |
@@ -240,8 +239,8 @@ Output:
## See also
- [ATR](Indicator-Atr.md) — sister indicator from the same Wilder text.
- [Donchian Channels](Indicator-Donchian.md) — alternative breakout-style
- [ATR](../volatility-bands/Indicator-Atr.md) — sister indicator from the same Wilder text.
- [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — alternative breakout-style
trailing stop based on rolling extrema.
- [Keltner Channels](Indicator-Keltner.md) — envelope you can use as a
- [Keltner Channels](../volatility-bands/Indicator-Keltner.md) — envelope you can use as a
smoother stop boundary than PSAR in choppy regimes.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Trailing stop |
| Family | Trailing Stops |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(value, direction)` |
| Output range | `value`: unbounded (price scale); `direction`: `1.0` or `+1.0` |
@@ -167,8 +166,8 @@ the widely used TradingView / Olivier Seban definition.
## See also
- [Indicator-Psar.md](Indicator-Psar.md) — Wilder's parabolic stop-and-reverse.
- [Indicator-AtrTrailingStop.md](Indicator-AtrTrailingStop.md) — a plain
- [Indicator-Psar.md](../trailing-stops/Indicator-Psar.md) — Wilder's parabolic stop-and-reverse.
- [Indicator-AtrTrailingStop.md](../trailing-stops/Indicator-AtrTrailingStop.md) — a plain
ATR trailing stop without the band ratchet.
- [Indicator-Atr.md](Indicator-Atr.md) — the volatility measure underneath.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the volatility measure underneath.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum (directional) |
| Sub-category | directional / trend-strength |
| Family | Trend & Directional |
| Input type | `Candle` |
| Output type | `AdxOutput { plus_di, minus_di, adx }` |
| Output range | each field in `[0, 100]` |
@@ -237,9 +236,9 @@ row 39: { plusDi: 80, minusDi: 0, adx: 100 }
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — shares Wilder smoothing.
- [Indicator: Aroon](Indicator-Aroon.md) — alternative trend-strength
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — shares Wilder smoothing.
- [Indicator: Aroon](../trend-directional/Indicator-Aroon.md) — alternative trend-strength
measure, range-based.
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — trend-following
- [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — trend-following
momentum, useful as a confirmation against `+DI` / `DI`.
- [Warmup Periods](../../Warmup-Periods.md) — the `2 · period` ADX entry.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum (directional / trend-strength) |
| Sub-category | bounded directional pair |
| Family | Trend & Directional |
| Input type | `Candle` |
| Output type | `AroonOutput { up, down }` |
| Output range | `up, down ∈ [0, 100]` |
@@ -199,8 +198,8 @@ row 14: { up: 100, down: 0 }
## See also
- [Indicator: Adx](Indicator-Adx.md) — alternative trend-strength
- [Indicator: Adx](../trend-directional/Indicator-Adx.md) — alternative trend-strength
measure with explicit `+DI` / `DI` direction.
- [Indicator: Stochastic](Indicator-Stochastic.md) — also range-window
- [Indicator: Stochastic](../momentum-oscillators/Indicator-Stochastic.md) — also range-window
based, but reports close position rather than extremum age.
- [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum (trend strength) |
| Sub-category | Bounded oscillators |
| Family | Trend & Directional |
| Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` |
| Output range | `[100, 100]` |
@@ -22,7 +21,7 @@
AroonOscillator = AroonUp AroonDown
```
where [`Aroon`](Indicator-Aroon.md) reports two `[0, 100]` lines measuring
where [`Aroon`](../trend-directional/Indicator-Aroon.md) reports two `[0, 100]` lines measuring
how recently the window's highest high and lowest low occurred. Their
difference lives in `[100, 100]`: strongly positive means the most recent
high is much fresher than the most recent low (an up-trend); strongly
@@ -153,7 +152,7 @@ Tushar Chande's Aroon system (1995); the oscillator is the standard
## See also
- [Indicator-Aroon.md](Indicator-Aroon.md) — the two-line indicator this
- [Indicator-Aroon.md](../trend-directional/Indicator-Aroon.md) — the two-line indicator this
collapses.
- [Indicator-Adx.md](Indicator-Adx.md) — another trend-strength gauge.
- [Indicator-Adx.md](../trend-directional/Indicator-Adx.md) — another trend-strength gauge.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -141,6 +141,6 @@ standard one.
## See also
- [Indicator-VerticalHorizontalFilter.md](Indicator-VerticalHorizontalFilter.md)
- [Indicator-VerticalHorizontalFilter.md](../trend-directional/Indicator-VerticalHorizontalFilter.md)
— the same trending-vs-ranging question on an inverted scale.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -12,8 +12,7 @@ shorter, conventional name `MACD`.
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | unbounded oscillator (trend-following) |
| Family | Trend & Directional |
| Input type | `f64` (close) |
| Output type | `MacdOutput { macd, signal, histogram }` |
| Output range | unbounded (centred on 0) |
@@ -206,9 +205,9 @@ row 39 hist : 6.217248937900877e-15
## See also
- [Indicator: Rsi](Indicator-Rsi.md) — bounded sibling oscillator, useful
- [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — bounded sibling oscillator, useful
as a confirmation filter on top of MACD signals.
- [Indicator: Trix](Indicator-Trix.md) — another EMA-based momentum
- [Indicator: Trix](../trend-directional/Indicator-Trix.md) — another EMA-based momentum
oscillator (triple-smoothed rate of change).
- [Warmup Periods](../../Warmup-Periods.md) — table including the `slow +
signal 1` rule.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum (trend strength) |
| Sub-category | Range expansion |
| Family | Trend & Directional |
| Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` |
| Output range | `> 0`, oscillates around `sum_period` |
@@ -166,8 +165,8 @@ Commodities* (1992). The double-EMA-of-range construction and the `(9,
## See also
- [Indicator-Atr.md](../volatility/Indicator-Atr.md) — directional-free
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — directional-free
volatility in price units.
- [Indicator-BollingerBands.md](../volatility/Indicator-BollingerBands.md)
- [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md)
— another range-expansion lens.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum |
| Sub-category | unbounded oscillator (zero-centred) |
| Family | Trend & Directional |
| Input type | `f64` (close) |
| Output type | `f64` |
| Output range | unbounded (typically a few percent, centred on 0) |
@@ -179,9 +178,9 @@ vals[49]: 3.5714285714285716
## See also
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — faster
- [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — faster
EMA-based momentum oscillator, useful as a confirmation against
TRIX zero-line crosses.
- [Indicator: Roc](Indicator-Roc.md) — the raw, one-stage rate of
- [Indicator: Roc](../momentum-oscillators/Indicator-Roc.md) — the raw, one-stage rate of
change TRIX is built on top of.
- [Warmup Periods](../../Warmup-Periods.md) — `3 · period 1` entry.
@@ -26,7 +26,7 @@ denominator is the *total* distance it walked. Their ratio lives in `[0, 1]`:
a clean trend walks almost only in its net direction, so `VHF` approaches `1`;
a choppy market doubles back constantly, inflating the denominator and pushing
`VHF` toward `0`. It answers the same question as the
[`ChoppinessIndex`](Indicator-ChoppinessIndex.md) on an inverted scale.
[`ChoppinessIndex`](../trend-directional/Indicator-ChoppinessIndex.md) on an inverted scale.
## Parameters
@@ -135,6 +135,6 @@ is the standard one.
## See also
- [Indicator-ChoppinessIndex.md](Indicator-ChoppinessIndex.md) — the same
- [Indicator-ChoppinessIndex.md](../trend-directional/Indicator-ChoppinessIndex.md) — the same
trending-vs-ranging question on an inverted `[0, 100]` scale.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Momentum (trend strength) |
| Sub-category | Directional |
| Family | Trend & Directional |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `VortexOutput { plus, minus }` |
| Output range | each line `>= 0`, typically around `1.0` |
@@ -154,7 +153,7 @@ definition here follows their original.
## See also
- [Indicator-Adx.md](Indicator-Adx.md) — Wilder's directional system.
- [Indicator-Atr.md](../volatility/Indicator-Atr.md) — the true range
- [Indicator-Adx.md](../trend-directional/Indicator-Adx.md) — Wilder's directional system.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the true range
Vortex normalises against.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value |
|---------------------|--------------------------------------------------------------------------------------|
| Family | Volatility |
| Sub-category | range-average |
| Family | Volatility & Bands |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | unbounded `≥ 0` |
@@ -217,10 +216,10 @@ null
## See also
- [Bollinger Bands](Indicator-BollingerBands.md) — stddev-based volatility
- [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — stddev-based volatility
envelope around an SMA.
- [Keltner Channels](Indicator-Keltner.md) — directly composes EMA + ATR.
- [Donchian Channels](Indicator-Donchian.md) — rolling high/low without
- [Keltner Channels](../volatility-bands/Indicator-Keltner.md) — directly composes EMA + ATR.
- [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — rolling high/low without
any smoothing.
- [PSAR](Indicator-Psar.md) — uses ATR-like volatility tracking implicitly
- [PSAR](../trailing-stops/Indicator-Psar.md) — uses ATR-like volatility tracking implicitly
through its acceleration factor.
@@ -8,8 +8,7 @@
| Item | Value |
|---------------------|--------------------------------------------------------------------------------|
| Family | Volatility |
| Sub-category | envelope |
| Family | Volatility & Bands |
| Input type | `f64` (typically the close price) |
| Output type | `BollingerOutput { upper: f64, middle: f64, lower: f64, stddev: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper`, `stddev ≥ 0` |
@@ -250,9 +249,9 @@ Output:
## See also
- [Keltner Channels](Indicator-Keltner.md) — same envelope shape but band
- [Keltner Channels](../volatility-bands/Indicator-Keltner.md) — same envelope shape but band
width is driven by ATR instead of stddev.
- [Donchian Channels](Indicator-Donchian.md) — rolling high/low envelope
- [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — rolling high/low envelope
with no smoothing.
- [ATR](Indicator-Atr.md) — the volatility scale most commonly used to
- [ATR](../volatility-bands/Indicator-Atr.md) — the volatility scale most commonly used to
size Bollinger-style stops.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Envelopes (derived) |
| Family | Volatility & Bands |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[0, ∞)` |
@@ -23,7 +22,7 @@ Bandwidth = (upper lower) / middle
```
where `upper`, `middle` and `lower` come from
[`BollingerBands`](Indicator-BollingerBands.md). Since the bands are
[`BollingerBands`](../volatility-bands/Indicator-BollingerBands.md). Since the bands are
`middle ± multiplier · stddev`, the bandwidth simplifies to
`2 · multiplier · stddev / middle` — volatility normalised by price level.
Its extremes name two classic patterns: the **squeeze** (bandwidth at a
@@ -149,8 +148,8 @@ of Bollinger's two derived indicators (with %b).
## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — the bands
- [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — the bands
this measures.
- [Indicator-PercentB.md](Indicator-PercentB.md) — the companion derived
- [Indicator-PercentB.md](../volatility-bands/Indicator-PercentB.md) — the companion derived
indicator: price *position* within the bands.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -133,7 +133,7 @@ Output:
A rising Chaikin Volatility warns that ranges are expanding fast — Chaikin
associated sharp rises with market tops, where panic widens bars. A low or
falling reading is the calm, range-contracting market that often precedes a
move. It complements [`Atr`](Indicator-Atr.md): ATR gives the level of
move. It complements [`Atr`](../volatility-bands/Indicator-Atr.md): ATR gives the level of
volatility, Chaikin Volatility gives its momentum.
## Common pitfalls
@@ -149,6 +149,6 @@ here is the standard one.
## See also
- [Indicator-Atr.md](Indicator-Atr.md) — the level of per-bar volatility.
- [Indicator-TrueRange.md](Indicator-TrueRange.md) — raw single-bar range.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the level of per-bar volatility.
- [Indicator-TrueRange.md](../volatility-bands/Indicator-TrueRange.md) — raw single-bar range.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value |
|---------------------|--------------------------------------------------------------------|
| Family | Volatility |
| Sub-category | envelope (rolling extrema) |
| Family | Volatility & Bands |
| Input type | `Candle` (uses `high` and `low`) |
| Output type | `DonchianOutput { upper: f64, middle: f64, lower: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper` |
@@ -206,9 +205,9 @@ row 4 [upper, middle, lower]: [ 15, 13, 11 ]
## See also
- [Bollinger Bands](Indicator-BollingerBands.md) — envelope shaped by
- [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — envelope shaped by
stddev rather than rolling extrema.
- [Keltner Channels](Indicator-Keltner.md) — envelope shaped by ATR
- [Keltner Channels](../volatility-bands/Indicator-Keltner.md) — envelope shaped by ATR
around an EMA centerline.
- [PSAR](Indicator-Psar.md) — alternative trailing-stop construction
- [PSAR](../trailing-stops/Indicator-Psar.md) — alternative trailing-stop construction
for breakout systems.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Return-based |
| Family | Volatility & Bands |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[0, ∞)` (annualised percent) |
@@ -159,8 +158,8 @@ conventional choice for volatility estimation.
## See also
- [Indicator-StdDev.md](Indicator-StdDev.md) — population dispersion of
- [Indicator-StdDev.md](../volatility-bands/Indicator-StdDev.md) — population dispersion of
raw prices.
- [Indicator-Natr.md](Indicator-Natr.md) — range-based volatility as a
- [Indicator-Natr.md](../volatility-bands/Indicator-Natr.md) — range-based volatility as a
percentage.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -1,6 +1,6 @@
# Keltner Channels
> A pure composition of [EMA](../trend/Indicator-Ema.md) on typical price plus
> A pure composition of [EMA](../moving-averages/Indicator-Ema.md) on typical price plus
> ATR-scaled envelopes. The middle line is the trend filter, the bands are
> the volatility cone.
@@ -8,8 +8,7 @@
| Item | Value |
|---------------------|------------------------------------------------------------------------------------|
| Family | Volatility |
| Sub-category | envelope (composed: EMA + ATR) |
| Family | Volatility & Bands |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `KeltnerOutput { upper: f64, middle: f64, lower: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper` |
@@ -207,9 +206,9 @@ row 4 [upper, middle, lower]: [ 17.166666666666664, 13.166666666666666, 9.166666
## See also
- [EMA](../trend/Indicator-Ema.md) — the centerline component.
- [ATR](Indicator-Atr.md) — the envelope width component.
- [Bollinger Bands](Indicator-BollingerBands.md) — envelope using stddev
- [EMA](../moving-averages/Indicator-Ema.md) — the centerline component.
- [ATR](../volatility-bands/Indicator-Atr.md) — the envelope width component.
- [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — envelope using stddev
rather than ATR; useful side-by-side comparison.
- [Donchian Channels](Indicator-Donchian.md) — envelope using rolling
- [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — envelope using rolling
extrema with no smoothing.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Range-average |
| Family | Volatility & Bands |
| Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` |
| Output range | `[0, ∞)` (percent) |
@@ -22,7 +21,7 @@
NATR = 100 · ATR(period) / close
```
[`Atr`](Indicator-Atr.md) measures volatility in raw price units — a `2.0`
[`Atr`](../volatility-bands/Indicator-Atr.md) measures volatility in raw price units — a `2.0`
ATR is large on a $10 stock and tiny on a $5000 index. Dividing by the
current close converts it to a percentage, so a NATR of `2.0` always
means "the average true range is 2 % of price". That makes NATR readings
@@ -121,7 +120,7 @@ console.log(natr.batch(high, low, close).at(-1));
instruments or across long stretches of time where the price level
drifts. A volatility filter like "skip entries when NATR > 5" or a stop
at "entry 3 × NATR %" stays meaningful on any symbol. Use raw
[`Atr`](Indicator-Atr.md) only when you specifically want the answer in
[`Atr`](../volatility-bands/Indicator-Atr.md) only when you specifically want the answer in
price units (e.g. to place a stop a fixed number of points away).
## Common pitfalls
@@ -138,7 +137,7 @@ Systems* (1978).
## See also
- [Indicator-Atr.md](Indicator-Atr.md) — the price-unit original.
- [Indicator-HistoricalVolatility.md](Indicator-HistoricalVolatility.md) —
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the price-unit original.
- [Indicator-HistoricalVolatility.md](../volatility-bands/Indicator-HistoricalVolatility.md) —
return-based annualised volatility.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Envelopes (derived) |
| Family | Volatility & Bands |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | unbounded (`0` = lower band, `1` = upper band) |
@@ -23,7 +22,7 @@
```
where `upper` and `lower` come from
[`BollingerBands`](Indicator-BollingerBands.md). `%b = 1` is price exactly
[`BollingerBands`](../volatility-bands/Indicator-BollingerBands.md). `%b = 1` is price exactly
on the upper band, `%b = 0` on the lower band, `%b = 0.5` on the middle
band. The value is **deliberately not clamped**: a close above the upper
band gives `%b > 1`, a close below the lower band gives `%b < 0` — so %b
@@ -132,7 +131,7 @@ for example "buy when %b crosses back above 0 from below".
- **Expecting `[0, 1]` bounds.** %b is intentionally unclamped; values
outside `[0, 1]` are the band-overshoot signal, not an error.
- **Confusing it with bandwidth.** %b is price *position*;
[`BollingerBandwidth`](Indicator-BollingerBandwidth.md) is band *width*.
[`BollingerBandwidth`](../volatility-bands/Indicator-BollingerBandwidth.md) is band *width*.
## References
@@ -141,8 +140,8 @@ Bollinger's two derived indicators (with bandwidth).
## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — the bands
- [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — the bands
this locates price within.
- [Indicator-BollingerBandwidth.md](Indicator-BollingerBandwidth.md) — the
- [Indicator-BollingerBandwidth.md](../volatility-bands/Indicator-BollingerBandwidth.md) — the
companion derived indicator: band *width*.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Dispersion |
| Family | Volatility & Bands |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[0, ∞)` (price-difference scale) |
@@ -26,7 +25,7 @@ StdDev = √variance
This is the **population** standard deviation (divisor `n`, not `n 1`)
— the exact dispersion measure that drives the band width of
[`BollingerBands`](Indicator-BollingerBands.md). It is maintained as an
[`BollingerBands`](../volatility-bands/Indicator-BollingerBands.md). It is maintained as an
O(1) state machine: a running sum and a running sum-of-squares, each
updated by one add and one subtract per bar. Floating-point cancellation
can leave the computed variance very slightly negative; it is clamped to
@@ -137,7 +136,7 @@ exactly.
- **Expecting the sample standard deviation.** `StdDev` divides by `n`,
not `n 1`. For the unbiased return-based estimator use
[`HistoricalVolatility`](Indicator-HistoricalVolatility.md).
[`HistoricalVolatility`](../volatility-bands/Indicator-HistoricalVolatility.md).
- **Comparing across instruments.** The output is in price units; a
`StdDev` of `5` is not comparable between a $10 and a $1000 asset.
@@ -149,8 +148,8 @@ Bands and pandas' `rolling(period).std(ddof=0)`.
## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — bands built
- [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — bands built
from this dispersion measure.
- [Indicator-HistoricalVolatility.md](Indicator-HistoricalVolatility.md) —
- [Indicator-HistoricalVolatility.md](../volatility-bands/Indicator-HistoricalVolatility.md) —
annualised volatility of log returns.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -24,7 +24,7 @@ TR = max( high low, |high close_prev|, |low close_prev| )
True Range is the greatest of the bar's own range and the two gaps to the
previous close, so it captures volatility that opens *between* bars — an
overnight gap — not only the range printed within a bar. The first bar has no
previous close and falls back to `high low`. Where [`Atr`](Indicator-Atr.md)
previous close and falls back to `high low`. Where [`Atr`](../volatility-bands/Indicator-Atr.md)
is the Wilder-smoothed average of this series, `TrueRange` exposes it raw, one
value per bar.
@@ -124,7 +124,7 @@ Output:
Read `TrueRange` as raw per-bar volatility. It spikes on wide-range or gapping
bars and shrinks in quiet stretches. Smoothing it with a moving average gives
[`Atr`](Indicator-Atr.md); using it directly is useful for volatility-scaled
[`Atr`](../volatility-bands/Indicator-Atr.md); using it directly is useful for volatility-scaled
position sizing or for spotting single outlier bars an average would hide.
## Common pitfalls
@@ -140,8 +140,8 @@ Systems* (1978).
## See also
- [Indicator-Atr.md](Indicator-Atr.md) — the Wilder-smoothed average of the
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the Wilder-smoothed average of the
True Range.
- [Indicator-ChaikinVolatility.md](Indicator-ChaikinVolatility.md) — a
- [Indicator-ChaikinVolatility.md](../volatility-bands/Indicator-ChaikinVolatility.md) — a
rate-of-change volatility measure.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value |
|-------|-------|
| Family | Volatility |
| Sub-category | Downside risk |
| Family | Volatility & Bands |
| Input type | `f64` (single close) |
| Output type | `f64` |
| Output range | `[0, ∞)` (percent) |
@@ -144,7 +143,7 @@ penalises only downside volatility.
- **Reading it as two-sided volatility.** The Ulcer Index ignores upside
entirely — a wildly choppy *up*-trend can still score near `0`. Use
[`StdDev`](Indicator-StdDev.md) for two-sided dispersion.
[`StdDev`](../volatility-bands/Indicator-StdDev.md) for two-sided dispersion.
- **Forgetting the doubled warmup.** Warmup is `2·period 1`, not
`period`.
@@ -156,6 +155,6 @@ drawdown RMS here follows that definition.
## See also
- [Indicator-StdDev.md](Indicator-StdDev.md) — two-sided dispersion.
- [Indicator-Atr.md](Indicator-Atr.md) — per-bar range volatility.
- [Indicator-StdDev.md](../volatility-bands/Indicator-StdDev.md) — two-sided dispersion.
- [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — per-bar range volatility.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
+3 -4
View File
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Cumulative |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` |
| Output range | unbounded (drifts with cumulative volume) |
@@ -138,7 +137,7 @@ Output:
total drifts arbitrarily with cumulative volume). A rising ADL confirms
that an up-move is backed by accumulation; a *falling* ADL while price
rises is a bearish divergence — the rally is not being bought into.
[`ChaikinOscillator`](Indicator-ChaikinOscillator.md) is the standard way
[`ChaikinOscillator`](../volume/Indicator-ChaikinOscillator.md) is the standard way
to turn the ADL into a bounded, tradeable oscillator.
## Common pitfalls
@@ -155,7 +154,7 @@ formulation here matches the standard definition (StockCharts, TA-Lib's
## See also
- [Indicator-Obv.md](Indicator-Obv.md) — cumulative *signed* volume.
- [Indicator-ChaikinOscillator.md](Indicator-ChaikinOscillator.md) — an
- [Indicator-Obv.md](../volume/Indicator-Obv.md) — cumulative *signed* volume.
- [Indicator-ChaikinOscillator.md](../volume/Indicator-ChaikinOscillator.md) — an
oscillator built on the ADL.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` |
| Output range | `[1, +1]` |
@@ -24,7 +23,7 @@ MFV_t = MFM_t · volume_t (money-flow volume)
CMF_t = Σ(MFV, period) / Σ(volume, period)
```
CMF is the [`Adl`](Indicator-Adl.md) increment averaged the way RSI averages
CMF is the [`Adl`](../volume/Indicator-Adl.md) increment averaged the way RSI averages
gains: rather than a running total, it divides the *summed* money-flow volume
of the last `period` bars by the *summed* volume of those bars. The result is
volume-normalised, so it lives in `[1, +1]` regardless of how heavily the
@@ -137,7 +136,7 @@ near bar highs on real volume (accumulation), sustained negative values mean
the opposite (distribution). Crosses of the zero line are the textbook signal;
the `±0.05` band is often treated as a neutral zone. Because CMF is
volume-normalised it is comparable across instruments — unlike the raw
[`Adl`](Indicator-Adl.md), whose level is arbitrary.
[`Adl`](../volume/Indicator-Adl.md), whose level is arbitrary.
## Common pitfalls
@@ -153,7 +152,7 @@ matches the standard definition (StockCharts).
## See also
- [Indicator-Adl.md](Indicator-Adl.md) — the cumulative line CMF is built on.
- [Indicator-ChaikinOscillator.md](Indicator-ChaikinOscillator.md) — the
- [Indicator-Adl.md](../volume/Indicator-Adl.md) — the cumulative line CMF is built on.
- [Indicator-ChaikinOscillator.md](../volume/Indicator-ChaikinOscillator.md) — the
EMA-difference oscillator on the ADL.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` |
| Output range | unbounded around zero |
@@ -22,7 +21,7 @@
ChaikinOsc_t = EMA(ADL, fast)_t EMA(ADL, slow)_t
```
The [`Adl`](Indicator-Adl.md) is an unbounded line that drifts with cumulative
The [`Adl`](../volume/Indicator-Adl.md) is an unbounded line that drifts with cumulative
volume — useful for its slope but awkward to trade directly. The Chaikin
Oscillator applies the MACD construction to it: difference a fast and a slow
EMA of the ADL to get a zero-centred momentum reading. Positive values mean
@@ -153,9 +152,9 @@ Accumulation/Distribution Line (StockCharts).
## See also
- [Indicator-Adl.md](Indicator-Adl.md) — the cumulative line this oscillates.
- [Indicator-ChaikinMoneyFlow.md](Indicator-ChaikinMoneyFlow.md) — a bounded
- [Indicator-Adl.md](../volume/Indicator-Adl.md) — the cumulative line this oscillates.
- [Indicator-ChaikinMoneyFlow.md](../volume/Indicator-ChaikinMoneyFlow.md) — a bounded
ratio built from the same money-flow volume.
- [Indicator-MacdIndicator.md](../momentum/Indicator-MacdIndicator.md) — the
- [Indicator-MacdIndicator.md](../trend-directional/Indicator-MacdIndicator.md) — the
same fast/slow EMA-difference construction on price.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `volume`) |
| Output type | `f64` |
| Output range | unbounded around zero (scaled by `divisor`) |
@@ -154,8 +153,8 @@ the standard definition.
## See also
- [Indicator-ForceIndex.md](Indicator-ForceIndex.md) — a different
- [Indicator-ForceIndex.md](../volume/Indicator-ForceIndex.md) — a different
price-change-vs-volume gauge.
- [Indicator-ChaikinMoneyFlow.md](Indicator-ChaikinMoneyFlow.md) — bounded
- [Indicator-ChaikinMoneyFlow.md](../volume/Indicator-ChaikinMoneyFlow.md) — bounded
money-flow balance.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `close`, `volume`) |
| Output type | `f64` |
| Output range | unbounded around zero |
@@ -148,8 +147,8 @@ Alexander Elder's Force Index, introduced in *Trading for a Living* (1993).
## See also
- [Indicator-Obv.md](Indicator-Obv.md) — cumulative signed volume, a coarser
- [Indicator-Obv.md](../volume/Indicator-Obv.md) — cumulative signed volume, a coarser
volume-conviction gauge.
- [Indicator-VolumePriceTrend.md](Indicator-VolumePriceTrend.md) — cumulative
- [Indicator-VolumePriceTrend.md](../volume/Indicator-VolumePriceTrend.md) — cumulative
volume scaled by percentage move.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
+4 -5
View File
@@ -9,8 +9,7 @@
| Item | Value |
|---------------------|--------------------------------------------------------------|
| Family | Volume |
| Sub-category | cumulative |
| Family | Volume |
| Input type | `Candle` (uses `close` and `volume`) |
| Output type | `f64` |
| Output range | unbounded (signed, integer-of-volume in spirit) |
@@ -182,9 +181,9 @@ Output:
## See also
- [VWAP](Indicator-Vwap.md) — volume-weighted price benchmark; OBV and
- [VWAP](../volume/Indicator-Vwap.md) — volume-weighted price benchmark; OBV and
VWAP are the two canonical volume-aware indicators in the panel.
- [MFI](../momentum/Indicator-Mfi.md) — money-flow index, an oscillator blending
- [MFI](../momentum-oscillators/Indicator-Mfi.md) — money-flow index, an oscillator blending
typical price with volume.
- [SMA](../trend/Indicator-Sma.md) / [EMA](../trend/Indicator-Ema.md) — the smoothers
- [SMA](../moving-averages/Indicator-Sma.md) / [EMA](../moving-averages/Indicator-Ema.md) — the smoothers
most commonly layered on top of OBV to define trade triggers.
@@ -8,7 +8,6 @@
| Field | Value |
|-------|-------|
| Family | Volume |
| Sub-category | Cumulative |
| Input type | `Candle` (uses `close`, `volume`) |
| Output type | `f64` |
| Output range | unbounded (drifts with cumulative volume) |
@@ -22,7 +21,7 @@
VPT_t = VPT_{t1} + volume_t · (close_t close_{t1}) / close_{t1}
```
VPT is a close relative of [`Obv`](Indicator-Obv.md). Where OBV adds the
VPT is a close relative of [`Obv`](../volume/Indicator-Obv.md). Where OBV adds the
*entire* bar volume on any up-close, VPT adds volume scaled by the **size**
of the move: a 2 % gain on a given volume moves the line twice as far as a
1 % gain on the same volume. That makes VPT more sensitive to the
@@ -155,7 +154,7 @@ common definition.
## See also
- [Indicator-Obv.md](Indicator-Obv.md) — cumulative signed volume, the
- [Indicator-Obv.md](../volume/Indicator-Obv.md) — cumulative signed volume, the
closest relative.
- [Indicator-Adl.md](Indicator-Adl.md) — cumulative range-weighted volume.
- [Indicator-Adl.md](../volume/Indicator-Adl.md) — cumulative range-weighted volume.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -12,8 +12,7 @@ This page documents two distinct public types — jump straight to
| Item | Value |
|---------------------|----------------------------------------------------------------|
| Family | Volume |
| Sub-category | cumulative (`Vwap`) / rolling (`RollingVwap`) |
| Family | Volume |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` |
| Output range | unbounded (price-units) |
@@ -286,9 +285,9 @@ At `t = 4` with window `[20@3, 30@1, 40@2]`:
## See also
- [OBV](Indicator-Obv.md) — cumulative signed-volume measure that pairs
- [OBV](../volume/Indicator-Obv.md) — cumulative signed-volume measure that pairs
well with VWAP as a divergence flag.
- [MFI](../momentum/Indicator-Mfi.md) — money-flow oscillator that also blends
- [MFI](../momentum-oscillators/Indicator-Mfi.md) — money-flow oscillator that also blends
typical price with volume.
- [Bollinger Bands](../volatility/Indicator-BollingerBands.md) — non-volume volatility
- [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — non-volume volatility
envelope, often layered alongside VWAP on intraday charts.