Calculate the Z-score of price relative to its 50-period moving average. Extreme Z-scores (±2 or ±2.5) indicate statistically significant deviation, fade these extremes expecting mean reversion to the moving average.
- Calculate: Z = (Price - SMA 50) / StdDev(50)
- Z > +2.0 means price is 2 standard deviations above mean (equivalent to upper BB)
- Market must NOT be in strong trend (ADX < 20 ideal for mean reversion)
- Enter short on Z-score hitting +2 with bearish reversal candle
- Stop: when Z-score exceeds +2.5 (further extension)
- Target: Z-score = 0 (price returns to SMA 50)
- Z-score ≤ -2.0 (price 2 SDs below mean)
- ADX < 20 (range-bound market, not strong downtrend)
- Enter long on bullish reversal at extreme
- Stop: Z-score exceeds -2.5
- Target: Z-score = 0
- // Z-Score Config
- Lookback: 50 periods
- Entry threshold: |Z| ≥ 2.0
- Exit target: Z = 0 (mean)
- Filter: ADX < 20 for range-bound regime
Z-score mean reversion is essentially the same as Bollinger Band mean reversion with 2 StdDev bands. The difference is Z gives you a continuous value. The critical filter is ADX: in strong trends, Z-scores can stay extreme for extended periods and mean reversion becomes catching falling knives.