Technical indicators

ZigZag Indicator: Filtering Price Swings and Its Repainting Limit

The ZigZag indicator is a chart overlay that joins swing highs and lows when price reverses by at least a set threshold, such as 5%. Smaller moves are filtered out. Because the latest leg is redrawn until a new reversal is confirmed, the ZigZag indicator repaints and is not a real-time signal.

By RTX5 Editorial TeamLast updated: Editorial methodology
Illustrative EXAMPLE of a ZigZag line with a 5% threshold over seven numbered steps. Confirmed legs run from 100.00 up to 108.00 and down to 96.00. A dashed provisional leg runs from 96.00 up to 104.00 while price sits at 99.00, just above the 98.80 threshold line.
Illustrative EXAMPLE: the dashed last leg stays provisional until a 5% reversal confirms it, and a fall to 98.80 or lower would confirm the 104.00 high. Open full-size diagram (opens in a new tab)

In brief

What is the ZigZag indicator?

ZigZag removes small reversals from a chart. The newest leg stays provisional until a larger reversal confirms it, so the line can change after the fact.

Key takeaways

  • The ZigZag indicator joins swing highs and lows only after price reverses by a set threshold, so smaller moves are filtered out.
  • StockCharts ChartSchool calls 5% the traditional threshold and its default parameter, and says its charts can automatically choose a different percentage for a security. TradingView and the MetaTrader 5 Android help state no default, and their settings use different units.
  • The latest leg is provisional. It can extend, shorten or disappear until a new reversal confirms it or invalidates it.
  • Because confirmation needs later prices, the ZigZag indicator describes past swings only.
  • A ZigZag line describes past structure. It is not a forecast, and it does not show a target or a win rate.

How the ZigZag indicator filters price swings

The ZigZag indicator draws straight lines between swing highs and swing lows. It does not draw a point for every bar. A new turning point is recorded only when price reverses by at least a set threshold, so smaller moves are left out and the chart shows fewer, larger legs. StockCharts ChartSchool describes ZigZag as a filter for smaller price movements.

The logic runs one leg at a time. While price keeps making new highs, the up leg extends. Once price falls from that high by at least the threshold, the high is confirmed as a turning point and a down leg starts from it. The same logic works in reverse at a low. For the wider background on price moves, read what is trading and the support and resistance guide.

ZigZag threshold settings: what the sources say

A ZigZag indicator needs a threshold, and platforms name the setting differently. The table lists what the sources cited in this guide say. They do not agree on every detail, so the table shows the differences rather than picking one.

ZigZag threshold settings in three cited sources
SourceSetting namedDefault statedWhat the source says
StockCharts ChartSchoolPercentage threshold5%, which the article says can change with a security's price characteristicsOn close-only charts, a new bar that closes at least the set percentage from the current ZigZag high or low becomes a new swing point.
TradingView support articlePrice deviation for reversals (%) and Pivot legsNo default statedThe deviation is the minimum absolute reversal percentage, measured relative to the last displayed pivot. Pivot legs is the number of bars required to confirm a pivot point.
MetaTrader 5 Android helpPeriod, Deviation and BackstepNo default statedPeriod is a minimum bar count, tied to the Deviation in pips. Deviation is the minimum pips to form a new high or low. Backstep is the minimum bars between highs or lows.
MQL5 article code (ZigZag analyzer)ZZ_Depth, ZZ_Deviation and ZZ_Backstep12, 5 and 3 in the article's codeThe article labels the inputs depth, deviation and backstep, but does not explain what each one does.

Verified on 10 November 2026. The MetaTrader 5 settings come from its Android app help page, listed in the sources.

Because the units and names differ, a value of 5 in one platform is not the same as 5% in another. Check the inputs and their units in your own platform before you compare charts.

ZigZag worked example with a 5% threshold

