OPEN-SOURCE SCRIPT
Adaptive Supertrend+ [MAB]

Adaptive SuperTrend+ is an adaptive trend-following indicator that eliminates the guesswork of manually tuning a SuperTrend multiplier. Instead of relying on a single fixed factor, it continuously tests a range of multipliers in parallel and automatically selects the one that has been performing best on recent price action — giving you a SuperTrend that self-optimizes to current market conditions.
🔶 HOW IT WORKS
Traditional SuperTrend indicators require the user to pick a multiplier and stick with it, regardless of whether market conditions favor a tight or wide band. Adaptive SuperTrend+ solves this by running multiple SuperTrend instances simultaneously across a user-defined factor range. Each instance is scored using an exponential performance metric that tracks how well that particular multiplier has aligned with directional price movement. On every bar, the highest-scoring factor is selected to render the final SuperTrend line — fully automatic, no manual tuning required.
🔶 USAGE
🔹 Trend Direction
Teal line below price — Bullish trend is active. The line acts as a dynamic trailing support level.
Red line above price — Bearish trend is active. The line acts as a dynamic trailing resistance level.
🔹 Trade Signals
Teal triangle (▲) below bar — Bullish signal. Price has crossed above the band, indicating a potential long entry or trend reversal to the upside.
Red triangle (▼) above bar — Bearish signal. Price has crossed below the band, indicating a potential short entry or trend reversal to the downside.
Because the active multiplier adapts to recent performance, signals generated by Adaptive SuperTrend+ reflect a band that has been validated against current volatility conditions rather than a static parameter chosen arbitrarily.
🔶 SETTINGS
🔹 ATR Settings
ATR Length — The lookback period used to calculate Average True Range. Controls how quickly the volatility measurement responds to recent price swings.
🔹 Factor Range
Min Factor — The smallest SuperTrend multiplier included in the tested range.
Max Factor — The largest SuperTrend multiplier included in the tested range.
Factor Step — The increment between each tested multiplier. Smaller steps produce a finer search across the range but increase computation.
🔶 NOTES
Suitable for any market and timeframe.
Best used as a trend filter or trailing stop reference alongside your existing entry and exit criteria.
Past performance of any selected factor does not guarantee future results. Always apply proper risk management.
🔶 HOW IT WORKS
Traditional SuperTrend indicators require the user to pick a multiplier and stick with it, regardless of whether market conditions favor a tight or wide band. Adaptive SuperTrend+ solves this by running multiple SuperTrend instances simultaneously across a user-defined factor range. Each instance is scored using an exponential performance metric that tracks how well that particular multiplier has aligned with directional price movement. On every bar, the highest-scoring factor is selected to render the final SuperTrend line — fully automatic, no manual tuning required.
🔶 USAGE
🔹 Trend Direction
Teal line below price — Bullish trend is active. The line acts as a dynamic trailing support level.
Red line above price — Bearish trend is active. The line acts as a dynamic trailing resistance level.
🔹 Trade Signals
Teal triangle (▲) below bar — Bullish signal. Price has crossed above the band, indicating a potential long entry or trend reversal to the upside.
Red triangle (▼) above bar — Bearish signal. Price has crossed below the band, indicating a potential short entry or trend reversal to the downside.
Because the active multiplier adapts to recent performance, signals generated by Adaptive SuperTrend+ reflect a band that has been validated against current volatility conditions rather than a static parameter chosen arbitrarily.
🔶 SETTINGS
🔹 ATR Settings
ATR Length — The lookback period used to calculate Average True Range. Controls how quickly the volatility measurement responds to recent price swings.
🔹 Factor Range
Min Factor — The smallest SuperTrend multiplier included in the tested range.
Max Factor — The largest SuperTrend multiplier included in the tested range.
Factor Step — The increment between each tested multiplier. Smaller steps produce a finer search across the range but increase computation.
🔶 NOTES
Suitable for any market and timeframe.
Best used as a trend filter or trailing stop reference alongside your existing entry and exit criteria.
Past performance of any selected factor does not guarantee future results. Always apply proper risk management.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Pine Script Developer • Market Analysis
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Pine Script Developer • Market Analysis
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.