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