Adaptive MAD Supertrend | GForgeAdaptive MAD Supertrend | GForge
The Adaptive MAD Supertrend is a trend-following indicator built on the classic Supertrend framework, but with two core innovations that address well-known weaknesses in the original design: how volatility is measured, and how the indicator behaves across different market conditions.
The Problem With Standard Supertrend
The classic Supertrend uses ATR (Average True Range) as its volatility measure and a fixed multiplier. ATR squares its deviation calculations internally, which means a single spike candle — a news wick, a liquidation cascade — can temporarily blow the bands wide and either trigger a false flip or delay a valid one. On top of that, a fixed multiplier means the indicator behaves identically in a clean trending market and a choppy ranging one. It has no awareness of what the market is actually doing.
Innovation 1 — MAD Replaces ATR
This indicator uses Mean Absolute Deviation as its volatility measure instead of ATR or Standard Deviation.
MAD = mean( |close − mean(close, n)| , n )
The key difference is linearity. Each bar contributes its deviation to the average equally, without squaring. A spike candle influences the band width, but proportionally — it cannot disproportionately dominate the calculation the way it can in ATR or StdDev. The result is a more stable, consistent band width that responds to genuine volatility without overreacting to outlier bars.
An optional EMA smoothing layer can be applied to the raw MAD output before it scales the bands, which further stabilizes band width during volatile periods.
Innovation 2 — Kaufman Efficiency Ratio Scales the Multiplier
The Efficiency Ratio (ER), developed by Perry Kaufman, measures how efficiently price is moving:
ER = |net price change over n bars| / sum(|bar-to-bar changes|, n)
ER → 1.0: price moved efficiently in one direction — a clean trend
ER → 0.0: price moved a lot but went nowhere — chop and noise
The adaptive multiplier uses ER to scale band width dynamically:
adaptive_multiplier = Multiplier_Chop − ER × (Multiplier_Chop − Multiplier_Trend)
During a clean trend, the multiplier contracts toward your Trend setting — bands tighten and the trailing stop follows price closely, capturing more of the move. During choppy conditions, the multiplier expands toward your Chop setting — bands widen and the stop absorbs noise without flipping unnecessarily.
This means the indicator automatically adjusts its sensitivity to what the market is doing, rather than applying the same fixed behaviour to every bar.
Basis MA
The band centre line (basis) is fully configurable. Rather than raw hl2 like the classic Supertrend, any moving average from the menu can serve as the anchor — the band is built outward from it. The default is T3, a Tillson triple-smoothed MA that provides an extremely clean centre line with minimal lag overshoot. Other useful options include DEMA and TEMA for faster response, VWMA for volume-weighted anchoring, or RMA for higher timeframes.
How to Read It
Line colour: green/up colour = bullish trend, red/down colour = bearish trend
Trend fill: shaded area between price and the trailing stop — visual confirmation of which side of the line price is on
Inactive band: the faint dotted line on the opposite side shows where a flip would trigger if price reaches it
Signal diamonds: markers at each trend flip — below bar for long entries, above bar for short/cash exits
Notes
Optimised and tested on Bitcoin 1D. Performs well on trending instruments across higher timeframes (4H and above).
The MAD + ER combination is theoretically complementary: MAD handles what the band width is, ER handles how much of it to apply. They solve orthogonal problems.
As with all trend-following tools, performance degrades in prolonged sideways markets — the Chop multiplier setting mitigates this but does not eliminate it.
⚠️ Disclaimer
This indicator is a technical analysis tool provided for informational and educational purposes only. It is not financial advice, and nothing presented here should be construed as a recommendation to buy, sell, or hold any asset. Past performance does not guarantee future results.
Developed by GForge
Индикатор Pine Script®



