A trading approach built on the idea that extreme moves tend to reverse toward the average. It works well in ranging conditions and fails badly in trending ones — knowing the difference is the entire challenge.
Mean reversion is the opposite of trend-following. Instead of entering when a move is in progress and riding it further, you bet that the move has gone too far and will snap back toward its average. You buy when price is stretched to the downside, sell when it is stretched to the upside, and target a return to the middle.
The statistical basis is sound: in markets without strong directional conviction, prices oscillate around a mean and extremes are temporary. RSI below 30, a touch of the lower Bollinger Band®, or a Stochastic reading below 20 are all ways of defining "stretched to the downside." The mean itself is the target — the moving average, the Bollinger midpoint, or VWAP.
Mean reversion works well in ranging markets. It fails badly in trending ones. "Oversold in a downtrend" does not mean a bounce is coming. It often means the trend is strong and accelerating. Fading that repeatedly is expensive.
This is why mean reversion strategies benefit more than most from a regime filter. ADX below 20 or 25 is a useful indicator that the market is oscillating rather than trending. When ADX is high, mean reversion logic should be switched off — or at minimum treated with extra scepticism.
A practical approach: use mean reversion for timing pullback entries within a trend rather than for calling reversals. Price pulls back to the 20 EMA in an uptrend, RSI dips to 40, Bollinger Band® narrows — that is a mean reversion entry in the direction of the trend, not against it. This combines the best of both approaches.
//@version=6
strategy("Mean Reversion Demo", overlay=true)
// Bollinger Bands®: 20-period SMA ± 2 standard deviations
[basis, upper, lower] = ta.bb(close, 20, 2)
rsi = ta.rsi(close, 14)
// ADX regime filter: only trade when market is ranging (low directional strength)
[diPlus, diMinus, adx] = ta.dmi(14, 14)
ranging = adx < 25
// Entry: close below lower band AND RSI confirms oversold AND market is ranging
longEntry = close < lower and rsi < 35 and ranging
// Target: the mean (basis) — where price is expected to return
if longEntry
strategy.entry("Long MR", strategy.long)
strategy.exit("MR Exit", "Long MR", limit=basis)
plot(basis, "Basis / Mean", color=color.orange, linewidth=2)
plot(upper, "Upper Band", color=color.red, linewidth=1)
plot(lower, "Lower Band", color=color.green, linewidth=1)
bgcolor(ranging ? na : color.new(color.red, 93), title="Trending — filter active")
Key takeaway: Mean reversion and trend-following are opposites that need different market conditions to work. Be explicit about which regime each part of your strategy is designed for. Blending them — trend entries, mean-reversion timing for pullbacks — is valid, but you need a regime filter to determine which mode is active. Without one, you end up counter-trading trends and chasing breakouts at the same time.