OPEN-SOURCE SCRIPT
Volatility Halo | NAL

1. Overview
Volatility Halo | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline, ATR band structure, and a recursive GARCH-style volatility regime multiplier.
The indicator does not use fixed-width bands. Instead, it starts with ATR-based bands and then adjusts their width using a projected volatility regime model. This allows the bands to respond differently when market volatility is expanding, contracting, or stabilizing.
2. Calculation
The indicator starts by calculating a Zero-Lag EMA baseline from the selected source. This baseline acts as the central trend reference, helping reduce lag compared to a standard EMA while still keeping the structure smooth.
Pine Script®
The ATR value is then multiplied by the user-defined ATR multiple. This forms the base volatility distance used for the upper and lower bands.
The more advanced part of the indicator is the recursive GARCH-style regime multiplier. It begins by calculating log returns and converting them into shock variance. A long-run variance estimate is then built from recent shock variance.
Pine Script®
The model recursively updates conditional variance using three components: recent shock variance, long-run variance, and previous conditional variance. When adaptive coefficients are enabled, the script searches for coefficient weights that better fit recent variance behavior.
Pine Script®
The conditional variance is then projected and converted into a volatility estimate. This volatility is compared against its own regime baseline to create a volatility regime multiplier. The multiplier is clamped between a minimum and maximum value, preventing the bands from becoming too narrow or too wide.
Pine Script®
The final band width is created by combining ATR with the GARCH regime multiplier. The upper and lower bands are placed around the Zero-Lag EMA baseline.
Pine Script®
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous state is held.
3. Key Features
4. Use
Volatility Halo is designed to identify moments where price begins escaping its volatility-adjusted structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The adaptive volatility engine allows the bands to shift with the underlying market environment, making the signal more responsive to changes in pressure and regime.
This indicator is best used as a specialized module within a complete strategy framework. Its real strength appears when it is combined with a broader process for reading market behavior, timing, and risk. The full edge comes from how the signal is integrated, not from the signal existing in isolation.
Volatility Halo | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline, ATR band structure, and a recursive GARCH-style volatility regime multiplier.
The indicator does not use fixed-width bands. Instead, it starts with ATR-based bands and then adjusts their width using a projected volatility regime model. This allows the bands to respond differently when market volatility is expanding, contracting, or stabilizing.
2. Calculation
The indicator starts by calculating a Zero-Lag EMA baseline from the selected source. This baseline acts as the central trend reference, helping reduce lag compared to a standard EMA while still keeping the structure smooth.
The ATR value is then multiplied by the user-defined ATR multiple. This forms the base volatility distance used for the upper and lower bands.
The more advanced part of the indicator is the recursive GARCH-style regime multiplier. It begins by calculating log returns and converting them into shock variance. A long-run variance estimate is then built from recent shock variance.
The model recursively updates conditional variance using three components: recent shock variance, long-run variance, and previous conditional variance. When adaptive coefficients are enabled, the script searches for coefficient weights that better fit recent variance behavior.
The conditional variance is then projected and converted into a volatility estimate. This volatility is compared against its own regime baseline to create a volatility regime multiplier. The multiplier is clamped between a minimum and maximum value, preventing the bands from becoming too narrow or too wide.
The final band width is created by combining ATR with the GARCH regime multiplier. The upper and lower bands are placed around the Zero-Lag EMA baseline.
A bullish state triggers when price closes above the upper band. A bearish state triggers when price closes below the lower band. When price remains inside the bands, the previous state is held.
3. Key Features
- Zero-Lag EMA baseline for reduced-lag trend structure.
- ATR-based volatility bands.
- Recursive GARCH-style conditional variance model.
- Adaptive volatility regime multiplier.
- Bands expand or contract based on projected volatility conditions.
- State-based candle coloring, band coloring, glow effect, and regime fills.
4. Use
Volatility Halo is designed to identify moments where price begins escaping its volatility-adjusted structure. A close above the upper band reflects bullish expansion, while a close below the lower band reflects bearish expansion.
The adaptive volatility engine allows the bands to shift with the underlying market environment, making the signal more responsive to changes in pressure and regime.
This indicator is best used as a specialized module within a complete strategy framework. Its real strength appears when it is combined with a broader process for reading market behavior, timing, and risk. The full edge comes from how the signal is integrated, not from the signal existing in isolation.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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ã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.