This is an Example with made-up prices, not market data. It uses a 5% threshold and follows seven price points in order. Each move is rounded to two decimal places. A move in the direction of the current leg is measured from the pivot where that leg started. A move against the current leg is measured from that leg's most recent extreme (the highest high in an up leg, the lowest low in a down leg). A reversal confirms that extreme as a turning point only when it reaches 5% of the extreme.

Example: ZigZag steps at a 5% threshold
StepPriceMove from reference priceZigZag status
1100.00Starting pointPivot low at 100.00 is already marked
2108.00+8.00% from 100.00Up leg extends to 108.00. The high is provisional
3102.50-5.09% from 108.00Reversal reaches 5%. The 108.00 high is confirmed
496.00-11.11% from 108.00Down leg extends to 96.00. The low is provisional
5101.00+5.21% from 96.00Reversal reaches 5%. The 96.00 low is confirmed
6104.00+8.33% from 96.00Up leg extends to 104.00. The high is provisional
799.00-4.81% from 104.00Below 5%. The 104.00 high is still provisional

Example arithmetic only. The 5% threshold is the traditional value that StockCharts describes.

At step 7 the chart shows a provisional leg from 96.00 up to 104.00. Price has fallen to 99.00, but that fall is 4.81%, which is below the threshold. A 5% reversal from 104.00 would need a price at or below 98.80, because 104.00 multiplied by 0.95 is 98.80. Until then, the 104.00 point is not a confirmed swing high, and the last leg can still change.

Had price risen to 106.00 at step 7 instead, the provisional high would have moved to 106.00 and the leg would have been redrawn to that point. A move from 96.00 to 106.00 is 10.42%. The example shows the core limit: the line visible at step 7 can differ from the line visible once a later reversal confirms the swing.

Why the ZigZag indicator repaints

The ZigZag indicator repaints because a turning point is confirmed only by later price action. The most recent leg depends on prices that have not yet reversed by the threshold, so it can move as new bars arrive. StockCharts says the latest segment "is subject to change as new bars are added".

TradingView's support article says the indicator removes or redraws the latest line if subsequent price action invalidates its pivot points. This is the repainting limit named in the title. The older swings are fixed once confirmed. The newest leg is the part a reader most wants in real time, and it is the part least likely to stay the same.

  • Note the last pivot on a live chart, then watch it over several new bars before you treat it as fixed.
  • Save a screenshot at the time you read the chart, so you can compare what the line showed then with what it shows later.

Why a ZigZag line is not a real-time signal

A ZigZag line describes swings that have already been confirmed. It can show where price turned by at least the chosen threshold. It cannot show, when a leg starts, whether that leg will reach the threshold or how far it will go. For that reason this guide does not present the indicator as a timing tool, a signal or a forecast.

A finished chart can look clean and make the turns seem visible as they happened. A useful check is to ask whether the line you see would have been there at the moment you needed it. For the last leg the answer is often no. Use ZigZag to review past structure, such as counting how many swings a threshold produced over a period. Do not rely on it alone to decide an entry, a stop or an exit.

Limits of the ZigZag indicator

  • The threshold decides what counts as a swing. A 5% setting can hide moves that a shorter-term reader cares about, while a smaller setting creates more legs, and the last of them is still provisional.
  • A fixed percentage or pip count treats a quiet market and a volatile market the same way. The sources cited in this guide describe percentage, pip-based or bar-count settings, so check what your platform's inputs mean.
  • Lines join the pivots and hide everything between them. Intrabar highs and lows, and the order of price moves inside a leg, are not shown.
  • A ZigZag line does not mark support or resistance by itself. Turning points can be read as past reference prices. The support and resistance guide covers how such levels are identified and where they fail.

Reading ZigZag beside related tools

A fractals indicator marks swing points with a fixed bar pattern alone, while ZigZag adds a reversal threshold, so the two tools can mark different turns on the same chart. Both need later bars before the pivot is confirmed. Trendlines join points that you choose by hand, and Elliott wave theory uses swing structure to describe wave patterns, which is a subjective reading.

