Zig Zag Indicator: Definition, How Pattern Is Used, and Formula

What Is the Zig Zag Indicator?

The Zig Zag indicator lowers the impact of random price fluctuations and is used to help identify price trends and changes in price trends.

Key Takeaways

  • The Zig Zag indicator lowers the impact of random price fluctuations and is used to identify price trends and changes in price trends.
  • The indicator lowers noise levels, highlighting underlying trends higher and lower.
  • The Zig Zag indicator works best in strongly trending markets.

Understanding the Zig Zag Indicator

The Zig Zag indicator plots points on a chart whenever prices reverse by a percentage greater than a pre-chosen variable. Straight lines are then drawn, connecting these points.


The indicator is used to help identify price trends. It eliminates random price fluctuations and attempts to show trend changes. Zig Zag lines only appear when there is a price movement between a swing high and a swing low that is greater than a specified percentage—often 5%. By filtering minor price movements, the indicator makes trends easier to spot in all time frames.

The Zig Zag indicator is often used in conjunction with Elliot Wave Theory to determine the positioning of each wave in the overall cycle. Traders can experiment with different percentage settings to see what gives the best results. For example, a setting of 4% may define waves more clearly than a setting of 5%. Stocks have their own patterns, so it is likely that traders will need to optimize the Zig Zag indicator’s percentage setting to suit those securities

Although the Zig Zag indicator does not predict future trends, it helps to identify potential support and resistance zones between plotted swing highs and swing lows. Zig Zag lines can also reveal reversal patterns, i.e. double bottoms and head and shoulders tops. Traders can use popular technical indicators such as the relative strength index (RSI) and the stochastics oscillator to confirm whether the price of a security is overbought or oversold when the Zig Zag line changes direction.

momentum investor might use the indicator to stay in a trade until the Zig Zag line confirms in the opposite direction. For example, if the investor holds a long position, they would not sell until the Zig Zag line turns downward.

The Zig Zag Indicator Formula

ZigZag ( HL , % c h a n g e = X , r e t r a c e = FALSE , L a s t E x t r e m e = TRUE ) If  % c h a n g e > = X , plot ZigZag where: HL = High-Low price series or Closing price series % c h a n g e = Minimum price movement, in percentage R e t r a c e = Is change a retracement of the previous move or an absolute change from peak to trough? L a s t E x t r e m e = If the extreme price is the same over multiple periods, is the extreme price the first or last observation? \begin{aligned} &\text{ZigZag}(\text{HL}, \%change=X, retrace=\text{FALSE},\\ &LastExtreme=\text{TRUE})\\ &\text{If } \%change >=X, \text{plot ZigZag}\\ &\textbf{where:}\\ &\text{HL}=\text{High-Low price series or Closing price series}\\ &\%change=\text{Minimum price movement, in percentage}\\ &Retrace=\text{Is change a retracement of the previous}\\ &\text{move or an absolute change from peak to trough?}\\ &LastExtreme=\text{If the extreme price is the same over}\\ &\text{multiple periods, is the extreme price the first or}\\ &\text{last observation?}\\ \end{aligned} ZigZag(HL,%change=X,retrace=FALSE,LastExtreme=TRUE)If %change>=X,plot ZigZagwhere:HL=High-Low price series or Closing price series%change=Minimum price movement, in percentageRetrace=Is change a retracement of the previousmove or an absolute change from peak to trough?LastExtreme=If the extreme price is the same overmultiple periods, is the extreme price the first orlast observation?

How To Calculate the Zig Zag Indicator

  1. Choose a starting point (swing high or swing low).
  2. Choose % price movement.
  3. Identify next swing high or swing low that differs from the starting point = > % price movement.
  4. Draw trendline from starting point to new point.
  5. Identify next swing high or swing low that differs from the new point = > % price movement.
  6. Draw trendline.
  7. Repeat to most recent swing high or swing low.

Zig Zag Indicator Limitations

Like other trend-following indicators, buy and sell signals are based on past price history that may not be predictive of future price action. For example, the majority of a trend may have already happened when a Zig Zag line finally appears.

Traders should be aware the most recent Zig Zag line may not be permanent. When price changes direction, the indicator starts to draw a new line. If that line does not reach the indicator’s percentage setting and the price of the security reverses direction, the line is removed and replaced by an extended Zig Zag line in the trend’s original direction.

Given the lag, many traders use the Zig Zag indicator to confirm the direction of the trend rather than attempting to time a perfect entry or exit.

Open a New Bank Account
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.