OPEN-SOURCE SCRIPT
ที่อัปเดต: Volatility Z-Score [NovaLens]

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
◉ 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
Release Note
Added info panel displaying current volatility state (HIGH/NORMAL/LOW), Z-Score value, and signal strength.สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
NovaLens builds systematic indicators from real quant research - designed for a cleaner market view.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
NovaLens builds systematic indicators from real quant research - designed for a cleaner market view.
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน