OPEN-SOURCE SCRIPT
已更新 ATR Enhanced [DCAUT]

█ ATR Enhanced [DCAUT]
📊 OVERVIEW
Standard ATR uses only RMA smoothing, while ATR Enhanced provides 20+ professional smoothing algorithms, offering precise volatility measurement solutions for different trading scenarios and market environments.
💡 CORE VALUE
- 20+ algorithm choices: SMA, EMA, RMA, WMA, HMA, T3, KAMA, FRAMA, Kalman Filter, etc.
📋 PARAMETER SETUP
🎨 COLOR CODING
📊 OVERVIEW
Standard ATR uses only RMA smoothing, while ATR Enhanced provides 20+ professional smoothing algorithms, offering precise volatility measurement solutions for different trading scenarios and market environments.
💡 CORE VALUE
- 20+ algorithm choices: SMA, EMA, RMA, WMA, HMA, T3, KAMA, FRAMA, Kalman Filter, etc.
📋 PARAMETER SETUP
- ATR Length: Calculation period (default: 14)
- Moving Average Type: Choose the most suitable smoothing method from 20+ algorithms
🎨 COLOR CODING
- Green: Rising volatility
- Red: Falling volatility
版本注释
📌 ADDITIONAL INFORMATIONMathematical Foundation:
ATR (Average True Range) is a volatility indicator developed by J. Welles Wilder Jr. in 1978. It measures market volatility by calculating the average of true ranges over a specified period.
Core Algorithm:
1. True Range Calculation:
• TR = max[(High - Low), abs(High - Previous Close), abs(Low - Previous Close)]
• Captures the greatest range considering gaps and limit moves
2. ATR Calculation:
• ATR = MA(True Range, Length, MA Type)
• Standard ATR uses RMA (Wilder's smoothing method)
• Enhanced version supports 21 different moving average algorithms
Originality & Technical Innovation:
ATR Enhanced extends Wilder's original ATR concept by offering 21 different smoothing algorithms instead of just RMA. This flexibility allows traders to adapt the indicator to different market conditions and trading styles. Traditional ATR is constrained to RMA smoothing, which may not be optimal for all markets or timeframes.
The multi-algorithm approach provides options ranging from simple averages (SMA, WMA) for stability, to exponential methods (EMA, DEMA, TEMA) for responsiveness, to advanced adaptive filters (KAMA, FRAMA, Kalman Filter) for noise reduction. This transforms ATR from a fixed-calculation tool into an adaptable volatility measurement system.
Signal Interpretation:
• High ATR Values: Increased market volatility - wider price swings
• Low ATR Values: Decreased market volatility - narrower price ranges
• Rising ATR: Volatility expanding - often during trend initiation or breakouts
• Falling ATR: Volatility contracting - typically during consolidation or trend exhaustion
• ATR Divergence: Price making new highs/lows while ATR declines may indicate weakening trend
Strategic Application Methods:
Position Sizing:
• Formula: Position Size = Risk Amount / (ATR × Multiplier)
• Higher ATR requires smaller position size; lower ATR allows larger position size
Stop Loss Placement:
• Dynamic stops: Entry ± (ATR × Multiplier)
• Volatility-adjusted: Wider stops in high ATR, tighter in low ATR
Breakout Confirmation:
• Confirm breakouts with expanding ATR
• Be cautious of breakouts with contracting ATR
Trend Strength Assessment:
• Rising ATR during trend suggests strong momentum
• Falling ATR during trend may signal exhaustion
Risk Management:
• Adjust portfolio exposure based on average ATR
• Reduce position sizes when ATR spikes across multiple instruments
Parameter Configuration:
ATR Length (Default: 14):
• Shorter lengths: More responsive, suitable for day trading
• Standard (14): Wilder's original, balanced for swing trading
• Longer lengths: Smoother, better for position trading
Moving Average Type Selection:
• RMA: Wilder's original smoothing, industry standard
• SMA/WMA: Simple/linear weighting, stable but slower
• EMA/DEMA/TEMA: Exponential methods, faster response
• HMA/ALMA: Low lag with smoothness
• T3: Highly smoothed with low lag
• KAMA/FRAMA: Adaptive to market conditions
• Kalman Filter/SUPER_SMOOTHER: Excellent noise reduction
Algorithm Selection Guidelines:
• Stability: SMA, RMA, T3 for choppy markets
• Responsiveness: EMA, DEMA, HMA for trending markets
• Noise Reduction: SUPER_SMOOTHER, Kalman Filter, T3
• Adaptation: KAMA, FRAMA for varying volatility
Performance Characteristics:
Core Advantages:
• Objective volatility measurement independent of price direction
• 21 algorithm choices for different market conditions
• Widely recognized across trading strategies
• Scales naturally across instruments and timeframes
Comparison with Standard ATR:
• Standard ATR: RMA smoothing only
• ATR Enhanced: 21 algorithms for flexibility
• Better adaptation to market characteristics
Limitations:
• Does not indicate price direction, only volatility magnitude
• Lagging indicator - reflects past volatility
• May give false signals in choppy markets
• Requires interpretation within market context
Usage Guidelines:
This indicator is designed for volatility measurement and risk management purposes. ATR Enhanced helps quantify market volatility but should not be used as the sole basis for trading decisions. The indicator measures historical volatility and does not predict future price movements. Different smoothing algorithms may produce different readings - select based on your trading style and market characteristics. Always combine with directional indicators, price action analysis, and proper risk management. Past volatility patterns do not guarantee future volatility behavior. Conduct thorough testing before implementing in live trading.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。