Volatility ZigZag

Dec 12, 2023

Static chart image
Signals
Dashboard
Patterns
Volatility

The Volatility ZigZag indicator calculates and plots trend lines based on price movement and market volatility, helping traders identify significant structural pivots while filtering out minor price noise.

Usage

The tool identifies major pivot points in price action and connects them with lines, allowing users to visualize market structure. Unlike standard ZigZag indicators that rely solely on fixed percentage movements, this script incorporates volatility measures (Standard Deviation and True Range) to adapt to changing market conditions.

Key usage features include:

  • Trend Identification: Connects swing highs and lows to define the current trend direction.
  • Structural Labeling: At each pivot point, the indicator can display critical data such as price change (absolute and percentage), volume profile, and bar counts.
  • Confirmation: Fixed pivot points (indicated by ⦿) emerge when price crosses the deviation line, signaling a confirmed reversal.
  • Statistical Analysis: An optional table provides data on average wave lengths and the probability of specific wave patterns.

Details

The script utilizes a combination of standard deviation and True Range to calculate a dynamic deviation threshold. By adjusting the "Standard Deviation Factor," users can tune the sensitivity of the pivot detection. A higher "minimum ZigZag candles length" requires more bars to confirm a trend change, which helps suppress false signals in choppy markets.

Settings

ZigZag Calculation

  • use High/Low: Determines if the script uses High and Low prices for calculation or an alternative source.
  • Else: The alternative price source (e.g., Close) if High/Low is disabled.
  • default Length: Automatically sets the lookback period based on the timeframe (e.g., 251 for daily).
  • Custom: Allows for a manual lookback period setting.
  • minimum ZigZag candles length: The number of bars required to confirm a new pivot.
  • minimum ZigZag deviation (%): Sets a floor for the percentage movement required for a reversal.
  • Standard Deviation Factor: A multiplier applied to the standard deviation to widen or tighten the reversal zones.

ZigZag Styling

  • Draw ZigZag: Toggles the visibility of the ZigZag lines.
  • Deviation Line: Displays the threshold line that price must cross to confirm a new pivot.
  • Fixed Pivot ⦿: Toggles the ⦿ symbol at confirmed reversal points.
  • Alert Point ◯: Displays a symbol when a new pivot is first detected.

ZigZag Labeling

  • Draw Labels: Master toggle for all pivot labels.
  • Reversal Price: Shows the price at which the pivot occurred.
  • Counter: Displays the number of bars between the current and previous pivot.
  • Price Change: Shows the absolute price difference and arithmetic mean between pivots.
  • Percentage Change: Displays the relative percentage growth and compound growth rate.
  • Volume: Shows total and average volume accumulated between pivots.

FAQ

How do I use the Volatility ZigZag for trend confirmation?

A new fixed pivot (⦿) indicates that price has moved significantly enough away from the previous extreme to suggest a structural shift. Traders often look for higher highs/lows or lower highs/lows formed by these lines to confirm trend direction.

What is the difference between the "Fixed Pivot" and "Alert Point"?

The Fixed Pivot (⦿) represents a confirmed structural point, while the Alert Point (◯) signals the exact moment a new pivot emerges based on the deviation logic.

How can I access this script?

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

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.