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
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。