None of these methods turns a ZigZag line into a forecast. The next step is to compare the fractals rule with the threshold rule on the same chart, and note where they disagree.

Risk disclosure

  • The ZigZag indicator describes confirmed past swings. Its latest leg is provisional and can be redrawn as new bars arrive.
  • Changing the threshold changes every line on the chart. A setting chosen after the fact can make a chart look cleaner than it looked in real time.
  • A ZigZag line does not show an entry, an exit, a target or the price that comes next.
  • Settings, names and units differ between platforms. MetaTrader 5 uses Period, Deviation and Backstep, while StockCharts uses a percentage threshold. Check your own platform before comparing results.
  • This page is educational and is not personal financial advice. It makes no claim about returns, win rates or outcomes from using the indicator.

RTX5 status

This guide explains the ZigZag indicator in general and does not describe an RTX5 feature. No RTX5 release record confirms which indicators, chart types or alerts the product includes. Its Windows desktop client is in preview, and the web and mobile clients are planned. A Google Play listing for Android is published, but the mobile client has no approved release record yet; check the product-availability record before relying on any RTX5 feature.

Check RTX5 product availability

Trust and methodology

How this research was prepared

We want you to be able to identify who owns the page, inspect the evidence, understand how tools were used, and challenge anything that looks wrong or out of date.

Accountable publisher

Published under the RTX5 Editorial Team byline. It identifies the responsible publishing organization; it does not imply that a named lawyer, regulator, financial adviser, or licensed expert approved this page.

Evidence you can inspect

5 primary references are listed on this page with context about what each one supports. The source set was checked on .

Assistance is disclosed

Automation and AI may help organize research, outline a page, or edit language. They are not treated as sources, are not presented as human experts, and do not remove the publisher's responsibility for the final page.

Questions readers ask

What is the ZigZag indicator?

The ZigZag indicator is a chart overlay that connects swing highs and lows when price reverses by at least a set threshold, such as 5%. Smaller moves are filtered out, so the chart shows fewer, larger legs. It describes swings that have already been confirmed. It does not forecast the next move, and its newest leg can change as new bars arrive.

Why does the ZigZag indicator repaint?

A turning point is confirmed only when later price action reverses by the threshold. Until then, the latest leg is provisional. As new bars arrive, that leg can extend, shorten or disappear, and the chart is redrawn. StockCharts describes the latest segment as subject to change, and TradingView says the latest line can be redrawn when later price invalidates the pivot.

Is the ZigZag indicator a buy or sell signal?

No. This guide does not present ZigZag as a buy or sell signal, a timing tool or a forecast. It marks past swings that a set reversal confirmed, and the latest leg is not final. A confirmed low shows where price turned in the past. It does not show what price will do after that point.

What is the default ZigZag threshold?

It depends on the platform and the source. StockCharts ChartSchool describes 5% as the traditional threshold and the default parameter, which can change with a security's price characteristics; its charts can also choose a percentage for each security automatically. The TradingView support article states no default for its deviation setting, and the MetaTrader 5 Android help states none for Period, Deviation or Backstep. An MQL5 article's code declares ZZ_Deviation as 5, but that is a code value, not a platform default.

How is the ZigZag indicator different from fractals?

ZigZag uses a reversal threshold: a turn counts when price reverses by the set amount, and some versions also need a bar count to confirm a pivot. A fractal uses a fixed bar pattern only, so the two can mark different turns on the same chart. Both need later bars to confirm a pivot, and neither shows the price that comes next. The fractals indicator guide explains its own rule.

Can the ZigZag indicator show support and resistance?

Confirmed turning points can be read as past reference prices, and some traders review them that way. The indicator does not mark support or resistance levels as such. A line on a chart is not a proven level, so read the support and resistance guide before you use past turns as reference points.