OPEN-SOURCE SCRIPT
Adaptive Trend Regime

Adaptive Trend Regime
Adaptive Trend Regime is a market regime detection indicator designed to identify whether the market is trending bullish, trending bearish, or moving sideways.
The indicator combines EMA alignment, ADX trend strength, and EMA slope momentum to filter market noise and highlight only meaningful directional movement.
Instead of reacting to every price fluctuation, this tool focuses on detecting sustained market conditions.
━━━━━━━━━━━━━━━━━━
How It Works
The background zone changes color depending on market regime:
🟢 Bullish Trend — Strong upward momentum
🔴 Bearish Trend — Strong downward momentum
🟡 Range — Low momentum or consolidation
━━━━━━━━━━━━━━━━━━
Parameters
━━━━━━━━━━━━━━━━━━
Best Usage
• Trend-following strategies
• Market regime filtering
• Trade confirmation
• Avoiding low-momentum environments
Works across all markets and timeframes.
━━━━━━━━━━━━━━━━━━
Notes
This indicator does not provide buy or sell signals.
It is intended to help traders understand market conditions and trade in alignment with prevailing momentum.
Adaptive Trend Regime is a market regime detection indicator designed to identify whether the market is trending bullish, trending bearish, or moving sideways.
The indicator combines EMA alignment, ADX trend strength, and EMA slope momentum to filter market noise and highlight only meaningful directional movement.
Instead of reacting to every price fluctuation, this tool focuses on detecting sustained market conditions.
━━━━━━━━━━━━━━━━━━
How It Works
- Fast and Slow EMAs determine market direction.
- ADX measures trend strength and filters ranging markets.
- EMA slope confirms momentum and removes weak trends.
- Volatility-adjusted zones adapt dynamically using ATR.
The background zone changes color depending on market regime:
🟢 Bullish Trend — Strong upward momentum
🔴 Bearish Trend — Strong downward momentum
🟡 Range — Low momentum or consolidation
━━━━━━━━━━━━━━━━━━
Parameters
- Fast EMA Length
Controls short-term market direction sensitivity. - Slow EMA Length
Defines the broader trend structure. - ADX Threshold
Minimum trend strength required to classify the market as trending.
Higher values produce more conservative signals. - Slope Dead Zone (%)
Filters small EMA movements considered market noise.
Increasing this value reduces false trend detection. - Slope Lookback
Number of bars used to calculate EMA slope momentum. - ATR Multiplier
Controls the size of the displayed trend zone relative to market volatility.
━━━━━━━━━━━━━━━━━━
Best Usage
• Trend-following strategies
• Market regime filtering
• Trade confirmation
• Avoiding low-momentum environments
Works across all markets and timeframes.
━━━━━━━━━━━━━━━━━━
Notes
This indicator does not provide buy or sell signals.
It is intended to help traders understand market conditions and trade in alignment with prevailing momentum.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.