All indicators

Garman-Klass-Yang-Zhang Historical Volatility Bands

Sep 18, 2022

Static chart image
SignalsChannelsMoving AveragesVolatility

The Garman-Klass-Yang-Zhang Historical Volatility Bands tool provides a volatility-based envelope around a central moving average, utilizing an advanced estimator that accounts for overnight gaps and intraday price action. By incorporating opening jumps and high-low ranges, it offers a more efficient measure of market volatility compared to standard close-to-close estimators.

Usage

The tool is primarily used to identify potential overextended price levels and volatility-driven trends. The middle line acts as the core trend tracking component, while the upper and lower bands expand or contract based on the calculated historical volatility.

  • Trend Identification: Users can observe the direction of the middle line and the bands to gauge trend momentum.
  • Volatility Squeezes: Narrowing bands indicate periods of low volatility, often preceding significant price breakouts.
  • Mean Reversion: Prices touching or exceeding the outer bands may signal potential exhaustion points or reversal zones.
  • Signal Indicators: The script can display visual signals and provide bar coloring based on the relationship between price and the bands.

Details

The core of this indicator is the Garman-Klass-Yang-Zhang (GKYZ) volatility estimator. This specific model is an extension of the Garman-Klass estimator, designed to include the impact of opening jumps (the difference between the current open and previous close).

It assumes a Brownian motion model and is considered highly efficient—up to 8 times more efficient than simple close-to-close calculations. However, users should note that in high-drift environments (where price moves strongly in one direction relative to volatility), the estimator may slightly overestimate the actual volatility. The bands are constructed by adding and subtracting the GKYZ volatility (multiplied by a deviation factor) from a selected moving average.

Settings

Source Settings

  • Smoothing Type: Choose between AMA, T3, or Kaufman for Heiken-Ashi Better Smoothing.
  • Source: Select from a wide variety of price sources, including standard OHLC, Median, Typical, and various Heikin-Ashi variants.

Basic Settings

  • Period: The lookback period used for both the moving average and the volatility calculation.
  • Double Smoothing MA Type: Select the type of moving average for the middle line (e.g., HMA, EMA, SMA, LSMA, VWMA, etc.).
  • Deviations: A multiplier that determines the width of the bands relative to the volatility.

UI Options

  • Color bars?: Enables or disables bar coloring based on trend and volatility state.
  • Show signals?: Toggles visual signals on the chart.

Moving Average Inputs

  • Kaufman's / Adaptive MA Parameters: Specific tuning parameters (Fast/Slow ends) for KAMA and AMA smoothing types.

FAQ

How do I access Garman-Klass-Yang-Zhang Historical Volatility Bands?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What makes this different from Bollinger Bands?

Unlike Bollinger Bands, which use standard deviation, these bands use the GKYZ estimator which accounts for opening gaps and intraday ranges, making them more reactive to specific types of market volatility.

Why is the middle line changing colors?

The middle line uses a 3-color logic. It adopts the color of the bands when they are synchronized (indicating a clear trend) and turns neutral (white) when the upper and lower band directions diverge.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.