Zero-Lag GARCH Bands | NAL1. Overview
Zero-Lag GARCH Bands | NAL is an adaptive volatility band indicator built from a Zero-Lag EMA baseline and an optimized GARCH-style volatility engine.
The indicator does not use a standard fixed-width channel. Instead, it estimates market variance through a recursive GARCH framework, smooths that volatility with a Zero-Lag EMA, and uses the result to create dynamic upper and lower bands around price structure.
The purpose of the indicator is to identify when price escapes a volatility-adjusted regime boundary, while allowing the band width to adapt to the underlying variance environment.
2. Calculation
The indicator starts by estimating volatility from lagged log returns. These returns are squared to create a variance component, which becomes the foundation of the GARCH model.
GARCH_LogReturn = math.log(close / close )
GARCH_SquaredLogReturn = math.pow(GARCH_LogReturn, 2.0)
GARCH_RealizedVariance = ta.sma(GARCH_SquaredLogReturn, GARCH_Lookback)
The script then searches through possible coefficient weights to find a beta/lambda value that better fits recent realized variance behavior. A second optimization loop is used to estimate gamma, which controls the long-run variance contribution.
These optimized coefficients are combined into a GARCH-style variance model using three components: long-run variance, recent shock variance, and lagged variance.
GARCH_Variance =
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_SquaredLogReturn +
GARCH_Beta * GARCH_LaggedVariance
After the variance estimate is created, it is smoothed using a Zero-Lag EMA. This gives the volatility engine a faster response while still reducing noise.
GARCH_ProjectedVariance = f_zlema(GARCH_Variance, GARCH_SmoothLen)
GARCH_Volatility = math.sqrt(math.max(GARCH_ProjectedVariance, 0.0))
The baseline is also built with a Zero-Lag EMA, applied after a light EMA pre-smoothing step. This creates the central reference line for the band structure.
The final bands are created by scaling the Zero-Lag GARCH volatility against the selected source and band pressure setting. Higher band pressure creates a tighter band, while lower pressure allows the band structure to expand.
upperBand = baseline + (baseline_src / band_pressure) * GARCH_VolatilityMultiplier
lowerBand = baseline - (baseline_src / band_pressure) * GARCH_VolatilityMultiplier
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 regime is held.
3. Key Features
Zero-Lag EMA baseline for reduced-lag price structure.
Optimized GARCH-style volatility engine.
Adaptive variance model using shock, lagged, and long-run components.
Zero-Lag smoothing applied to projected volatility.
Dynamic upper and lower volatility bands.
Band pressure control for adjusting channel tightness.
State-based candle coloring, band coloring, glow effect, and directional fills.
4. Use
Zero-Lag GARCH Bands is designed to identify when 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 GARCH engine gives the indicator a deeper volatility layer than a standard ATR or deviation channel. Instead of only measuring recent range, it models variance behavior and projects that into the band structure.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate volatility-adjusted regime expansion, where price is evaluated against a dynamic variance boundary rather than a static channel. The full value comes from how this volatility regime signal is integrated into a broader process for timing, structure, and execution.
Chỉ báo






















