OPEN-SOURCE SCRIPT
Length Adaptive MA SuperTrend

Length Adaptive MA SuperTrend
Length Adaptive MA SuperTrend is a third-generation evolution of the SuperTrend concept, designed to improve signal accuracy while maintaining high responsiveness across different market conditions. The indicator dynamically adjusts its moving-average length to better match current market activity, allowing it to react quickly in fast markets while remaining stable during slower phases.
This adaptive behavior helps traders and investors visualize trend direction more clearly while reducing unnecessary noise, making the tool suitable for both beginners and advanced users seeking a responsive trend overlay.
🔍 How It Works
The indicator uses a moving average as the foundation for a SuperTrend-style structure, but instead of keeping the moving-average length fixed, it continuously adapts to changing market environments.
The script compares average activity levels across three horizons:
• Long-term period
• Medium-term period (half length)
• Short-term period (square-root length)
Activity is measured using one of three selectable drivers:
• ATR (volatility)
• Volume
• Standard deviation
Whichever period shows the strongest average activity becomes the active length used for calculating the moving-average base. This allows the indicator to automatically shift between faster and slower behavior depending on market conditions.
After selecting the active length, the result is slightly smoothed using the chosen moving-average type to produce a cleaner and more stable trend structure.
ATR-based bands are then applied around the adaptive base, and trend direction changes when price crosses these bands.
⚙️ Key Features
• Adaptive moving-average length selection
• Automatic adjustment between short, medium, and long market conditions
• Multiple smoothing types (SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, EWMA)
• ATR-based SuperTrend structure
• Trend transition markers
• Optional candle coloring based on active trend
🧩 Inputs Overview
• Moving-average smoothing type
• Base length and price source
• ATR length and multiplier
• Adaptive driver selection (ATR, Volume, or Standard Deviation)
📌 Usage Notes
• Helps visualize prevailing market trends across changing environments.
• Automatically adapts speed for trending and consolidating markets.
• Signals may change intrabar on lower timeframes.
• Best used with confirmation tools and proper risk management.
• Intended as an analytical tool, not financial advice.
Length Adaptive MA SuperTrend is a third-generation evolution of the SuperTrend concept, designed to improve signal accuracy while maintaining high responsiveness across different market conditions. The indicator dynamically adjusts its moving-average length to better match current market activity, allowing it to react quickly in fast markets while remaining stable during slower phases.
This adaptive behavior helps traders and investors visualize trend direction more clearly while reducing unnecessary noise, making the tool suitable for both beginners and advanced users seeking a responsive trend overlay.
🔍 How It Works
The indicator uses a moving average as the foundation for a SuperTrend-style structure, but instead of keeping the moving-average length fixed, it continuously adapts to changing market environments.
The script compares average activity levels across three horizons:
• Long-term period
• Medium-term period (half length)
• Short-term period (square-root length)
Activity is measured using one of three selectable drivers:
• ATR (volatility)
• Volume
• Standard deviation
Whichever period shows the strongest average activity becomes the active length used for calculating the moving-average base. This allows the indicator to automatically shift between faster and slower behavior depending on market conditions.
After selecting the active length, the result is slightly smoothed using the chosen moving-average type to produce a cleaner and more stable trend structure.
ATR-based bands are then applied around the adaptive base, and trend direction changes when price crosses these bands.
⚙️ Key Features
• Adaptive moving-average length selection
• Automatic adjustment between short, medium, and long market conditions
• Multiple smoothing types (SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, EWMA)
• ATR-based SuperTrend structure
• Trend transition markers
• Optional candle coloring based on active trend
🧩 Inputs Overview
• Moving-average smoothing type
• Base length and price source
• ATR length and multiplier
• Adaptive driver selection (ATR, Volume, or Standard Deviation)
📌 Usage Notes
• Helps visualize prevailing market trends across changing environments.
• Automatically adapts speed for trending and consolidating markets.
• Signals may change intrabar on lower timeframes.
• Best used with confirmation tools and proper risk management.
• Intended as an analytical tool, not financial advice.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
"Better to take a step back, than to stand stuck forever."
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
"Better to take a step back, than to stand stuck forever."
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。