All indicators

ZigZag Multiple Methods - Forecast - patterns - labels

Aug 10, 2020

Static chart image
Support and ResistanceVolume BasedForecastingPatternsPivot Based (Retrospective)Volatility

The ZigZag Multiple Methods - Forecast - patterns - labels indicator provides a comprehensive toolkit for identifying price structural pivots through multiple calculation methodologies, including percent moves, volatility-adjusted ATR, and price action pivots. It is designed to act as a foundational tool for technical analysis by forecasting potential reversal areas based on historical zigzag statistics and automatically detecting harmonic and geometric price patterns.

Usage

The Usage section describes how the script can be used to identify trend structure and potential reversal zones.

  • Pivot Identification: The indicator plots zigzag lines connecting key highs and lows based on the selected "Method." This helps in filtering market noise and focusing on significant price movements.
  • Forecast Projections: When enabled, the script calculates a "Forecast area" using averaging weights. It projects where the next pivot is likely to occur in both price and time, visualized through dashed lines and bounding boxes.
  • Pattern Recognition: The indicator automatically labels detected patterns (such as Harmonic or Price Action structures) on the chart when specific price ratios and error margins are met.
  • Slope and Statistics: Labels can display additional data including price differentials, time duration between pivots, and volume transacted during the leg.

Details

The script consolidates various zigzag construction logic into a single tool, offering more flexibility than standard fixed-percentage zigzags.

  • Calculation Methods:
    • Manual Percent: Traditional zigzag based on a fixed percentage move.
    • ATR/TR Methods: Dynamically adjusts sensitivity based on Average True Range or Maximum True Range, making the zigzag adaptive to market volatility.
    • Pivot (X, Y): Uses high/low pivot detection based on a lookback window.
  • Statistical Forecasting: The projection logic uses an exponential moving average (weighting) of previous zigzag leg lengths (price) and durations (time). It then applies standard deviation-like offsets to create a "target zone" for the next potential reversal.
  • Note on Repainting: As with most zigzag-based indicators, the most recent leg will "repaint" or adjust until the reversal criteria for a new pivot are fully satisfied.

Settings

ZigZag Options

  • Show real zigzag pivots: Determines if the zigzag connects to the exact high/low time or the current bar time.
  • Show zigzag lines: Toggles the visibility of the primary zigzag trend lines.
  • Method to use for the zigzag: Selects the mathematical logic used to define a pivot (Manual %, ATR-based, or Pivot-based).
  • Parameter X / Y: Input values that adjust the sensitivity of the chosen method (e.g., the percentage threshold or the ATR multiplier).

Label Options

  • Show price labels on zigzag: Displays the price value and volume at each pivot point.
  • Show rate labels on triangles: Displays price/time ratios between legs.
  • Show Angle Degree information: An experimental feature that calculates and displays the geometric angle of the zigzag leg.

Pattern Options

  • Show Patterns: Enables the detection and labeling of specific price patterns.
  • Pattern Error Margin: Adjusts the tolerance for pattern ratio detection; higher values allow for more "imperfect" patterns to be identified.

Projection Options

  • Show projections forecast of zigzag: Displays the projected lines for the next expected move.
  • Show projections forecast Bounds: Draws a shaded box representing the statistical target area for the next pivot.
  • Averaging Weight: Controls how heavily recent zigzag legs influence the forecast (lower values look at longer history).

FAQ

How do I adjust the sensitivity of the zigzag? You can adjust the "Parameter X" and "Parameter Y" settings. For percentage-based methods, increasing these values will result in fewer, larger zigzag legs, while decreasing them will capture smaller price fluctuations.

Why does the last leg of the zigzag move? The zigzag is a lagging/confirming indicator. The final leg will continue to extend as long as the price moves in the current direction. It only "locks in" once a reversal meeting your specified criteria (Method/Parameters) occurs.

How can I access this indicator? 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.