PROTECTED SOURCE SCRIPT

ATR Z-Score - [RZ]

405
The ATR Z-Score - [RZ] indicator provides a statistical measure of current market volatility relative to its recent historical behavior. By normalizing the Average True Range (ATR) using a Z-score calculation, it quantifies how many standard deviations the prevailing volatility deviates from its mean over a user-defined lookback period.

Core Calculation
  • ATR the Average True Range over a configurable length serving as the primary measure of true price range and volatility.
  • Z-Score — calculated as Z = (current ATR − mean ATR) / standard deviation of ATR, where both the mean and standard deviation are determined over the Z-Score lookback period.
Positive Z-score values indicate elevated volatility compared to recent history whereas negative values indicate contracted volatility.


Visual Components
  • Histogram : Displays the ATR Z-Score as vertical bars. The histogram is colored differently above and below zero.
  • Z-Score Moving Average : A smoothed line overlay (default 14-period, selectable as SMA, EMA, WMA, or RMA) that helps identify the direction and persistence of volatility changes.
  • ±2σ Reference Lines : Dashed horizontal lines at +2.0 and -2.0 mark statistically significant thresholds (approximately 95% confidence under a normal distribution assumption).
  • Background Shading : Highlights extreme regimes: red for Z > +2.0 (volatility expansion) and green for Z < -2.0 (volatility contraction/squeeze).

Interpretation
  • Z > +2.0 : Current volatility is unusually high relative to the recent sample often associated with breakout acceleration, trend continuation, or capitulation phases.
  • Z < -2.0 : Current volatility is unusually low, frequently precedes major directional moves
  • Crossovers with Z-MA : Upward crosses may signal emerging volatility expansion, while downward crosses may indicate contraction or mean reversion in volatility.

Alert Conditions
  • ATR Z-Score crosses above its moving average.
  • ATR Z-Score crosses below its moving average.
  • ATR Z-Score crosses above +2.0 (high volatility / expansion).
  • ATR Z-Score crosses below -2.0 (low volatility / contraction).

Disclaimer
This indicator is provided strictly for educational and informational purposes. It is not financial advice, investment recommendation, or a guarantee of future performance. Trading involves substantial risk of loss and is not suitable for all investors.

Past performance does not predict future results. Users should conduct their own research, apply appropriate risk management, and consult qualified professionals before making any trading decisions. The author assumes no responsibility for any losses incurred through the use of this script.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.