PROTECTED SOURCE SCRIPT
ATR Z-Score - [RZ]

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
Visual Components
Interpretation
Alert Conditions
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.
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.
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.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.