All indicators

ZigZag++

Feb 12, 2020

Static chart image
Price Action BasedSignalsPatternsRepainting Functionality

The ZigZag++ indicator provides an advanced price action tracking tool that identifies swing highs and lows to highlight market structure through customizable trend lines and automated labels.

Usage

The Usage section describes how the script can be used to identify market trends, structural shifts, and chart patterns. By connecting significant price peaks and troughs, the indicator filters out market noise and allows traders to focus on Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL).

Key applications include:

  • Trend Identification: Users can observe the sequence of peaks and troughs to determine the current trend direction.
  • Pattern Recognition: The script acts as a foundation for identifying harmonic patterns and geometric shapes like wedges or head and shoulders.
  • Structure Alerts: Traders can set alerts for specific structural developments, such as a "New Higher High" or a change in trend direction.

The indicator offers a "Repaint Levels" toggle. When enabled, the indicator updates the current point in real-time as price fluctuates. When disabled, lines and labels are only confirmed once the movement meets the defined criteria and the trend has officially shifted.

Details

ZigZag++ utilizes the standard ZigZag logic involving Depth, Deviation, and Backstep to filter price movements.

  • Depth: The minimum number of bars without any second maximum/minimum deviation from the bar.
  • Deviation: The minimum number of points (expressed as a percentage or absolute value depending on implementation) required for a new peak or trough to be established.
  • Backstep: The minimum number of bars between which peaks or troughs can be identified.

The script incorporates a library-based calculation method to ensure efficiency. It also includes an automated labeling system that compares the current pivot price to the previous pivot price of the same type to categorize the market structure (HH, HL, LH, LL).

Settings

ZigZag Config

  • Depth: Sets the minimum number of bars to consider for swing detection.
  • Deviation: Defines the minimum price change required to trigger a new swing point.
  • Backstep: Specifies the minimum distance between consecutive peaks or troughs.

Lines

  • Line Thickness: Adjusts the visual width of the ZigZag trend lines.
  • Lines Transparency: Controls the visibility of the drawn lines.
  • Extend ZigZag: When enabled, the most recent line will extend infinitely to the right of the chart.

Labels

  • Label Size: Sets the size of the structure labels (HH, HL, etc.) from tiny to huge.
  • Labels Transparency: Controls the background and text transparency of the labels.

Colors

  • Bull Color: Selects the color for bullish segments and labels.
  • Bear Color: Selects the color for bearish segments and labels.
  • Background Transparency: Adjusts the opacity of the background highlight that indicates the current trend direction.

General

  • Repaint Levels: Toggles between real-time updating (repainting) and confirmed-only drawing.

FAQ

How do I interpret the HH, HL, LH, and LL labels? HH stands for Higher High, HL for Higher Low, LH for Lower High, and LL for Lower Low. These labels automatically compare the current pivot point to the previous one to help you identify if the market is trending upwards, downwards, or consolidating.

Why does the last line move as price changes? If "Repaint Levels" is enabled, the indicator will adjust the current leg of the ZigZag in real-time to match the highest high or lowest low of the current move. To see only confirmed points, disable this setting.

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 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.