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] ## [Unreleased]
### Added ### Added
- 38 new technical indicators, taking the library from 25 to 63. Each is - 46 new technical indicators, taking the library from 25 to 71 and
implemented once in the Rust core and wired through the Python, Node and reorganising the catalogue into **eight families**, each with at least five
WASM bindings, with reference-value tests and a dedicated wiki page: members. Every indicator is implemented once in the Rust core and wired
- Trend: `Smma`, `Trima`, `Zlema`, `T3`, `Vwma`. through the Python, Node and WASM bindings, with reference-value tests and a
- Momentum: `Mom`, `Cmo`, `Tsi`, `Pmo`, `StochRsi`, `UltimateOscillator`, dedicated wiki page:
`Ppo`, `Dpo`, `Coppock`, `AroonOscillator`, `Vortex`, `MassIndex`. - Moving Averages: `Smma`, `Trima`, `Zlema`, `T3`, `Vwma`.
- Volatility: `Natr`, `StdDev`, `UlcerIndex`, `HistoricalVolatility`, - Momentum Oscillators: `Mom`, `Cmo`, `Tsi`, `Pmo`, `StochRsi`,
`BollingerBandwidth`, `PercentB`, `SuperTrend`, `ChandelierExit`, `UltimateOscillator`.
`ChandeKrollStop`, `AtrTrailingStop`. - 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`, - Volume: `Adl`, `VolumePriceTrend`, `ChaikinMoneyFlow`,
`ChaikinOscillator`, `ForceIndex`, `EaseOfMovement`. `ChaikinOscillator`, `ForceIndex`, `EaseOfMovement`.
- Statistics: `TypicalPrice`, `MedianPrice`, `WeightedClose`, - Price Statistics: `TypicalPrice`, `MedianPrice`, `WeightedClose`,
`LinearRegression`, `LinRegSlope`. `LinearRegression`, `LinRegSlope`, `ZScore`, `LinRegAngle`.
- `TickAggregator::with_gap_fill` — opt-in mode that emits a flat placeholder - `TickAggregator::with_gap_fill` — opt-in mode that emits a flat placeholder
candle for every empty bucket between two ticks, keeping the candle series candle for every empty bucket between two ticks, keeping the candle series
evenly spaced for downstream indicators. 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. Dependabot configuration.
### Changed ### 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 - `TickAggregator::push` returns `Result<Vec<Candle>>` (was
`Result<Option<Candle>>`) so a single tick can yield a closed bar plus gap `Result<Option<Candle>>`) so a single tick can yield a closed bar plus gap
fillers. fillers.
+14 -11
View File
@@ -95,17 +95,20 @@ python -m benchmarks.compare_libraries
## Indicators ## Indicators
63 streaming-first indicators across four families plus a statistics group. 71 streaming-first indicators across eight families. Every one passes the
Every one passes the `batch == streaming` equivalence test, reference-value `batch == streaming` equivalence test, reference-value tests, and reset
tests, and reset semantics tests. semantics tests.
| Family | Indicators | | Family | Indicators |
|-------------|-----------| |--------|-----------|
| Trend | SMA, EMA, WMA, DEMA, TEMA, HMA, KAMA, SMMA, TRIMA, ZLEMA, T3, VWMA | | Moving Averages | 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 | | Momentum Oscillators | RSI (Wilder), Stochastic, CCI, ROC, Williams %R, MFI, Awesome Oscillator, MOM, CMO, TSI, PMO, StochRSI, Ultimate Oscillator |
| 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 | | Trend & Directional | MACD, ADX (+DI/-DI), Aroon, TRIX, Aroon Oscillator, Vortex, Mass Index, Choppiness Index, Vertical Horizontal Filter |
| Volume | OBV, VWAP (cumulative + rolling), ADL, Volume-Price Trend, Chaikin Money Flow, Chaikin Oscillator, Force Index, Ease of Movement | | Price Oscillators | PPO, DPO, Coppock, Accelerator Oscillator, Balance of Power |
| Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope | | 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 Adding a new indicator means implementing one trait in Rust; all four bindings
inherit it automatically. inherit it automatically.
@@ -175,7 +178,7 @@ A Python live-trading example using the public `websockets` package lives at
``` ```
wickra/ wickra/
├── crates/ ├── crates/
│ ├── wickra-core/ core engine + all 63 indicators │ ├── wickra-core/ core engine + all 71 indicators
│ ├── wickra/ top-level facade crate (publishes on crates.io) │ ├── wickra/ top-level facade crate (publishes on crates.io)
│ │ + benches/ and examples/backtest.rs │ │ + benches/ and examples/backtest.rs
│ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds │ └── 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 // 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 // indicators. Ported from the Python test_streaming_vs_batch / test_known_values
// suites. // 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 high = close.map((c) => c + 1.5);
const low = 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 volume = Array.from({ length: N }, (_, i) => 1000 + (i % 7) * 50);
const open = close.map((c) => c - 0.5);
function eq(a, b) { function eq(a, b) {
if (Number.isNaN(a)) return Number.isNaN(b); if (Number.isNaN(a)) return Number.isNaN(b);
@@ -55,6 +56,9 @@ const scalarFactories = {
PercentB: () => new wickra.PercentB(20, 2), PercentB: () => new wickra.PercentB(20, 2),
LinearRegression: () => new wickra.LinearRegression(14), LinearRegression: () => new wickra.LinearRegression(14),
LinRegSlope: () => new wickra.LinRegSlope(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)) { 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) }, 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) }, 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) }, 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)) { 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.ok(Math.abs(out[2 * n - 2] - 4) < 1e-9); // value
assert.equal(out[2 * n - 1], 1); // direction 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.PercentB, (20, 2.0)),
(ta.LinearRegression, (14,)), (ta.LinearRegression, (14,)),
(ta.LinRegSlope, (14,)), (ta.LinRegSlope, (14,)),
(ta.VerticalHorizontalFilter, (28,)),
(ta.ZScore, (20,)),
(ta.LinRegAngle, (14,)),
] ]
@@ -131,6 +134,28 @@ CANDLE_SCALAR = {
lambda: ta.WeightedClose(), lambda: ta.WeightedClose(),
lambda ind, h, l, c, v: ind.batch(h, l, c), 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) 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 ------------------------------------------------------------ # --- 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 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. strategy — there is no second code path that drifts behind the streaming one.
The project ships 63 indicators across the four classical families (trend, The project ships 71 indicators across eight families — moving averages,
momentum, volatility, volume) plus a statistics group, and a small set of 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`, supporting types (`Candle`, `Tick`, `Chain`). The Rust core forbids `unsafe`,
so every binding inherits a so every binding inherits a
memory-safe implementation. Install is one command on every supported memory-safe implementation. Install is one command on every supported
@@ -64,71 +65,85 @@ Release notes and tagged builds:
### Indicator reference ### Indicator reference
Start with [Indicators-Overview.md](Indicators-Overview.md) for the Start with [Indicators-Overview.md](Indicators-Overview.md) for the full
cross-cutting taxonomy (trend / momentum / volatility / volume) and the eight-family taxonomy and the shared `Indicator` trait surface. The
shared `Indicator` trait surface. The per-indicator pages below cover per-indicator pages below cover formulas, parameters, warmup behaviour, edge
formulas, parameters, warmup behaviour, edge cases, and verified cases, and verified Rust / Python / Node examples. They are grouped by family,
Rust / Python / Node examples. They are grouped by family, mirroring the mirroring the `indicators/<family>/` directory layout.
`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-Sma.md](indicators/moving-averages/Indicator-Sma.md)
- [Indicator-Ema.md](indicators/trend/Indicator-Ema.md) - [Indicator-Ema.md](indicators/moving-averages/Indicator-Ema.md)
- [Indicator-Wma.md](indicators/trend/Indicator-Wma.md) - [Indicator-Wma.md](indicators/moving-averages/Indicator-Wma.md)
- [Indicator-Dema.md](indicators/trend/Indicator-Dema.md) - [Indicator-Dema.md](indicators/moving-averages/Indicator-Dema.md)
- [Indicator-Tema.md](indicators/trend/Indicator-Tema.md) - [Indicator-Tema.md](indicators/moving-averages/Indicator-Tema.md)
- [Indicator-Hma.md](indicators/trend/Indicator-Hma.md) - [Indicator-Hma.md](indicators/moving-averages/Indicator-Hma.md)
- [Indicator-Kama.md](indicators/trend/Indicator-Kama.md) - [Indicator-Kama.md](indicators/moving-averages/Indicator-Kama.md)
- [Indicator-Smma.md](indicators/trend/Indicator-Smma.md) - [Indicator-Smma.md](indicators/moving-averages/Indicator-Smma.md)
- [Indicator-Trima.md](indicators/trend/Indicator-Trima.md) - [Indicator-Trima.md](indicators/moving-averages/Indicator-Trima.md)
- [Indicator-Zlema.md](indicators/trend/Indicator-Zlema.md) - [Indicator-Zlema.md](indicators/moving-averages/Indicator-Zlema.md)
- [Indicator-T3.md](indicators/trend/Indicator-T3.md) - [Indicator-T3.md](indicators/moving-averages/Indicator-T3.md)
- [Indicator-Vwma.md](indicators/trend/Indicator-Vwma.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-Rsi.md](indicators/momentum-oscillators/Indicator-Rsi.md)
- [Indicator-MacdIndicator.md](indicators/momentum/Indicator-MacdIndicator.md) - [Indicator-Stochastic.md](indicators/momentum-oscillators/Indicator-Stochastic.md)
- [Indicator-Stochastic.md](indicators/momentum/Indicator-Stochastic.md) - [Indicator-Cci.md](indicators/momentum-oscillators/Indicator-Cci.md)
- [Indicator-Cci.md](indicators/momentum/Indicator-Cci.md) - [Indicator-Roc.md](indicators/momentum-oscillators/Indicator-Roc.md)
- [Indicator-Roc.md](indicators/momentum/Indicator-Roc.md) - [Indicator-WilliamsR.md](indicators/momentum-oscillators/Indicator-WilliamsR.md)
- [Indicator-WilliamsR.md](indicators/momentum/Indicator-WilliamsR.md) - [Indicator-Mfi.md](indicators/momentum-oscillators/Indicator-Mfi.md)
- [Indicator-Adx.md](indicators/momentum/Indicator-Adx.md) - [Indicator-AwesomeOscillator.md](indicators/momentum-oscillators/Indicator-AwesomeOscillator.md)
- [Indicator-Mfi.md](indicators/momentum/Indicator-Mfi.md) - [Indicator-Mom.md](indicators/momentum-oscillators/Indicator-Mom.md)
- [Indicator-Trix.md](indicators/momentum/Indicator-Trix.md) - [Indicator-Cmo.md](indicators/momentum-oscillators/Indicator-Cmo.md)
- [Indicator-AwesomeOscillator.md](indicators/momentum/Indicator-AwesomeOscillator.md) - [Indicator-Tsi.md](indicators/momentum-oscillators/Indicator-Tsi.md)
- [Indicator-Aroon.md](indicators/momentum/Indicator-Aroon.md) - [Indicator-Pmo.md](indicators/momentum-oscillators/Indicator-Pmo.md)
- [Indicator-Mom.md](indicators/momentum/Indicator-Mom.md) - [Indicator-StochRsi.md](indicators/momentum-oscillators/Indicator-StochRsi.md)
- [Indicator-Cmo.md](indicators/momentum/Indicator-Cmo.md) - [Indicator-UltimateOscillator.md](indicators/momentum-oscillators/Indicator-UltimateOscillator.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)
**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-MacdIndicator.md](indicators/trend-directional/Indicator-MacdIndicator.md)
- [Indicator-Atr.md](indicators/volatility/Indicator-Atr.md) - [Indicator-Adx.md](indicators/trend-directional/Indicator-Adx.md)
- [Indicator-Keltner.md](indicators/volatility/Indicator-Keltner.md) - [Indicator-Aroon.md](indicators/trend-directional/Indicator-Aroon.md)
- [Indicator-Donchian.md](indicators/volatility/Indicator-Donchian.md) - [Indicator-Trix.md](indicators/trend-directional/Indicator-Trix.md)
- [Indicator-Psar.md](indicators/volatility/Indicator-Psar.md) - [Indicator-AroonOscillator.md](indicators/trend-directional/Indicator-AroonOscillator.md)
- [Indicator-Natr.md](indicators/volatility/Indicator-Natr.md) - [Indicator-Vortex.md](indicators/trend-directional/Indicator-Vortex.md)
- [Indicator-StdDev.md](indicators/volatility/Indicator-StdDev.md) - [Indicator-MassIndex.md](indicators/trend-directional/Indicator-MassIndex.md)
- [Indicator-UlcerIndex.md](indicators/volatility/Indicator-UlcerIndex.md) - [Indicator-ChoppinessIndex.md](indicators/trend-directional/Indicator-ChoppinessIndex.md)
- [Indicator-HistoricalVolatility.md](indicators/volatility/Indicator-HistoricalVolatility.md) - [Indicator-VerticalHorizontalFilter.md](indicators/trend-directional/Indicator-VerticalHorizontalFilter.md)
- [Indicator-BollingerBandwidth.md](indicators/volatility/Indicator-BollingerBandwidth.md)
- [Indicator-PercentB.md](indicators/volatility/Indicator-PercentB.md) **Price Oscillators** — difference-of-averages momentum around zero.
- [Indicator-SuperTrend.md](indicators/volatility/Indicator-SuperTrend.md)
- [Indicator-ChandelierExit.md](indicators/volatility/Indicator-ChandelierExit.md) - [Indicator-Ppo.md](indicators/price-oscillators/Indicator-Ppo.md)
- [Indicator-ChandeKrollStop.md](indicators/volatility/Indicator-ChandeKrollStop.md) - [Indicator-Dpo.md](indicators/price-oscillators/Indicator-Dpo.md)
- [Indicator-AtrTrailingStop.md](indicators/volatility/Indicator-AtrTrailingStop.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. **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-ForceIndex.md](indicators/volume/Indicator-ForceIndex.md)
- [Indicator-EaseOfMovement.md](indicators/volume/Indicator-EaseOfMovement.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-TypicalPrice.md](indicators/price-statistics/Indicator-TypicalPrice.md)
- [Indicator-MedianPrice.md](indicators/statistics/Indicator-MedianPrice.md) - [Indicator-MedianPrice.md](indicators/price-statistics/Indicator-MedianPrice.md)
- [Indicator-WeightedClose.md](indicators/statistics/Indicator-WeightedClose.md) - [Indicator-WeightedClose.md](indicators/price-statistics/Indicator-WeightedClose.md)
- [Indicator-LinearRegression.md](indicators/statistics/Indicator-LinearRegression.md) - [Indicator-LinearRegression.md](indicators/price-statistics/Indicator-LinearRegression.md)
- [Indicator-LinRegSlope.md](indicators/statistics/Indicator-LinRegSlope.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 ## See also
+139 -196
View File
@@ -1,11 +1,9 @@
# Indicators Overview # Indicators Overview
Wickra ships 63 indicators, organised under the four classical families — Wickra ships **71 indicators** organised into **eight families**. Each family
trend, momentum, volatility, volume — plus a fifth **statistics** group for collects indicators that answer the same kind of question and groups at least
price transforms and rolling regressions. The same family labels are used five of them, so the taxonomy here maps one-to-one onto the
here, with a second-level grouping that reflects how the indicators actually `docs/wiki/indicators/<family>/` directory layout.
behave (which output range they live in, what data they need, what question
they answer).
Every indicator is an O(1) state machine that consumes one input at a time 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 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 trait surface and warmup-period semantics are covered in
[Quickstart: Rust](Quickstart-Rust.md) and [Warmup Periods](Warmup-Periods.md). [Quickstart: Rust](Quickstart-Rust.md) and [Warmup Periods](Warmup-Periods.md).
The "Output range" column below is the value bounds an indicator emits once The "Output range" column is the value bounds an indicator emits once warm;
warm. "unbounded" means it tracks the price scale of the input. The "unbounded" means it tracks the price scale of the input. The "Warmup" column
"Warmup" column quotes `warmup_period()` as the indicator reports it; this quotes `warmup_period()` as the indicator reports it the **exact**
is the **exact** first-emission index for every indicator — the first first-emission index: the first non-`None` output lands on input
non-`None` output lands on input `warmup_period()` (index `warmup_period()` (0-indexed `warmup_period() - 1`).
`warmup_period() - 1`).
## Trend The eight families:
Trend indicators smooth the price series to surface direction. They are | # | Family | Count | What it answers |
all single-input, single-output (`f64 → f64`). |---|--------|-------|-----------------|
| 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 Smooth the price series to surface direction. All are single-input,
benchmarks against fancier averages. single-output (`f64 → f64`) except `Vwma`, which weights by volume.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `Sma` | Equal-weighted rolling mean over `period` closes. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Sma.md](indicators/moving-averages/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) | | `Ema` | EMA with `α = 2 / (period + 1)`, SMA-seeded. | `f64` | `f64` | unbounded (price scale) | `period` | `period` | [Indicator-Ema.md](indicators/moving-averages/Indicator-Ema.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) | | `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) |
| `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) | | `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 Measure the *rate* of price change. Several are bounded by construction
you stack more EMAs, but so does responsiveness to noise. (0100 / ±100 oscillators), the rest are difference-driven.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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) |
| `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) | | `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) |
| `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) | | `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) |
| `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) | | `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) |
| `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) | | `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) |
| `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) | | `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 ## Trend & Directional
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.
### Adaptive & hybrid Answer whether a trend exists and which way it points — directional systems,
crossover packages and trend-versus-range filters.
These two adjust their effective smoothing on the fly. They are the
"smart" trend filters; both also live in Trend by directory placement.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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) |
| `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) | | `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. Difference-of-averages and intrabar oscillators that swing around a zero line.
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
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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) |
| `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) | | `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) |
| `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) | | `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) |
| `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) | | `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 Indicators that measure dispersion / range and those that draw an envelope
envelope around price, those that report a scalar dispersion/range, and a around price.
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
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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) |
| `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) | | `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) |
| `StdDev` | Rolling population standard deviation of price. | `f64` | `f64` | `[0, ∞)` (price scale) | `period = 20` (Python) | `period` | [Indicator-StdDev.md](indicators/volatility/Indicator-StdDev.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) |
| `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) | | `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) |
| `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) | | `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 | | 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) | | `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 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) | | `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 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) | | `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: 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) | | `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 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) | | `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
Volume indicators all take `Candle` input because they need `close` and Price moves weighted or confirmed by traded volume. All take `Candle` input.
`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.
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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) | | `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) | | `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 Per-bar price transforms and rolling least-squares regressions.
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`).
| Indicator | One-liner | Input | Output | Range | Defaults | Warmup | Deep dive | | 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) | | `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/statistics/Indicator-MedianPrice.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/statistics/Indicator-WeightedClose.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) |
### Regression | `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) |
Rolling ordinary-least-squares fits over the last `period` prices. | `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) |
| 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) |
## Pick the right indicator for… ## Pick the right indicator for…
A short cheat-sheet of "I want X, which indicator?" answers, grounded in A short cheat-sheet of "I want X, which indicator?" answers, grounded in
what each indicator actually computes. what each indicator actually computes.
- **Fast trend filter, minimal lag, single line.** `Hma` for smoothness + - **Fast trend filter, minimal lag.** `Hma` for smoothness + responsiveness,
responsiveness, `Tema` for further lag reduction at the cost of more `Tema` for further lag reduction at the cost of noise, `Kama` for
noise. If you want adaptiveness instead of fixed lag, `Kama`. adaptiveness instead of fixed lag.
- **Slow trend filter, smooth as glass.** `Sma` is the simplest; `Ema` - **Slow trend filter.** `Sma` is the simplest; `Ema` responds slightly
responds slightly faster with the same smoothness budget. For long faster with the same smoothness budget.
trend filters either is appropriate; the difference is mostly aesthetic. - **Trend-following crossovers.** Two-line crossovers are the textbook entry;
- **Trend-following crossovers.** Two-line crossovers (`Ema(fast)` vs `MacdIndicator` packages the idea with a signal line and histogram.
`Ema(slow)`, or any of the trend pairs) are the textbook entry signal; - **Trend strength — is there a trend at all?** `Adx` (`> 25` trending,
`MacdIndicator` packages the same idea with a signal line and histogram. `< 20` ranging); `ChoppinessIndex` / `VerticalHorizontalFilter` answer the
- **Trend strength (is there a trend at all?).** `Adx` is the canonical same question without a direction.
answer: `adx > 25` is "trending", `adx < 20` is "ranging". `Aroon` is - **Overbought / oversold.** `Rsi` is the default; `Stochastic` for faster
a softer alternative when you want directional confirmation. signals; `WilliamsR` for an inverted scale; `Mfi` for a volume-aware RSI.
- **Overbought / oversold reversal candidate.** `Rsi` is the default; - **Volatility level vs. momentum.** `Atr` / `TrueRange` for the level;
`Stochastic` for faster signals; `WilliamsR` for the same logic with an `ChaikinVolatility` for whether ranges are expanding or contracting.
inverted scale; `Mfi` if you have volume and want a volume-aware RSI. - **Breakout level.** `Donchian` upper/lower bands are the Turtle-style
- **Volatility expansion / contraction.** `BollingerBands` width trigger.
(`upper lower`) for relative volatility; `Atr` for absolute per-bar - **Trailing stop.** `Psar`, `SuperTrend`, `ChandelierExit`,
volatility in price units; `Keltner` to compare price against an `ChandeKrollStop` and `AtrTrailingStop` are a whole family of them.
ATR-scaled envelope. - **Volume confirmation.** `Obv` is the simplest; `ChaikinMoneyFlow` is a
- **Breakout level.** `Donchian` upper/lower bands are the textbook bounded balance; `Vwap` / `RollingVwap` give a volume-weighted reference.
Turtle-style breakout trigger. - **Mean reversion.** `ZScore` flags statistically stretched prices;
- **Trailing stop.** `Psar` gives you a per-bar stop level that flips `BollingerBandwidth` / `PercentB` locate price within the bands.
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.
## Source-of-truth files ## Source-of-truth files
Every claim above can be checked against the source in 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) [`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 — 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 ground truth for sample values. Python defaults (the `period = 14` etc.) come
tables above) come from the `#[pyo3(signature = …)]` attributes in from the `#[pyo3(signature = …)]` attributes in
[`bindings/python/src/lib.rs`](https://github.com/kingchenc/wickra/blob/main/bindings/python/src/lib.rs); [`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` indicators without a Python default require an explicit argument.
argument.
## See also ## See also
- [Warmup Periods](Warmup-Periods.md) — full verified table of every - [Warmup Periods](Warmup-Periods.md) — verified table of every indicator's
indicator's `warmup_period()`. `warmup_period()`.
- [Indicator Chaining](Indicator-Chaining.md) — combining indicators with - [Indicator Chaining](Indicator-Chaining.md) — combining indicators with
`Chain` and the stacked-warmup rule. `Chain` and the stacked-warmup rule.
- [Quickstart: Rust](Quickstart-Rust.md), [Quickstart: Python](Quickstart-Python.md), - [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 | | `WeightedClose` | `WeightedClose::new()` | constant `1` | 1 | 1st |
| `LinearRegression` | `LinearRegression::new(14)` | `period` | 14 | 14th | | `LinearRegression` | `LinearRegression::new(14)` | `period` | 14 | 14th |
| `LinRegSlope` | `LinRegSlope::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 ## Multi-output indicators
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | unbounded oscillator (zero-centred) |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (centred on 0; in price-difference units) | | Output range | unbounded (centred on 0; in price-difference units) |
@@ -189,8 +188,8 @@ row 39: 14.5
## See also ## 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). 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. triple-smoothed series.
- [Warmup Periods](../../Warmup-Periods.md) — bare `slow_period`. - [Warmup Periods](../../Warmup-Periods.md) — bare `slow_period`.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | unbounded oscillator |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (typically `[200, +200]` thanks to the 0.015 factor) | | Output range | unbounded (typically `[200, +200]` thanks to the 0.015 factor) |
@@ -191,9 +190,9 @@ row 24: 126.66666666666667
## See also ## See also
- [Indicator: Rsi](Indicator-Rsi.md) — bounded sibling for comparison. - [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — bounded sibling for comparison.
- [Indicator: WilliamsR](Indicator-WilliamsR.md) — another candle-input - [Indicator: WilliamsR](../momentum-oscillators/Indicator-WilliamsR.md) — another candle-input
oscillator, range-based rather than deviation-based. 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. confirmation alongside CCI.
- [Warmup Periods](../../Warmup-Periods.md) — `period` (no off-by-one). - [Warmup Periods](../../Warmup-Periods.md) — `period` (no off-by-one).
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Bounded oscillators (100 … 100) |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[100, 100]` | | Output range | `[100, 100]` |
@@ -151,6 +150,6 @@ gain/loss sum here matches the original definition and TA-Lib's `CMO`.
## See also ## See also
- [Indicator-Rsi.md](Indicator-Rsi.md) — the Wilder-smoothed relative. - [Indicator-Rsi.md](../momentum-oscillators/Indicator-Rsi.md) — the Wilder-smoothed relative.
- [Indicator-Mom.md](Indicator-Mom.md) — raw price-difference momentum. - [Indicator-Mom.md](../momentum-oscillators/Indicator-Mom.md) — raw price-difference momentum.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | bounded oscillator (volume-driven) |
| Input type | `Candle` (volume needed) | | Input type | `Candle` (volume needed) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, 100]` | | Output range | `[0, 100]` |
@@ -198,7 +197,7 @@ row 19: 100
## See also ## See also
- [Indicator: Rsi](Indicator-Rsi.md) — the price-only ancestor. - [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — the price-only ancestor.
- [Indicator: Adx](Indicator-Adx.md) — directional/trend strength to - [Indicator: Adx](../trend-directional/Indicator-Adx.md) — directional/trend strength to
pair with MFI's overbought/oversold reading. pair with MFI's overbought/oversold reading.
- [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one). - [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one).
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero (price-difference scale) | | 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 The simplest momentum primitive. Positive output means price is higher
than it was `period` bars ago, negative means lower, and the magnitude is 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. expressed as a percentage of the old price.
## Parameters ## Parameters
@@ -128,7 +127,7 @@ Output:
cross (momentum flipping sign) and divergence (price making a new high cross (momentum flipping sign) and divergence (price making a new high
while `Mom` makes a lower high — a stalling trend). Because the output is while `Mom` makes a lower high — a stalling trend). Because the output is
in price units, `Mom` values are not comparable across instruments at 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. scale-free percentage instead.
## Common pitfalls ## Common pitfalls
@@ -147,6 +146,6 @@ is the standard `price price[period]` difference, matching TA-Lib's
## See also ## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the percentage-scaled counterpart. - [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the percentage-scaled counterpart.
- [Indicator-Cmo.md](Indicator-Cmo.md) — bounded momentum from summed changes. - [Indicator-Cmo.md](../momentum-oscillators/Indicator-Cmo.md) — bounded momentum from summed changes.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero | | 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 The classic PMO **signal line** is a 10-period EMA of this PMO line. It is
deliberately not bundled in — compose it yourself with 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 ## 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 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, from an extreme. Because the rate of change is taken in percentage terms,
PMO values *are* comparable across instruments — unlike raw PMO values *are* comparable across instruments — unlike raw
[`Mom`](Indicator-Mom.md). [`Mom`](../momentum-oscillators/Indicator-Mom.md).
## Common pitfalls ## Common pitfalls
@@ -162,9 +161,9 @@ Carl Swenlin, DecisionPoint Price Momentum Oscillator. The
## See also ## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the raw rate of change PMO smooths. - [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the raw rate of change PMO smooths.
- [Indicator-Tsi.md](Indicator-Tsi.md) — another double-smoothed momentum - [Indicator-Tsi.md](../momentum-oscillators/Indicator-Tsi.md) — another double-smoothed momentum
oscillator. oscillator.
- [Indicator-Chaining.md](../Indicator-Chaining.md) — how to add the - [Indicator-Chaining.md](../../Indicator-Chaining.md) — how to add the
signal-line EMA. signal-line EMA.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | unbounded oscillator |
| Input type | `f64` (close) | | Input type | `f64` (close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (centred on 0; expressed as a percent) | | Output range | unbounded (centred on 0; expressed as a percent) |
@@ -164,10 +163,10 @@ warmup: 4
## See also ## 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. 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. 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. cousin operating on EMA differences instead of raw close differences.
- [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family. - [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | bounded oscillator |
| Input type | `f64` (close) | | Input type | `f64` (close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, 100]` | | Output range | `[0, 100]` |
@@ -204,9 +203,9 @@ last : 57.91502067008556
## See also ## See also
- [Indicator: MacdIndicator](Indicator-MacdIndicator.md) — also momentum, - [Indicator: MacdIndicator](../trend-directional/Indicator-MacdIndicator.md) — also momentum,
but trend-following and unbounded. 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. oscillator, faster and noisier than RSI.
- [Warmup Periods](../../Warmup-Periods.md) — the canonical `period + 1` - [Warmup Periods](../../Warmup-Periods.md) — the canonical `period + 1`
off-by-one explained. off-by-one explained.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Bounded oscillators (0 … 100) |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, 100]` | | 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 Tushar Chande and Stanley Kroll, *The New Technical Trader* (1994). The
implementation is the standard Stochastic-of-RSI; the flat-window 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 ## See also
- [Indicator-Rsi.md](Indicator-Rsi.md) — the underlying oscillator. - [Indicator-Rsi.md](../momentum-oscillators/Indicator-Rsi.md) — the underlying oscillator.
- [Indicator-Stochastic.md](Indicator-Stochastic.md) — the same formula on - [Indicator-Stochastic.md](../momentum-oscillators/Indicator-Stochastic.md) — the same formula on
price instead of RSI. price instead of RSI.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -13,8 +13,7 @@ a `Chain` with `Sma::new(slow_period)`.
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | bounded oscillator |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `StochasticOutput { k, d }` | | Output type | `StochasticOutput { k, d }` |
| Output range | `k, d ∈ [0, 100]` | | Output range | `k, d ∈ [0, 100]` |
@@ -212,9 +211,9 @@ row 19 : { k: 47.26766986190959, d: 62.55762656278284 }
## See also ## 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`. 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]`. fast `%K`, plotted on `[100, 0]`.
- [Warmup Periods](../../Warmup-Periods.md) — `k_period + d_period 1` rule - [Warmup Periods](../../Warmup-Periods.md) — `k_period + d_period 1` rule
in context. in context.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | roughly `[100, 100]`, centred on zero | | 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 ## See also
- [Indicator-Mom.md](Indicator-Mom.md) — the raw momentum TSI smooths. - [Indicator-Mom.md](../momentum-oscillators/Indicator-Mom.md) — the raw momentum TSI smooths.
- [Indicator-MacdIndicator.md](Indicator-MacdIndicator.md) — another - [Indicator-MacdIndicator.md](../trend-directional/Indicator-MacdIndicator.md) — another
EMA-difference momentum oscillator with a signal line. EMA-difference momentum oscillator with a signal line.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | Bounded oscillators (0 … 100) |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, 100]` | | Output range | `[0, 100]` |
@@ -173,7 +172,7 @@ Larry Williams, "The Ultimate Oscillator", *Technical Analysis of Stocks
## See also ## See also
- [Indicator-Stochastic.md](Indicator-Stochastic.md) — single-timeframe - [Indicator-Stochastic.md](../momentum-oscillators/Indicator-Stochastic.md) — single-timeframe
bounded oscillator. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Momentum Oscillators |
| Sub-category | bounded oscillator |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[100, 0]` | | Output range | `[100, 0]` |
@@ -177,8 +176,8 @@ row 2: -0
## See also ## 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`. 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. better behaved in trending markets.
- [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one). - [Warmup Periods](../../Warmup-Periods.md) — bare `period` (no off-by-one).
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -208,7 +207,7 @@ Commodities**, February 1994 (TEMA).
## See also ## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the building block. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the building block.
- [Indicator-Tema.md](Indicator-Tema.md) — three-EMA version, less lag still. - [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — three-EMA version, less lag still.
- [Indicator-Hma.md](Indicator-Hma.md) — same lag-reduction goal, built on WMAs. - [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — same lag-reduction goal, built on WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -195,7 +194,7 @@ smoothing identity attributed to Robert Brown (1956).
## See also ## See also
- [Indicator-Sma.md](Indicator-Sma.md) — equal weights, identical seed. - [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — equal weights, identical seed.
- [Indicator-Dema.md](Indicator-Dema.md) — `2·EMA EMA(EMA)`. - [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — `2·EMA EMA(EMA)`.
- [Indicator-Tema.md](Indicator-Tema.md) — `3·EMA 3·EMA(EMA) + 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Adaptive & hybrid |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -223,7 +222,7 @@ original HMA derivation, hosted on Hull's site at
## See also ## See also
- [Indicator-Wma.md](Indicator-Wma.md) — the building block. - [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — the building block.
- [Indicator-Tema.md](Indicator-Tema.md) — same lag-reduction goal, EMA-based. - [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — same lag-reduction goal, EMA-based.
- [Indicator-Kama.md](Indicator-Kama.md) — adaptive smoothing instead of fixed. - [Indicator-Kama.md](../moving-averages/Indicator-Kama.md) — adaptive smoothing instead of fixed.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Adaptive & hybrid |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -244,8 +243,8 @@ empirically.
## See also ## 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. `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. Wickra.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Simple averages |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -177,8 +176,8 @@ and pandas (`rolling(period).mean()`).
## See also ## See also
- [Indicator-Ema.md](Indicator-Ema.md) — same smoothness budget, less lag. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — same smoothness budget, less lag.
- [Indicator-Wma.md](Indicator-Wma.md) — linear weights instead of equal. - [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — linear weights instead of equal.
- [Indicator-Hma.md](Indicator-Hma.md) — built on three WMAs for near-zero - [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — built on three WMAs for near-zero
lag. lag.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | 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 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, noise rejection from a single line. Its main role in this library,
however, is structural: it is the exact smoothing kernel inside 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 so reaching for `Smma` directly lets you reproduce Wilder-style averages
on any series. on any series.
@@ -164,8 +163,8 @@ the standard SMA-seeded formulation, matching TA-Lib's `RMA`.
## See also ## See also
- [Indicator-Ema.md](Indicator-Ema.md) — faster exponential average. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — faster exponential average.
- [Indicator-Sma.md](Indicator-Sma.md) — the equal-weighted mean used as - [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the equal-weighted mean used as
the SMMA seed. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -166,7 +165,7 @@ match Tillson's published derivation and TA-Lib's `T3`.
## See also ## See also
- [Indicator-Tema.md](Indicator-Tema.md) — the three-EMA relative. - [Indicator-Tema.md](../moving-averages/Indicator-Tema.md) — the three-EMA relative.
- [Indicator-Dema.md](Indicator-Dema.md) — the two-EMA relative. - [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — the two-EMA relative.
- [Indicator-Zlema.md](Indicator-Zlema.md) — low-lag average via de-lagging. - [Indicator-Zlema.md](../moving-averages/Indicator-Zlema.md) — low-lag average via de-lagging.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -202,7 +201,7 @@ in the same article.
## See also ## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the building block. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the building block.
- [Indicator-Dema.md](Indicator-Dema.md) — second-order's sibling. - [Indicator-Dema.md](../moving-averages/Indicator-Dema.md) — second-order's sibling.
- [Indicator-Hma.md](Indicator-Hma.md) — similar lag profile, built on WMAs. - [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — similar lag profile, built on WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Simple averages |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | 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 `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 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 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. matters.
## Common pitfalls ## Common pitfalls
@@ -161,7 +160,7 @@ odd/even split used here (`n1`, `n2`) matches TA-Lib's `TRIMA`.
## See also ## See also
- [Indicator-Sma.md](Indicator-Sma.md) — the building block applied twice. - [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — the building block applied twice.
- [Indicator-Wma.md](Indicator-Wma.md) — linear (not triangular) weights. - [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — linear (not triangular) weights.
- [Indicator-Smma.md](Indicator-Smma.md) — the other F1 average. - [Indicator-Smma.md](../moving-averages/Indicator-Smma.md) — the other F1 average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Volume-weighted averages |
| Input type | `Candle` (uses `close` and `volume`) | | Input type | `Candle` (uses `close` and `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -170,7 +169,7 @@ with an explicit zero-volume fallback added for robustness.
## See also ## 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 - [Indicator-Vwap.md](../volume/Indicator-Vwap.md) — volume-weighted price
since the start of the stream. since the start of the stream.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Simple averages |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | 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`: The most important downstream use of `Wma` inside Wickra is `Hma`:
`Hma` is built entirely from three `Wma` instances (see `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 ## Common pitfalls
@@ -180,7 +179,7 @@ reference implementation and matches Wickra's output bit-for-bit.
## See also ## See also
- [Indicator-Sma.md](Indicator-Sma.md) — equal weights instead of linear. - [Indicator-Sma.md](../moving-averages/Indicator-Sma.md) — equal weights instead of linear.
- [Indicator-Ema.md](Indicator-Ema.md) — exponential decay instead of linear. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — exponential decay instead of linear.
- [Indicator-Hma.md](Indicator-Hma.md) — Hull MA, built from three WMAs. - [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — Hull MA, built from three WMAs.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Trend | | Family | Moving Averages |
| Sub-category | Exponential family |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; tracks the input price scale | | Output range | unbounded; tracks the input price scale |
@@ -161,7 +160,7 @@ of Stocks & Commodities* (2010). The implementation here uses the standard
## See also ## See also
- [Indicator-Ema.md](Indicator-Ema.md) — the inner average ZLEMA de-lags. - [Indicator-Ema.md](../moving-averages/Indicator-Ema.md) — the inner average ZLEMA de-lags.
- [Indicator-Hma.md](Indicator-Hma.md) — another low-lag average, via WMAs. - [Indicator-Hma.md](../moving-averages/Indicator-Hma.md) — another low-lag average, via WMAs.
- [Indicator-T3.md](Indicator-T3.md) — low-lag average via a six-EMA cascade. - [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. - [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) 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 momentum, the Accelerator measures the *change* in momentum — it is the AO
minus a short moving average of itself. Because acceleration leads speed, the minus a short moving average of itself. Because acceleration leads speed, the
`AC` tends to turn before the `AO` does. Bill Williams' classic configuration `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 ## 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. momentum oscillator the Accelerator is built on.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [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 ## See also
- [Indicator-AwesomeOscillator.md](Indicator-AwesomeOscillator.md) — another - [Indicator-AwesomeOscillator.md](../momentum-oscillators/Indicator-AwesomeOscillator.md) — another
Bill Williams-era price oscillator. Bill Williams-era price oscillator.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Price Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero | | 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 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 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 their sum. On a **monthly** chart with the conventional
`(14, 11, 10)` settings, the curve turning *up from below zero* has `(14, 11, 10)` settings, the curve turning *up from below zero* has
historically marked the start of a new bull phase. 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 ## See also
- [Indicator-Roc.md](Indicator-Roc.md) — the rate-of-change building block. - [Indicator-Roc.md](../momentum-oscillators/Indicator-Roc.md) — the rate-of-change building block.
- [Indicator-Wma.md](../trend/Indicator-Wma.md) — the smoothing average. - [Indicator-Wma.md](../moving-averages/Indicator-Wma.md) — the smoothing average.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Price Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero (price-difference scale) | | 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 - **Trading the zero cross.** DPO is detrended *and* time-shifted; its
latest value is historical. Use it to size cycles, not to time entries. 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 - **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. momentum.
## References ## References
@@ -155,8 +154,8 @@ The Detrended Price Oscillator is a standard cycle-analysis study; the
## See also ## 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. 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. often confused with.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Price Oscillators |
| Sub-category | Unbounded oscillators |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero (percent) | | Output range | unbounded around zero (percent) |
@@ -22,13 +21,13 @@
PPO = 100 · (EMA_fast EMA_slow) / EMA_slow 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 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 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 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 across time, which raw MACD values cannot. The classic PPO **signal
line** is a 9-period EMA of this PPO line; compose it with 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 ## Parameters
@@ -149,7 +148,7 @@ follows the standard PPO definition and matches TA-Lib's `PPO`.
## See also ## 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. 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. - [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 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` 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 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 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 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 for thresholds — e.g. "only trade with the trend while the angle exceeds
`30°`" — and for comparing trend pitch across instruments with different price `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 ## Common pitfalls
@@ -136,8 +136,8 @@ TA-Lib's `LINEARREG_ANGLE`.
## See also ## 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. 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. endpoint of the same rolling fit.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Statistics | | Family | Price Statistics |
| Sub-category | Regression |
| Input type | `f64` (price) | | Input type | `f64` (price) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero (price units per bar) | | 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 — `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 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 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`. zero when it is ranging. This is TA-Lib's `LINEARREG_SLOPE`.
@@ -143,8 +142,8 @@ TA-Lib's `LINEARREG_SLOPE`.
## See also ## See also
- [Indicator-LinearRegression.md](Indicator-LinearRegression.md) — the - [Indicator-LinearRegression.md](../price-statistics/Indicator-LinearRegression.md) — the
endpoint of the same rolling fit. 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. momentum, the unsmoothed cousin.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Statistics | | Family | Price Statistics |
| Sub-category | Regression |
| Input type | `f64` (price) | | Input type | `f64` (price) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price scale) | | 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, 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 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 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`. TA-Lib's `LINEARREG`.
## Parameters ## 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 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` 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 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 ## Common pitfalls
@@ -145,8 +144,8 @@ the endpoint formulation matches TA-Lib's `LINEARREG`.
## See also ## 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. 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. often compared against.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -6,8 +6,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Statistics | | Family | Price Statistics |
| Sub-category | Price transforms |
| Input type | `Candle` (uses `high`, `low`) | | Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price scale) | | 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 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' 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. and a useful close substitute when the close is noisy relative to the range.
## Parameters ## Parameters
@@ -131,6 +130,6 @@ The Median Price; the `(H + L) / 2` definition is standard (TA-Lib's
## See also ## See also
- [Indicator-TypicalPrice.md](Indicator-TypicalPrice.md) — `(H + L + C) / 3`. - [Indicator-TypicalPrice.md](../price-statistics/Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-WeightedClose.md](Indicator-WeightedClose.md) — `(H + L + 2C) / 4`. - [Indicator-WeightedClose.md](../price-statistics/Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Statistics | | Family | Price Statistics |
| Sub-category | Price transforms |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price scale) | | 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 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 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 are defined on, and a common input to feed any close-driven indicator when you
want the bar's range reflected in the value. want the bar's range reflected in the value.
@@ -132,6 +131,6 @@ standard (StockCharts, TA-Lib's `TYPPRICE`).
## See also ## See also
- [Indicator-MedianPrice.md](Indicator-MedianPrice.md) — `(H + L) / 2`. - [Indicator-MedianPrice.md](../price-statistics/Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicator-WeightedClose.md](Indicator-WeightedClose.md) — `(H + L + 2C) / 4`. - [Indicator-WeightedClose.md](../price-statistics/Indicator-WeightedClose.md) — `(H + L + 2C) / 4`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Statistics | | Family | Price Statistics |
| Sub-category | Price transforms |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price scale) | | Output range | unbounded (price scale) |
@@ -22,7 +21,7 @@
WeightedClose = (high + low + 2·close) / 4 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 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 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. when the closing print carries more signal than the extremes.
@@ -117,7 +116,7 @@ Output:
## Interpretation ## Interpretation
The weighted close sits on the spectrum between the raw close and the 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 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. 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 ## See also
- [Indicator-TypicalPrice.md](Indicator-TypicalPrice.md) — `(H + L + C) / 3`. - [Indicator-TypicalPrice.md](../price-statistics/Indicator-TypicalPrice.md) — `(H + L + C) / 3`.
- [Indicator-MedianPrice.md](Indicator-MedianPrice.md) — `(H + L) / 2`. - [Indicator-MedianPrice.md](../price-statistics/Indicator-MedianPrice.md) — `(H + L) / 2`.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -132,8 +132,8 @@ window.
## See also ## 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. standard deviation in the denominator.
- [Indicator-LinearRegression.md](Indicator-LinearRegression.md) — another - [Indicator-LinearRegression.md](../price-statistics/Indicator-LinearRegression.md) — another
rolling statistical fit. rolling statistical fit.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Trailing Stops |
| Sub-category | Trailing stop |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price scale) | | 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 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 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 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. itself, not the window's extreme, and reports one line rather than two.
## Parameters ## Parameters
@@ -151,7 +150,7 @@ the trade more room — fewer flips, wider risk; a smaller one flips sooner.
## Common pitfalls ## Common pitfalls
- **Expecting it off the window high.** It trails the *close*, so it can sit - **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 - **Feeding it scalar prices.** It needs the full `high`/`low`/`close` bar to
drive the ATR. drive the ATR.
@@ -162,9 +161,9 @@ here matches the common Sylvain Vervoort formulation.
## See also ## 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. 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. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Trailing Stops |
| Sub-category | Trailing stop |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(stop_long, stop_short)` | | Output type | `(stop_long, stop_short)` |
| Output range | unbounded (price scale) | | 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 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 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* than use that preliminary stop directly, it takes the *most extreme*
preliminary stop seen over a shorter window `q`. That second pass keeps a preliminary stop seen over a shorter window `q`. That second pass keeps a
single unusually wide bar from yanking the stop around. The classic single unusually wide bar from yanking the stop around. The classic
@@ -149,7 +148,7 @@ Output:
## Interpretation ## Interpretation
Use `stop_long` to trail a long position and `stop_short` to trail a short. 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 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 on a single wide-range bar — at the cost of reacting a little slower to a
genuine trend change. genuine trend change.
@@ -169,9 +168,9 @@ the two-stage formulation here matches the common TradingView implementation.
## See also ## 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. 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. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Trailing Stops |
| Sub-category | Trailing stop |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(long_stop, short_stop)` | | Output type | `(long_stop, short_stop)` |
| Output range | unbounded (price scale) | | Output range | unbounded (price scale) |
@@ -158,9 +157,9 @@ matches the standard definition.
## See also ## 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. 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. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value | | Item | Value |
|---------------------|------------------------------------------------------------------------------------| |---------------------|------------------------------------------------------------------------------------|
| Family | Volatility | | Family | Trailing Stops |
| Sub-category | trailing-stop (state machine) |
| Input type | `Candle` (uses `high`, `low`) | | Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded; bracketed by the prior two highs/lows | | Output range | unbounded; bracketed by the prior two highs/lows |
@@ -240,8 +239,8 @@ Output:
## See also ## See also
- [ATR](Indicator-Atr.md) — sister indicator from the same Wilder text. - [ATR](../volatility-bands/Indicator-Atr.md) — sister indicator from the same Wilder text.
- [Donchian Channels](Indicator-Donchian.md) — alternative breakout-style - [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — alternative breakout-style
trailing stop based on rolling extrema. 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. smoother stop boundary than PSAR in choppy regimes.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Trailing Stops |
| Sub-category | Trailing stop |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `(value, direction)` | | Output type | `(value, direction)` |
| Output range | `value`: unbounded (price scale); `direction`: `1.0` or `+1.0` | | 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 ## See also
- [Indicator-Psar.md](Indicator-Psar.md) — Wilder's parabolic stop-and-reverse. - [Indicator-Psar.md](../trailing-stops/Indicator-Psar.md) — Wilder's parabolic stop-and-reverse.
- [Indicator-AtrTrailingStop.md](Indicator-AtrTrailingStop.md) — a plain - [Indicator-AtrTrailingStop.md](../trailing-stops/Indicator-AtrTrailingStop.md) — a plain
ATR trailing stop without the band ratchet. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum (directional) | | Family | Trend & Directional |
| Sub-category | directional / trend-strength |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `AdxOutput { plus_di, minus_di, adx }` | | Output type | `AdxOutput { plus_di, minus_di, adx }` |
| Output range | each field in `[0, 100]` | | Output range | each field in `[0, 100]` |
@@ -237,9 +236,9 @@ row 39: { plusDi: 80, minusDi: 0, adx: 100 }
## See also ## See also
- [Indicator: Rsi](Indicator-Rsi.md) — shares Wilder smoothing. - [Indicator: Rsi](../momentum-oscillators/Indicator-Rsi.md) — shares Wilder smoothing.
- [Indicator: Aroon](Indicator-Aroon.md) — alternative trend-strength - [Indicator: Aroon](../trend-directional/Indicator-Aroon.md) — alternative trend-strength
measure, range-based. 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`. momentum, useful as a confirmation against `+DI` / `DI`.
- [Warmup Periods](../../Warmup-Periods.md) — the `2 · period` ADX entry. - [Warmup Periods](../../Warmup-Periods.md) — the `2 · period` ADX entry.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum (directional / trend-strength) | | Family | Trend & Directional |
| Sub-category | bounded directional pair |
| Input type | `Candle` | | Input type | `Candle` |
| Output type | `AroonOutput { up, down }` | | Output type | `AroonOutput { up, down }` |
| Output range | `up, down ∈ [0, 100]` | | Output range | `up, down ∈ [0, 100]` |
@@ -199,8 +198,8 @@ row 14: { up: 100, down: 0 }
## See also ## 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. 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. based, but reports close position rather than extremum age.
- [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family. - [Warmup Periods](../../Warmup-Periods.md) — the `period + 1` family.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum (trend strength) | | Family | Trend & Directional |
| Sub-category | Bounded oscillators |
| Input type | `Candle` (uses `high`, `low`) | | Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[100, 100]` | | Output range | `[100, 100]` |
@@ -22,7 +21,7 @@
AroonOscillator = AroonUp AroonDown 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 how recently the window's highest high and lowest low occurred. Their
difference lives in `[100, 100]`: strongly positive means the most recent difference lives in `[100, 100]`: strongly positive means the most recent
high is much fresher than the most recent low (an up-trend); strongly 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 ## 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. 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. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -141,6 +141,6 @@ standard one.
## See also ## 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. — the same trending-vs-ranging question on an inverted scale.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -12,8 +12,7 @@ shorter, conventional name `MACD`.
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Trend & Directional |
| Sub-category | unbounded oscillator (trend-following) |
| Input type | `f64` (close) | | Input type | `f64` (close) |
| Output type | `MacdOutput { macd, signal, histogram }` | | Output type | `MacdOutput { macd, signal, histogram }` |
| Output range | unbounded (centred on 0) | | Output range | unbounded (centred on 0) |
@@ -206,9 +205,9 @@ row 39 hist : 6.217248937900877e-15
## See also ## 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. 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). oscillator (triple-smoothed rate of change).
- [Warmup Periods](../../Warmup-Periods.md) — table including the `slow + - [Warmup Periods](../../Warmup-Periods.md) — table including the `slow +
signal 1` rule. signal 1` rule.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum (trend strength) | | Family | Trend & Directional |
| Sub-category | Range expansion |
| Input type | `Candle` (uses `high`, `low`) | | Input type | `Candle` (uses `high`, `low`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `> 0`, oscillates around `sum_period` | | Output range | `> 0`, oscillates around `sum_period` |
@@ -166,8 +165,8 @@ Commodities* (1992). The double-EMA-of-range construction and the `(9,
## See also ## 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. volatility in price units.
- [Indicator-BollingerBands.md](../volatility/Indicator-BollingerBands.md) - [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md)
— another range-expansion lens. — another range-expansion lens.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum | | Family | Trend & Directional |
| Sub-category | unbounded oscillator (zero-centred) |
| Input type | `f64` (close) | | Input type | `f64` (close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (typically a few percent, centred on 0) | | Output range | unbounded (typically a few percent, centred on 0) |
@@ -179,9 +178,9 @@ vals[49]: 3.5714285714285716
## See also ## 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 EMA-based momentum oscillator, useful as a confirmation against
TRIX zero-line crosses. 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. change TRIX is built on top of.
- [Warmup Periods](../../Warmup-Periods.md) — `3 · period 1` entry. - [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 clean trend walks almost only in its net direction, so `VHF` approaches `1`;
a choppy market doubles back constantly, inflating the denominator and pushing a choppy market doubles back constantly, inflating the denominator and pushing
`VHF` toward `0`. It answers the same question as the `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 ## Parameters
@@ -135,6 +135,6 @@ is the standard one.
## See also ## 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. trending-vs-ranging question on an inverted `[0, 100]` scale.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Momentum (trend strength) | | Family | Trend & Directional |
| Sub-category | Directional |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `VortexOutput { plus, minus }` | | Output type | `VortexOutput { plus, minus }` |
| Output range | each line `>= 0`, typically around `1.0` | | Output range | each line `>= 0`, typically around `1.0` |
@@ -154,7 +153,7 @@ definition here follows their original.
## See also ## See also
- [Indicator-Adx.md](Indicator-Adx.md) — Wilder's directional system. - [Indicator-Adx.md](../trend-directional/Indicator-Adx.md) — Wilder's directional system.
- [Indicator-Atr.md](../volatility/Indicator-Atr.md) — the true range - [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the true range
Vortex normalises against. Vortex normalises against.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value | | Item | Value |
|---------------------|--------------------------------------------------------------------------------------| |---------------------|--------------------------------------------------------------------------------------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | range-average |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded `≥ 0` | | Output range | unbounded `≥ 0` |
@@ -217,10 +216,10 @@ null
## See also ## See also
- [Bollinger Bands](Indicator-BollingerBands.md) — stddev-based volatility - [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — stddev-based volatility
envelope around an SMA. envelope around an SMA.
- [Keltner Channels](Indicator-Keltner.md) — directly composes EMA + ATR. - [Keltner Channels](../volatility-bands/Indicator-Keltner.md) — directly composes EMA + ATR.
- [Donchian Channels](Indicator-Donchian.md) — rolling high/low without - [Donchian Channels](../volatility-bands/Indicator-Donchian.md) — rolling high/low without
any smoothing. 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. through its acceleration factor.
@@ -8,8 +8,7 @@
| Item | Value | | Item | Value |
|---------------------|--------------------------------------------------------------------------------| |---------------------|--------------------------------------------------------------------------------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | envelope |
| Input type | `f64` (typically the close price) | | Input type | `f64` (typically the close price) |
| Output type | `BollingerOutput { upper: f64, middle: f64, lower: f64, stddev: f64 }` | | Output type | `BollingerOutput { upper: f64, middle: f64, lower: f64, stddev: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper`, `stddev ≥ 0` | | Output range | unbounded; `lower ≤ middle ≤ upper`, `stddev ≥ 0` |
@@ -250,9 +249,9 @@ Output:
## See also ## 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. 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. 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. size Bollinger-style stops.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Envelopes (derived) |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, ∞)` | | Output range | `[0, ∞)` |
@@ -23,7 +22,7 @@ Bandwidth = (upper lower) / middle
``` ```
where `upper`, `middle` and `lower` come from 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 `middle ± multiplier · stddev`, the bandwidth simplifies to
`2 · multiplier · stddev / middle` — volatility normalised by price level. `2 · multiplier · stddev / middle` — volatility normalised by price level.
Its extremes name two classic patterns: the **squeeze** (bandwidth at a 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 ## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — the bands - [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — the bands
this measures. 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. indicator: price *position* within the bands.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [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 A rising Chaikin Volatility warns that ranges are expanding fast — Chaikin
associated sharp rises with market tops, where panic widens bars. A low or 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 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. volatility, Chaikin Volatility gives its momentum.
## Common pitfalls ## Common pitfalls
@@ -149,6 +149,6 @@ here is the standard one.
## See also ## See also
- [Indicator-Atr.md](Indicator-Atr.md) — the level of per-bar volatility. - [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the level of per-bar volatility.
- [Indicator-TrueRange.md](Indicator-TrueRange.md) — raw single-bar range. - [Indicator-TrueRange.md](../volatility-bands/Indicator-TrueRange.md) — raw single-bar range.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,8 +8,7 @@
| Item | Value | | Item | Value |
|---------------------|--------------------------------------------------------------------| |---------------------|--------------------------------------------------------------------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | envelope (rolling extrema) |
| Input type | `Candle` (uses `high` and `low`) | | Input type | `Candle` (uses `high` and `low`) |
| Output type | `DonchianOutput { upper: f64, middle: f64, lower: f64 }` | | Output type | `DonchianOutput { upper: f64, middle: f64, lower: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper` | | Output range | unbounded; `lower ≤ middle ≤ upper` |
@@ -206,9 +205,9 @@ row 4 [upper, middle, lower]: [ 15, 13, 11 ]
## See also ## 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. 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. 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. for breakout systems.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Return-based |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, ∞)` (annualised percent) | | Output range | `[0, ∞)` (annualised percent) |
@@ -159,8 +158,8 @@ conventional choice for volatility estimation.
## See also ## See also
- [Indicator-StdDev.md](Indicator-StdDev.md) — population dispersion of - [Indicator-StdDev.md](../volatility-bands/Indicator-StdDev.md) — population dispersion of
raw prices. 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. percentage.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -1,6 +1,6 @@
# Keltner Channels # 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 > ATR-scaled envelopes. The middle line is the trend filter, the bands are
> the volatility cone. > the volatility cone.
@@ -8,8 +8,7 @@
| Item | Value | | Item | Value |
|---------------------|------------------------------------------------------------------------------------| |---------------------|------------------------------------------------------------------------------------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | envelope (composed: EMA + ATR) |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `KeltnerOutput { upper: f64, middle: f64, lower: f64 }` | | Output type | `KeltnerOutput { upper: f64, middle: f64, lower: f64 }` |
| Output range | unbounded; `lower ≤ middle ≤ upper` | | Output range | unbounded; `lower ≤ middle ≤ upper` |
@@ -207,9 +206,9 @@ row 4 [upper, middle, lower]: [ 17.166666666666664, 13.166666666666666, 9.166666
## See also ## See also
- [EMA](../trend/Indicator-Ema.md) — the centerline component. - [EMA](../moving-averages/Indicator-Ema.md) — the centerline component.
- [ATR](Indicator-Atr.md) — the envelope width component. - [ATR](../volatility-bands/Indicator-Atr.md) — the envelope width component.
- [Bollinger Bands](Indicator-BollingerBands.md) — envelope using stddev - [Bollinger Bands](../volatility-bands/Indicator-BollingerBands.md) — envelope using stddev
rather than ATR; useful side-by-side comparison. 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. extrema with no smoothing.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Range-average |
| Input type | `Candle` (uses `high`, `low`, `close`) | | Input type | `Candle` (uses `high`, `low`, `close`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, ∞)` (percent) | | Output range | `[0, ∞)` (percent) |
@@ -22,7 +21,7 @@
NATR = 100 · ATR(period) / close 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 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 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 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 instruments or across long stretches of time where the price level
drifts. A volatility filter like "skip entries when NATR > 5" or a stop drifts. A volatility filter like "skip entries when NATR > 5" or a stop
at "entry 3 × NATR %" stays meaningful on any symbol. Use raw 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). price units (e.g. to place a stop a fixed number of points away).
## Common pitfalls ## Common pitfalls
@@ -138,7 +137,7 @@ Systems* (1978).
## See also ## See also
- [Indicator-Atr.md](Indicator-Atr.md) — the price-unit original. - [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — the price-unit original.
- [Indicator-HistoricalVolatility.md](Indicator-HistoricalVolatility.md) — - [Indicator-HistoricalVolatility.md](../volatility-bands/Indicator-HistoricalVolatility.md) —
return-based annualised volatility. return-based annualised volatility.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Envelopes (derived) |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (`0` = lower band, `1` = upper band) | | Output range | unbounded (`0` = lower band, `1` = upper band) |
@@ -23,7 +22,7 @@
``` ```
where `upper` and `lower` come from 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 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. 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 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 - **Expecting `[0, 1]` bounds.** %b is intentionally unclamped; values
outside `[0, 1]` are the band-overshoot signal, not an error. outside `[0, 1]` are the band-overshoot signal, not an error.
- **Confusing it with bandwidth.** %b is price *position*; - **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 ## References
@@ -141,8 +140,8 @@ Bollinger's two derived indicators (with bandwidth).
## See also ## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — the bands - [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — the bands
this locates price within. 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*. companion derived indicator: band *width*.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Dispersion |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, ∞)` (price-difference scale) | | Output range | `[0, ∞)` (price-difference scale) |
@@ -26,7 +25,7 @@ StdDev = √variance
This is the **population** standard deviation (divisor `n`, not `n 1`) This is the **population** standard deviation (divisor `n`, not `n 1`)
— the exact dispersion measure that drives the band width of — 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 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 updated by one add and one subtract per bar. Floating-point cancellation
can leave the computed variance very slightly negative; it is clamped to 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`, - **Expecting the sample standard deviation.** `StdDev` divides by `n`,
not `n 1`. For the unbiased return-based estimator use 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 - **Comparing across instruments.** The output is in price units; a
`StdDev` of `5` is not comparable between a $10 and a $1000 asset. `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 ## See also
- [Indicator-BollingerBands.md](Indicator-BollingerBands.md) — bands built - [Indicator-BollingerBands.md](../volatility-bands/Indicator-BollingerBands.md) — bands built
from this dispersion measure. from this dispersion measure.
- [Indicator-HistoricalVolatility.md](Indicator-HistoricalVolatility.md) — - [Indicator-HistoricalVolatility.md](../volatility-bands/Indicator-HistoricalVolatility.md) —
annualised volatility of log returns. annualised volatility of log returns.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [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 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 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 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 is the Wilder-smoothed average of this series, `TrueRange` exposes it raw, one
value per bar. value per bar.
@@ -124,7 +124,7 @@ Output:
Read `TrueRange` as raw per-bar volatility. It spikes on wide-range or gapping 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 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. position sizing or for spotting single outlier bars an average would hide.
## Common pitfalls ## Common pitfalls
@@ -140,8 +140,8 @@ Systems* (1978).
## See also ## 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. True Range.
- [Indicator-ChaikinVolatility.md](Indicator-ChaikinVolatility.md) — a - [Indicator-ChaikinVolatility.md](../volatility-bands/Indicator-ChaikinVolatility.md) — a
rate-of-change volatility measure. rate-of-change volatility measure.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -7,8 +7,7 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volatility | | Family | Volatility & Bands |
| Sub-category | Downside risk |
| Input type | `f64` (single close) | | Input type | `f64` (single close) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[0, ∞)` (percent) | | Output range | `[0, ∞)` (percent) |
@@ -144,7 +143,7 @@ penalises only downside volatility.
- **Reading it as two-sided volatility.** The Ulcer Index ignores upside - **Reading it as two-sided volatility.** The Ulcer Index ignores upside
entirely — a wildly choppy *up*-trend can still score near `0`. Use 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 - **Forgetting the doubled warmup.** Warmup is `2·period 1`, not
`period`. `period`.
@@ -156,6 +155,6 @@ drawdown RMS here follows that definition.
## See also ## See also
- [Indicator-StdDev.md](Indicator-StdDev.md) — two-sided dispersion. - [Indicator-StdDev.md](../volatility-bands/Indicator-StdDev.md) — two-sided dispersion.
- [Indicator-Atr.md](Indicator-Atr.md) — per-bar range volatility. - [Indicator-Atr.md](../volatility-bands/Indicator-Atr.md) — per-bar range volatility.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
+3 -4
View File
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Cumulative |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) | | Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (drifts with cumulative volume) | | Output range | unbounded (drifts with cumulative volume) |
@@ -138,7 +137,7 @@ Output:
total drifts arbitrarily with cumulative volume). A rising ADL confirms total drifts arbitrarily with cumulative volume). A rising ADL confirms
that an up-move is backed by accumulation; a *falling* ADL while price 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. 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. to turn the ADL into a bounded, tradeable oscillator.
## Common pitfalls ## Common pitfalls
@@ -155,7 +154,7 @@ formulation here matches the standard definition (StockCharts, TA-Lib's
## See also ## See also
- [Indicator-Obv.md](Indicator-Obv.md) — cumulative *signed* volume. - [Indicator-Obv.md](../volume/Indicator-Obv.md) — cumulative *signed* volume.
- [Indicator-ChaikinOscillator.md](Indicator-ChaikinOscillator.md) — an - [Indicator-ChaikinOscillator.md](../volume/Indicator-ChaikinOscillator.md) — an
oscillator built on the ADL. oscillator built on the ADL.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) | | Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | `[1, +1]` | | Output range | `[1, +1]` |
@@ -24,7 +23,7 @@ MFV_t = MFM_t · volume_t (money-flow volume)
CMF_t = Σ(MFV, period) / Σ(volume, period) 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 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 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 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 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 the `±0.05` band is often treated as a neutral zone. Because CMF is
volume-normalised it is comparable across instruments — unlike the raw 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 ## Common pitfalls
@@ -153,7 +152,7 @@ matches the standard definition (StockCharts).
## See also ## See also
- [Indicator-Adl.md](Indicator-Adl.md) — the cumulative line CMF is built on. - [Indicator-Adl.md](../volume/Indicator-Adl.md) — the cumulative line CMF is built on.
- [Indicator-ChaikinOscillator.md](Indicator-ChaikinOscillator.md) — the - [Indicator-ChaikinOscillator.md](../volume/Indicator-ChaikinOscillator.md) — the
EMA-difference oscillator on the ADL. EMA-difference oscillator on the ADL.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) | | Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero | | Output range | unbounded around zero |
@@ -22,7 +21,7 @@
ChaikinOsc_t = EMA(ADL, fast)_t EMA(ADL, slow)_t 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 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 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 EMA of the ADL to get a zero-centred momentum reading. Positive values mean
@@ -153,9 +152,9 @@ Accumulation/Distribution Line (StockCharts).
## See also ## See also
- [Indicator-Adl.md](Indicator-Adl.md) — the cumulative line this oscillates. - [Indicator-Adl.md](../volume/Indicator-Adl.md) — the cumulative line this oscillates.
- [Indicator-ChaikinMoneyFlow.md](Indicator-ChaikinMoneyFlow.md) — a bounded - [Indicator-ChaikinMoneyFlow.md](../volume/Indicator-ChaikinMoneyFlow.md) — a bounded
ratio built from the same money-flow volume. 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. same fast/slow EMA-difference construction on price.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `high`, `low`, `volume`) | | Input type | `Candle` (uses `high`, `low`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero (scaled by `divisor`) | | Output range | unbounded around zero (scaled by `divisor`) |
@@ -154,8 +153,8 @@ the standard definition.
## See also ## See also
- [Indicator-ForceIndex.md](Indicator-ForceIndex.md) — a different - [Indicator-ForceIndex.md](../volume/Indicator-ForceIndex.md) — a different
price-change-vs-volume gauge. price-change-vs-volume gauge.
- [Indicator-ChaikinMoneyFlow.md](Indicator-ChaikinMoneyFlow.md) — bounded - [Indicator-ChaikinMoneyFlow.md](../volume/Indicator-ChaikinMoneyFlow.md) — bounded
money-flow balance. money-flow balance.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Oscillators |
| Input type | `Candle` (uses `close`, `volume`) | | Input type | `Candle` (uses `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded around zero | | Output range | unbounded around zero |
@@ -148,8 +147,8 @@ Alexander Elder's Force Index, introduced in *Trading for a Living* (1993).
## See also ## 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. volume-conviction gauge.
- [Indicator-VolumePriceTrend.md](Indicator-VolumePriceTrend.md) — cumulative - [Indicator-VolumePriceTrend.md](../volume/Indicator-VolumePriceTrend.md) — cumulative
volume scaled by percentage move. volume scaled by percentage move.
- [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy. - [Indicators-Overview.md](../../Indicators-Overview.md) — the full taxonomy.
+4 -5
View File
@@ -9,8 +9,7 @@
| Item | Value | | Item | Value |
|---------------------|--------------------------------------------------------------| |---------------------|--------------------------------------------------------------|
| Family | Volume | | Family | Volume |
| Sub-category | cumulative |
| Input type | `Candle` (uses `close` and `volume`) | | Input type | `Candle` (uses `close` and `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (signed, integer-of-volume in spirit) | | Output range | unbounded (signed, integer-of-volume in spirit) |
@@ -182,9 +181,9 @@ Output:
## See also ## 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. 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. 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. most commonly layered on top of OBV to define trade triggers.
@@ -8,7 +8,6 @@
| Field | Value | | Field | Value |
|-------|-------| |-------|-------|
| Family | Volume | | Family | Volume |
| Sub-category | Cumulative |
| Input type | `Candle` (uses `close`, `volume`) | | Input type | `Candle` (uses `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (drifts with cumulative volume) | | Output range | unbounded (drifts with cumulative volume) |
@@ -22,7 +21,7 @@
VPT_t = VPT_{t1} + volume_t · (close_t close_{t1}) / close_{t1} 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** *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 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 1 % gain on the same volume. That makes VPT more sensitive to the
@@ -155,7 +154,7 @@ common definition.
## See also ## 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. 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. - [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 | | Item | Value |
|---------------------|----------------------------------------------------------------| |---------------------|----------------------------------------------------------------|
| Family | Volume | | Family | Volume |
| Sub-category | cumulative (`Vwap`) / rolling (`RollingVwap`) |
| Input type | `Candle` (uses `high`, `low`, `close`, `volume`) | | Input type | `Candle` (uses `high`, `low`, `close`, `volume`) |
| Output type | `f64` | | Output type | `f64` |
| Output range | unbounded (price-units) | | Output range | unbounded (price-units) |
@@ -286,9 +285,9 @@ At `t = 4` with window `[20@3, 30@1, 40@2]`:
## See also ## 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. 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. 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. envelope, often layered alongside VWAP on intraday charts.