OPEN-SOURCE SCRIPT
Cập nhật

Volatility Z-Score [NovaLens]

1 153
Volatility Z-Score is a statistical volatility indicator that measures how far the current ATR deviates from its historical average, expressed in standard deviations. Built on the Z-Score method used by quantitative desks to detect anomalies, it self-normalizes across any asset and timeframe - no parameter guessing needed.


HOW IT WORKS

Most traders watch ATR to measure volatility - but raw ATR numbers are meaningless without context. ATR = 50 tells you nothing unless you know the asset's history. Is that high? Low? Normal?

The Z-Score solves this by standardizing ATR against its own rolling distribution:

Z = (ATR_current - ATR_mean) / ATR_stddev

A Z-Score of +2 means current ATR is two standard deviations above the historical mean - statistically extreme. A score of 0 means volatility is exactly average. This is the same standardization method used across quantitative finance to detect regime changes and anomalies.


HOW TO READ IT

• Z > +2 : Statistically extreme volatility. Breakout in progress or capitulation event. Consider tightening stops or waiting for mean reversion.
• Z between −1 and +1 : Normal volatility range. Trade your usual setups with standard risk parameters.
• Z < −2 : Unusually quiet market. Compression before expansion. Watch for pre-breakout positioning opportunities.


USE CASES

• Filter entries - only take trades when volatility is in your preferred regime (e.g., avoid extreme Z for trend-following)
• Time exits - extreme Z-Scores often precede reversals or consolidation phases
• Risk management - scale position size inversely with Z-Score: smaller in high-vol, larger in low-vol
• Regime detection - sustained high or low Z indicates a volatility regime shift, not just noise
• Combine with trend tools - high Efficiency Ratio + low Z-Score = quiet strong trend about to expand


SETTINGS

• ATR Period - Period for Average True Range calculation. Higher values smooth the ATR, lower values make it more responsive to recent price action.
• Z-Score Lookback - Number of bars for computing mean and standard deviation of ATR. Longer lookback = more stable reference, shorter = faster regime detection.


LIMITATIONS

Z-Score assumes a roughly normal distribution of ATR values. In assets with structural volatility shifts (e.g., post-halving crypto), the lookback window may not capture the new regime quickly. Works best on liquid instruments with sufficient history. Not a directional signal - tells you about volatility magnitude, not trend direction.


NOTES

• Based on standard Z-Score normalization - a foundational technique in quantitative finance
• Validated against Python implementation (1.000 correlation via PyneCore)
• Open-source - read the code and verify the math
• Built for traders who want volatility context in standardized units, not raw ATR values
Phát hành các Ghi chú
Added info panel displaying current volatility state (HIGH/NORMAL/LOW), Z-Score value, and signal strength.

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.