📐 Indicator Theory — honest parameter primer
A public-domain reference for the mathematics and parameter ranges of 8 widely used technical indicators (MA, RSI, MACD, Bollinger, Stoch, ADX, CCI, WPR). This is not Rei novel theory — it is a Rei-readable analytical lens over indicator theory that has been public textbook material since the 1990s. Companion to /honest-confluence (MT4) and /random-vs-real.
Prior art (honest acknowledgment)
The body of work this page draws on:
- Lo, A. W. & Mamaysky, H. & Wang, J. (2000) — "Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation", Journal of Finance 55(4). The first rigorous treatment of TA as a statistical signal-detection problem.
- Achelis, S. B. (1995, 2001) — Technical Analysis from A to Z. The textbook reference for indicator formulas (MA, RSI, MACD, etc.) — most parameter defaults trace here.
- Pardo, R. (2008) — The Evaluation and Optimization of Trading Strategies. Walk-forward testing, parameter robustness, overfitting traps.
- Aronson, D. R. (2007) — Evidence-Based Technical Analysis. Null-hypothesis testing applied to indicator backtests; the foundation of our /random-vs-real companion page.
- Wilder, J. W. (1978) — New Concepts in Technical Trading Systems. Original publication of RSI, ADX, ATR, Parabolic SAR. Wilder's smoothing (α = 1/n) is still the canonical RSI/ADX recursion.
- Bollinger, J. (2001) — Bollinger on Bollinger Bands. Originator's reference; default 20-period, 2σ documented here.
Rei adds nothing predictive to any of the above. Rei's contribution is operational framing: which configurations of K indicators carry K independent opinions vs. K−1 echoes, and whether observed confluence rates differ from random-walk null.
Why this page exists separately from Rei core
Per the project's standing rule on financial theory separation: Rei's core engine (SEED_KERNEL theories, D-FUMT₈ logic, Lean 4 formalization) does not absorb domain-specific financial analysis. Indicator theory is hosted here, in WIC, where objective-statistics framing applies. The Rei-readable lens (N_eff redundancy + random-walk null-test) is documented at the page boundary, not inside Rei.
8 common indicators — quick reference
| Indicator | Formula (sketch) | Default params | What it measures | Caveat |
|---|---|---|---|---|
| SMA / EMA (Moving Average) | SMA = Σ Cᵢ / n EMA = α·Cₜ + (1−α)·EMAₜ₋₁, α = 2/(n+1) | n ∈ 200 | Trend smoothing; price lag = (n−1)/2 (SMA) or 1/α (EMA) | By construction, two MAs of the same series have ρ > 0.85 — confluence among MAs is largely echo (cf. N_eff lens) |
| RSI (Wilder 1978) | RSI = 100 − 100/(1 + RS), RS = avgGain / avgLoss, smoothed by α = 1/n | n = 14 | Momentum oscillator on close-to-close changes; bounded [0, 100] | "Overbought 70 / oversold 30" thresholds are convention, not derived bounds |
| MACD (Appel 1979) | MACD = EMA₁₂(C) − EMA₂₆(C), Signal = EMA₉(MACD) | (12, 26, 9) | Difference of two EMAs — trend / momentum hybrid | Strongly correlated with raw EMA-difference series; not independent of MA family |
| Bollinger Bands (Bollinger 1980s) | Upper = SMA(n) + k·σ, Lower = SMA(n) − k·σ | (20, 2.0) | Volatility envelope around SMA; %B normalizes price location in band | σ is rolling stdev — bands tighten and widen with volatility regime, not signal |
| Stochastic (Lane 1950s) | %K = 100 · (C − Lₙ) / (Hₙ − Lₙ), %D = SMA(3) of %K | (14, 3, 3) | Close position within recent High/Low range; bounded [0, 100] | Very similar information content to RSI on the same window — high ρ expected |
| ADX (Wilder 1978) | DI⁺/DI⁻ from directional movement, ADX = Wilder-smoothed |DI⁺−DI⁻|/(DI⁺+DI⁻) | n = 14 | Trend strength (unsigned); ADX > 25 conventional "trending" | Lags 2n bars (Wilder smoothing chain); not a signal source |
| CCI (Lambert 1980) | CCI = (TP − SMA(TP)) / (0.015 · MAD), TP = (H+L+C)/3 | n = 20 | Deviation from mean typical price in units of mean absolute deviation | 0.015 is a calibration constant chosen so ~70 % of values fall in ±100 |
| WPR (Williams %R, 1973) | %R = −100 · (Hₙ − C) / (Hₙ − Lₙ) | n = 14 | Inverse of Stochastic %K; bounded [−100, 0] | Mathematically a linear transform of Stochastic %K — ρ ≈ −1 |
Parameter selection — random-walk null-hypothesis first
Before tuning, run the indicator on synthetic random-walk price series and observe its output distribution. If "buy" / "sell" / "overbought" flags fire at the same rate on random data as on real data, the indicator is detecting structure that does not exist. See /random-vs-real for the operational test.
Then check independence within your chosen indicator set. K dependent indicators give
one opinion echoed K−1 times. See /honest-confluence for
N_eff = K² / Σᵢⱼ ρᵢⱼ² in MT4.
What this page does NOT do
- Does NOT recommend any specific parameter set as "best" — defaults are conventions, not optima.
- Does NOT predict price direction, win rates, or expected value.
- Does NOT host or route orders, connect to brokers, or carry affiliate links.
- Does NOT claim independence from prior textbook literature — the formulas are public domain since the 1970s–1990s.
- Does NOT cover proprietary indicators (closed-source / paid services such as Panjiva, Bloomberg-only oscillators).