OPEN-SOURCE SCRIPT
ADX SuperTrend | RakoQuant

ADX SuperTrend by RakoQuant is a volatility-based trend system that adapts dynamically to market regime strength using ADX.
Instead of running a fixed SuperTrend multiplier across all conditions, this tool uses trend strength (ADX) to scale the ATR multiplier in real-time:
* Low trend strength → tighter bands (more responsive)
* High trend strength → wider bands (more stable, fewer whipsaws)
This makes it ideal for traders who want a SuperTrend that becomes more forgiving in real trends and more reactive in chop, without switching indicators.
RakoQuant Architecture
1. Baseline + ATR Framework (SuperTrend Core)
The system uses a clean and familiar SuperTrend foundation:
* EMA Baseline for structure
* ATR for volatility
* Classic trailing-band logic to maintain trend continuity
This ensures the indicator remains consistent, backtestable, and strategy-friendly.
2. ADX Adaptive Multiplier Engine (The Edge)
The key feature is the ADX-driven multiplier boost.
ADX is normalized into a 0..1 scale between a user-defined floor and ceiling:
* Below ADX Floor → treated as weak/no trend
* Above ADX Ceiling → treated as max trend strength
That normalized value is then transformed with a power curve and mapped into a multiplier scaling range:
Effective Multiplier = Base Multiplier × Scale(ADX)
Where Scale is capped by Max Boost and shaped by Boost Power.
This gives you a controllable “adaptive stability” system:
* Smooth and stable during real trends
* Fast and sensitive when the market is indecisive
3. Optional Momentum Confirmation
To reduce low-quality flips, the script includes an optional momentum gate:
* Baseline slope normalized by ATR
* Requires slope strength alignment before confirming a flip
This helps suppress false transitions that occur from volatility spikes without trend structure.
Signal Model (Backtest-Ready)
ADX SuperTrend uses the standard RakoQuant state logic:
* Bullish Regime when SuperTrend is in bullish mode (dir < 0)
* Bearish Regime when SuperTrend is in bearish mode (dir > 0)
Clear state flips are produced:
* Bull Flip → trend turns UP
* Bear Flip → trend turns DOWN
Signals are designed for:
* Strategy conversion
* Consistent backtests
* Alert automation
Visual System (Open-Source Friendly)
ADX SuperTrend includes a lightweight visual framework:
* Multiple palettes (RakoQuant Neon, Classic, Gold/Indigo, Ocean/Coral, Mono)
* Line style options (Line Break / Line / Step)
* Multi-layer glow (outer + inner)
* Optional fill (to mid or to price)
* Candle painting toggle
* Marker style toggle (Labels / Triangles / Off)
Everything is modular and can be disabled if you want “signals-only” behavior.
Practical Use Cases
Trend Traders
* Use adaptive widening to avoid premature exits in strong trends.
Chop Filtering
* Use ADX floor/ceiling logic to reduce whipsaws and tighten reaction.
System Builders
* Works cleanly inside larger confluence systems.
* State variable and flip signals map directly to backtest engines.
Design Philosophy (RakoQuant)
This indicator follows the RakoQuant approach:
* Adaptive behavior > static parameters
* Regime-sensitive risk control > fixed multipliers
* Trend strength drives volatility allowance
* Clean outputs built for backtesting
Chart Example

Instead of running a fixed SuperTrend multiplier across all conditions, this tool uses trend strength (ADX) to scale the ATR multiplier in real-time:
* Low trend strength → tighter bands (more responsive)
* High trend strength → wider bands (more stable, fewer whipsaws)
This makes it ideal for traders who want a SuperTrend that becomes more forgiving in real trends and more reactive in chop, without switching indicators.
RakoQuant Architecture
1. Baseline + ATR Framework (SuperTrend Core)
The system uses a clean and familiar SuperTrend foundation:
* EMA Baseline for structure
* ATR for volatility
* Classic trailing-band logic to maintain trend continuity
This ensures the indicator remains consistent, backtestable, and strategy-friendly.
2. ADX Adaptive Multiplier Engine (The Edge)
The key feature is the ADX-driven multiplier boost.
ADX is normalized into a 0..1 scale between a user-defined floor and ceiling:
* Below ADX Floor → treated as weak/no trend
* Above ADX Ceiling → treated as max trend strength
That normalized value is then transformed with a power curve and mapped into a multiplier scaling range:
Effective Multiplier = Base Multiplier × Scale(ADX)
Where Scale is capped by Max Boost and shaped by Boost Power.
This gives you a controllable “adaptive stability” system:
* Smooth and stable during real trends
* Fast and sensitive when the market is indecisive
3. Optional Momentum Confirmation
To reduce low-quality flips, the script includes an optional momentum gate:
* Baseline slope normalized by ATR
* Requires slope strength alignment before confirming a flip
This helps suppress false transitions that occur from volatility spikes without trend structure.
Signal Model (Backtest-Ready)
ADX SuperTrend uses the standard RakoQuant state logic:
* Bullish Regime when SuperTrend is in bullish mode (dir < 0)
* Bearish Regime when SuperTrend is in bearish mode (dir > 0)
Clear state flips are produced:
* Bull Flip → trend turns UP
* Bear Flip → trend turns DOWN
Signals are designed for:
* Strategy conversion
* Consistent backtests
* Alert automation
Visual System (Open-Source Friendly)
ADX SuperTrend includes a lightweight visual framework:
* Multiple palettes (RakoQuant Neon, Classic, Gold/Indigo, Ocean/Coral, Mono)
* Line style options (Line Break / Line / Step)
* Multi-layer glow (outer + inner)
* Optional fill (to mid or to price)
* Candle painting toggle
* Marker style toggle (Labels / Triangles / Off)
Everything is modular and can be disabled if you want “signals-only” behavior.
Practical Use Cases
Trend Traders
* Use adaptive widening to avoid premature exits in strong trends.
Chop Filtering
* Use ADX floor/ceiling logic to reduce whipsaws and tighten reaction.
System Builders
* Works cleanly inside larger confluence systems.
* State variable and flip signals map directly to backtest engines.
Design Philosophy (RakoQuant)
This indicator follows the RakoQuant approach:
* Adaptive behavior > static parameters
* Regime-sensitive risk control > fixed multipliers
* Trend strength drives volatility allowance
* Clean outputs built for backtesting
Chart Example
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.