# Master the Zig Zag Indicator: Definition, Usage & Formula for Trend Analysis

![A person using a pen to draw a zig zag indicator on the stock chart.](https://www.investopedia.com/thmb/QsP6RLhsW6LpoaQ-nVuiybGm-tc=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/ZigZagIndicatorDefinitionHowPatternIsUsedandFormula-72e93f296a01465e8b79be303cf3f1d8.jpg)

*— yangwenshuang / Getty Images*

## What Is the Zig Zag Indicator?

The Zig Zag indicator minimizes random price fluctuations to help identify shifts in price [trends](https://www.investopedia.com/terms/t/trend.asp).

### Key Takeaways

*   The Zig Zag indicator helps identify price trends by filtering out random price fluctuations.  
    
*   It is most effective in strongly trending markets and highlights underlying trends.  
    
*   Traders often use it alongside Elliott Wave Theory to better understand wave positions.  
    
*   The indicator does not predict future trends but helps spot potential support and resistance areas.  
    
*   Adjusting the percentage setting can optimize the indicator's effectiveness for different securities.

## How the Zig Zag Indicator Helps Identify Trends 

The Zig Zag indicator plots points when prices reverse by more than a set [percentage](https://www.investopedia.com/ask/answers/030415/what-zig-zag-indicator-formula-and-how-it-calculated.asp). Analysts set the percentage level to trigger the indicator, connecting points with straight lines.

![](https://www.investopedia.com/thmb/f3r5UZlSnKlKZEXnMVIMLcGSZkY=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/ZigZag-5c643b96c9e77c0001566e88.png)

*TradingView.*

The indicator highlights price trends by eliminating random fluctuations to show trend changes. Zig Zag lines only appear when there is a price movement between a [swing high](https://www.investopedia.com/terms/s/swinghigh.asp) and a swing low that is greater than a specified percentage—often 5%. Filtering minor movements, the indicator makes trends easier to spot across all time frames.

The Zig Zag indicator is often used in conjunction with [Elliot Wave Theory](https://www.investopedia.com/articles/technical/111401.asp) to determine the positioning of each wave in the overall cycle. Traders can try different percentage settings for optimal results; a 4% setting might define waves more clearly than 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](https://www.investopedia.com/terms/s/security.asp). 

While the Zig Zag indicator doesn't predict future trends, it helps identify potential [support and resistance](https://www.investopedia.com/trading/support-and-resistance-basics/) zones between swing highs and lows. Zig Zag lines can also reveal reversal patterns like [double bottoms](https://www.investopedia.com/terms/d/doublebottom.asp) and head-and-shoulders tops.

Traders use indicators like the RSI and stochastics oscillator to check if a security is overbought or oversold when the Zig Zag line changes direction.

> **Tip**
>
> A 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.

## Formula for Calculating the Zig Zag Indicator

$\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}$

### Steps 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](https://www.investopedia.com/terms/t/trendline.asp) 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.

## Challenges and Limitations of the Zig Zag Indicator

Like other [trend-following indicators](https://www.investopedia.com/articles/optioninvestor/10/trend-following-indicators.asp), buy and [sell signals](https://www.investopedia.com/terms/s/sell-signal.asp) 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 prices change direction, the indicator begins 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.

Due to its lag, traders often use the Zig Zag indicator to confirm trend direction instead of timing perfect entries or exits.