> For the complete documentation index, see [llms.txt](https://chartschool.stockcharts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-overlays/zigzag.md).

# ZigZag

Learn how ZigZag helps identify trend changes by filtering out smaller price movements, enhancing your understanding of market trends and patterns.

## What Is the ZigZag Overlay? <a href="#introduction" id="introduction"></a>

The ZigZag feature is not a technical indicator per se but rather a means to filter out smaller price movements. A ZigZag overlay set at 10 would ignore all price movements less than 10%; only price movements greater than 10% would be included on the ZigZag line. Filtering out smaller movements allows you to see the forest instead of just trees.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FJxaXuZF0rcmJHSnQAr7L%2Fzigz-1-qqqexam.png?alt=media&amp;token=3584ac7c-5324-402a-b8c2-d62966971a0b" alt=""><figcaption><p>It's easy to see why this overlay is named ZigZag.</p></figcaption></figure>

It is important to remember that the ZigZag feature has no predictive power, because it draws lines based on hindsight. The predictive power comes from applications such as Elliott Wave, price pattern analysis, or indicators. You can also use the ZigZag (Retrace) feature to identify Fibonacci retracements and projections.

***

## ZigZag Calculation <a href="#calculation" id="calculation"></a>

The ZigZag overlay is essentially a line chart, overlaid on the main price plot, that filters out smaller price movements in order to focus on more significant price changes. Although 5% is traditionally used, the percentage price change that qualifies as significant can be configured in the ZigZag overlay settings.

{% hint style="success" %}
**Cool Tip:** ZigZag and ZigZag (Retrace) can also be plotted on indicator panels, to filter out noise on technical indicators like the RSI.
{% endhint %}

A few simple rules are used to determine whether a data point qualifies as a ZigZag High or a ZigZag Low, and then straight lines are drawn between each of these significant highs and lows to form the ZigZag line.

### ZigZag Rules for Charts with Close-Only Data

On line charts, or any other chart type that does not show high and low values, only the close is used to plot the ZigZag line. The following rules are used to determine whether each new data point qualifies as a new ZigZag High or ZigZag Low data point.

**When the previous ZigZag data point is a ZigZag High:**

* If the new bar closes **higher** than the ZigZag High, then it becomes the new ZigZag High (replacing the previous ZigZag High).
* If the new bar closes **at least the specified percentage lower** than the ZigZag High, then it becomes a new ZigZag Low.

**When the previous ZigZag data point is a ZigZag Low:**

* If the new bar closes **lower** than the ZigZag Low, then it becomes the new ZigZag Low (replacing the previous ZigZag Low).
* If the new bar closes **at least the specified percentage higher** than the ZigZag Low, then it becomes a new ZigZag High.

If the latest data point is not deemed significant enough to qualify as a ZigZag High or Low, then a line is drawn between the latest ZigZag High or Low and the latest data point. This segment of the ZigZag line is subject to change as new bars are added, and will not be finalized until a new qualifying ZigZag High or Low is added to the chart.

### ZigZag Rules for Charts with High and Low Data

On candlestick or OHLC charts, or any other chart type that includes high and low values, the highs and lows are used to plot the ZigZag line, rather than using closing values.

The rules are similar to close-only charts, but since both the high and low values are utilized when qualifying ZigZag data points, additional rules are needed.

**When the previous ZigZag data point is a ZigZag High:**

* If the new bar has a **higher high** than the ZigZag High, then it becomes the new ZigZag High (replacing the previous ZigZag High).
* If the new bar's **low is at least the specified percentage lower** than the ZigZag High, then it becomes a new ZigZag Low.
* If **both are true** (the high is higher than the ZigZag High ***and*** the low is at least the specified percentage lower than the ZigZag High), then we prioritize continuing the current trend, so the bar becomes the new ZigZag High.

**When the previous ZigZag data point is a ZigZag Low:**

* If the new bar has a **lower low** than the ZigZag Low, then it becomes the new ZigZag Low (replacing the previous ZigZag Low).
* If the new bar's **high is at least the specified percentage higher** than the ZigZag Low, then it becomes a new ZigZag High.
* If **both are true** (the low is lower than the ZigZag Low ***and*** the high is at least the specified percentage higher than the ZigZag Low), then we prioritize continuing the current trend, so the bar becomes the new ZigZag Low.

If the new data point is not deemed significant enough to qualify as a ZigZag High or Low, then a line is drawn between the latest ZigZag High or Low and the latest bar (either to its high or its low, depending on its position relative to the latest ZigZag data point). This segment of the ZigZag line is subject to change as new bars are added, and will not be finalized until a new qualifying ZigZag High or Low is added to the chart.

{% hint style="warning" %}
**Note:** A ZigZag based on the high and low values is more likely to change course than a ZigZag based on the close, because the high-low range will typically be much larger than closing values and produce bigger swings.
{% endhint %}

### Adjusting the Sensitivity of ZigZag

While 5% is the traditional percent change threshold for ZigZag, StockCharts' ZigZag features automatically choose a percentage that makes sense for that particular security.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F88XfGjVSYe6Wg3LG9957%2Fzigz-defaultbelow5.png?alt=media&amp;token=bdbba8ad-b4ce-4fff-82bd-ef6b8fbdca23" alt=""><figcaption></figcaption></figure>

Some securities produce too few ZigZag lines at 5%, so the default is set lower (e.g., 3.75% for DIS in the chart above). Some securities produce too many ZigZag lines at 5%, so the default is set higher (e.g., 7.81% in the STX chart below). The ZigZag parameter can be seen in the upper left corner of the chart.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FTiJDl8R6vGHDpNHW5GeY%2Fzigz-defaultabove5.png?alt=media&amp;token=8fec3380-7fc3-4344-a282-6e7b0c38edf5" alt=""><figcaption></figcaption></figure>

If you want to adjust the automatically chosen percentage, you can do this in the settings for the ZigZag overlay. A ZigZag with 5 in the parameter box will filter out all movements less than 5%. A ZigZag(10) will filter out movements less than 10%. So, if a stock traded from a reaction low of $100 to a high of $109, it would be a 9% move—there wouldn't be a line because the move was less than 10%. If the stock advanced from a low of $100 to a high of $110 (+10%), there would be a line from $100 to $110. If the stock continued to $112, this line would extend to $112 (100 to 112). The ZigZag would not reverse until the stock declined 10% or more from its high. From a high of $112, a stock would have to decline 11.2 points (or to a low of $100.8) to warrant another line.&#x20;

## Interpreting ZigZag

Chartists can use **ZigZag** to identify trends and help set Elliott Wave counts. **ZigZag (retrace)** can be used to identify Fibonacci retracements and projections.

### Identifying Trends

Since the ZigZag feature filters out small day-to-day price changes, focusing only on price moves that reach a certain threshold, it can be a valuable way to spot trends through the noise.&#x20;

The Citigroup (C) chart below shows a line chart with a 7% ZigZag. The early June bounce was ignored because it was less than 7%. The pullbacks in late June were similarly ignored, because they were much less than 7%.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FPjpqyij2cknlfvU2iApJ%2Fzigz--ctrends.png?alt=media&amp;token=cf522a7d-9e43-4bfa-91b0-ba39c1c5d937" alt="Chart from StockCharts.com showing a 7% ZigZag"><figcaption><p>Using a 7% ZigZag to filter out choppy price movements and spot trends. </p></figcaption></figure>

**CAUTION:** You may notice that the last ZigZag line is up even though the security advanced just 1.89% ($54.98 to $56.02). This is a temporary line. The security would have to move to $58.83 for a 7% gain to warrant a permanent ZigZag line. Should it fail to reach the 7% threshold on this bounce and decline to below $55, the temporary line would disappear, and the prior ZigZag line would continue from the late August high.

### Setting Elliott Wave Counts <a href="#elliott_wave_counts" id="elliott_wave_counts"></a>

The ZigZag feature can filter out small moves and simplify Elliott Wave counts. The chart below shows the S\&P 500 SPDR ETF (SPY) with a 6% ZigZag to filter moves less than 6%. After some trial and error, 6% was deemed the threshold of importance. An advance or decline greater than 6% was deemed significant enough to warrant a wave for an Elliott count. Keep in mind that this is just an example. The threshold and wave count are subjective and dependent on individual preferences. Based on the 6% ZigZag, a complete cycle was identified from March 2009 until July 2010. A complete cycle consists of eight waves, five up and three down.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F46ht6bWxCSWDKW2MjMFb%2Fzigz-4-spyelliott.png?alt=media&amp;token=b271f65b-63e0-4245-a94c-dc1220e0ee87" alt="Chart from StockCharts.com showing ZigZag with Elliott Waves"><figcaption><p>ZigZag with Elliott Waves.</p></figcaption></figure>

{% hint style="info" %}
**Learn More.** [Elliott Wave Theory](/table-of-contents/market-analysis/elliott-wave-analysis-articles/introduction-to-elliott-wave-theory.md)
{% endhint %}

### Identifying Retracements and Projections <a href="#retracements_and_projections" id="retracements_and_projections"></a>

SharpCharts users can choose between the normal **ZigZag** and **ZigZag (retrace)**. The normal ZigZag shows lines when prices move at least a specific percentage. The ZigZag (retrace) feature connects those reaction highs and lows with labels that measure the prior move. The numbers on the dotted lines reflect the difference between the current ZigZag line and the ZigZag line immediately before it.&#x20;

For example, the chart below shows Altera (ALTR) with the 10% ZigZag (retrace) feature. Three ZigZag lines are labeled (1, 2, and 3). The dotted line connecting the low of Line 1 with the low of Line 2 shows a box with 0.638. This means Line 2 is 0.638 (63.8%) of Line 1. A number below 1 means the line's price change is smaller than the prior line. The dotted line connecting the high of Line 2 with the high of Line 3 shows a box with 1.646. This means Line 3's price change is 1.646 (164.6%) of Line 2. A number above 1 means the line's price change is larger than the prior line.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FB5AGxXq6Qa7ZjAHih5J4%2Fzigz-3-altrrretrace.png?alt=media&amp;token=fa2c41c9-1de0-489c-8db1-7d0b3825a152" alt=""><figcaption></figcaption></figure>

As you may have guessed, seeing these lines as a percentage of the prior lines makes it possible to assess Fibonacci projections. The August decline (Line 2) retraced around 61.8% of the June–July advance (Line 1). This is a classic Fibonacci retracement. The advance from early September to early November was 1.646 times the August decline. In this sense, the ZigZag (Retrace) can be used to project the length of an advance. Again, 1.646 is close to the Fibonacci 1.618, the Golden Ratio used in many projection estimates.

{% hint style="info" %}
**Learn More.** [Fibonacci Retracements](/table-of-contents/chart-analysis/chart-annotation-tools/fibonacci-retracements.md)
{% endhint %}

***

## The Bottom Line <a href="#conclusion" id="conclusion"></a>

The ZigZag and ZigZag (Retrace) overlays filter price action and do not have any predictive power. The ZigZag lines simply react when prices move a certain percentage. Chartists can apply an array of technical analysis tools to the ZigZag. Chartists can perform basic trend analysis by comparing reaction highs and lows. Chartists can also overlay the ZigZag feature to look for price patterns that might not be as visible on a normal bar or line chart. The ZigZag has a way of highlighting the important movements and ignoring the noise. When using the ZigZag feature, don't forget to measure the last line to determine if it is temporary or permanent. This line is temporary if the current price change is less than the ZigZag parameter but becomes permanent if the price change is greater than or equal to the ZigZag parameter.

***

## Charting with ZigZag and ZigZag (Retrace) <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

### Using with SharpCharts <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

These overlays can be added to your SharpChart from the **Chart Settings** section of the SharpCharts Workbench. ZigZag and ZigZag (retrace) can be overlaid on the security's price plot or on an indicator panel.

[Click here for a live version of this ZigZag chart.](https://stockcharts.com/sc3/ui/?s=%24COMPQ\&a=2222531966\&p=D\&yr=0\&mn=8\&dy=0\&id=p94388714277)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FJiPl4WQtBkIKAqgbVhMS%2FZigZagInSC.png?alt=media&amp;token=f08877c9-5500-4a20-acdd-c904b1e6193b" alt=""><figcaption></figcaption></figure>

[Click here for a live version of this ZigZag (Retrace) chart.](https://stockcharts.com/sc3/ui/?s=%24COMPQ\&a=2222531755\&p=D\&yr=0\&mn=8\&dy=0\&id=p12440384804)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2Ffi9sNP5YlyW3JgWUx4Hi%2FZigZagRetraceInSC.png?alt=media&amp;token=c13bee12-e131-4f9b-b73c-7b3eed175f0d" alt=""><figcaption></figcaption></figure>

The parameters window will appear empty after selecting the ZigZag or ZigZag (retrace) feature from the dropdown menu. Five (5%) is the default parameter, but this can change depending on a security's price characteristics. Once the ZigZag feature is applied, you can adjust the parameter to suit your charting needs (as shown in the example below, where ZigZag (Retrace) has been adjusted to use 6.5% as its threshold). A lower number will make the feature more sensitive, while a higher number will make it less sensitive.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FZtUXOIkdZKQ4tnFqAjx6%2Fzigz-6-shch1.png?alt=media&amp;token=077f974a-15a3-4dbb-9f7c-37ec1096a401" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Learn More.** For more details on the parameters used to configure ZigZag overlays, please see our [SharpCharts Parameter Reference](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts/sharpcharts-parameter-reference#zigzag) in the Support Center.
{% endhint %}

### Using with StockChartsACP

These overlays can also be added from the Chart Settings panel for your StockChartsACP chart.  ZigZag and ZigZag (retrace) can be overlaid on the security's price plot or on an indicator panel.

[Click here for a live version of this ZigZag chart.](https://schrts.co/aDVHfnJs)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F4TnDMVRXiR1CvHWUgSbl%2FZigZagInACP.png?alt=media&amp;token=c7fdfb68-7538-4a1a-96c0-4a3fa9af6084" alt=""><figcaption></figcaption></figure>

[Click here for a live version of this ZigZag (retrace) chart.](https://schrts.co/EcchpTVS)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FxVCtRVeLuEn9GAMoJQlC%2FZigZagRetraceInACP.png?alt=media&amp;token=eb554270-1038-4d26-ae53-9cefa57b03a9" alt=""><figcaption></figcaption></figure>

By default, both overlays automatically select an appropriate Percentage threshold for that particular security. To set your own custom Percentage, uncheck the "Auto Percentage" box and enter the desired threshold in the Percentage field.

## Additional Resources <a href="#additional_resources" id="additional_resources"></a>

### ChartSchool Articles <a href="#chartschool_articles" id="chartschool_articles"></a>

[**Swing Charting**](/table-of-contents/trading-strategies-and-models/trading-strategies/swing-charting.md)\
Learn how to use the ZigZag overlay when swing trading.

### Recommended Books <a href="#recommended_books" id="recommended_books"></a>

Robert Prechter's [*Elliott Wave Principle*](https://a.co/d/1cnd1eE) introduces the fundamental concepts and techniques of Elliott Wave Theory and serves as a comprehensive yet accessible handbook for traders interested in this market forecasting technique.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-overlays/zigzag.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
