Indicators · Trend and moving averages
ZigZag indicator: filtering swings, and why the last leg repaints
How the ZigZag connects swing highs and lows that differ by a set percentage, a worked example on IWM, why its last leg changes, and how Finabase draws it.
On this page
The ZigZag is not a forecasting indicator. It is a filter that redraws a price chart as a series of straight lines between significant highs and lows, ignoring every move smaller than a percentage you choose. With a 5% setting, any wiggle of less than 5% disappears and only the swings that mattered remain. The idea goes back to Arthur Merrill's "filtered waves" studies of the 1970s.
That makes it one of the most useful tools for seeing a chart: where the swing highs and lows were, how long each leg lasted, how big the typical pullback was. It is also one of the most misused, because its most recent line is provisional and changes as new bars arrive. This guide shows the rule, follows the ZigZag over two years of the iShares Russell 2000 ETF at two settings, and explains the repainting problem precisely.
How the ZigZag decides what counts
The rule is a percentage reversal filter. Starting from a known extreme, the indicator tracks price in the current direction:
- While price keeps making new extremes in the current direction (higher highs in an up-leg, lower lows in a down-leg), the candidate pivot moves to the newest extreme.
- When price reverses from that candidate by more than the threshold, the candidate is confirmed as a pivot and the direction flips.
- Smaller reversals are ignored entirely.
The first leg starts from the first bar's close; after that, up-leg pivots are bar highs and down-leg pivots are bar lows.
A worked example on IWM
In early 2025 the iShares Russell 2000 ETF (IWM) fell from a swing high to a low of $197.00 on March 13. Here is how a 5% ZigZag handled the next weeks.
| Step | Bar | What happened | ZigZag action |
|---|---|---|---|
| 1 | Mar 13, 2025 | Low $197.00 | Candidate low |
| 2 | late March | A high above $197 × 1.05 = $206.85 | $197 confirmed as a swing low; up-leg begins |
| 3 | Mar 25, 2025 | High $209.27 | Candidate high |
| 4 | early April | Fall below $209.27 × 0.95 = $198.81 | $209.27 confirmed as a swing high |
| 5 | Apr 7, 2025 | Low $171.73 | Candidate low (17.9% below the high) |
| 6 | Apr 9, 2025 | High $192.11, 11.9% above $171.73 | $171.73 confirmed; up-leg begins |
| 7 | Apr 10, 2025 | Low $176.98, 7.9% below $192.11 | $192.11 confirmed; down-leg begins |
Steps 6 and 7 show the filter at its limit. The tariff-pause rally of April 9, 2025 was big enough to confirm a swing in a single day, and the next day's 7.9% drop confirmed another. A 5% filter cannot tell a violent one-day bounce from a real trend change.
The ZigZag on a real chart: IWM 2024–2026
Over the two years IWM rose from $221.44 to $284.01, but small caps took a winding path. The two settings tell different stories:
The 5% ZigZag found 30 pivots. Its legs ranged from a single session (the April 2025 whipsaw) to 70 sessions (the April–July 2025 recovery, +28.1%). Swings of 5–9% were common: in March 2026 alone it recorded five pivots as IWM chopped between $238.69 and $257.65.
The 10% ZigZag found 8 pivots and told the big story cleanly: a 29.9% fall from the November 2024 high of $244.98 to the April 2025 low of $171.73, a 58.2% rise to $271.60 in January 2026, a 12.1% pullback, a 27.9% rally to $305.18 in August 2026, and an 11.6% drop into mid-October.
Neither is "right." The setting decides what you call noise.
The repainting problem
The final line on any ZigZag chart ends at the most recent bar, not at a confirmed pivot. On the IWM chart, the last segment runs from the confirmed October 16, 2026 low of $269.88 up to the latest bar. That end point is provisional:
- If IWM keeps rising, the end point slides right and up with each new high.
- If IWM falls 5% from its latest high, that high becomes a confirmed pivot and a new down-leg begins.
So the latest leg of a ZigZag always looks like a clean swing, because it is drawn with hindsight that is still being collected. Any backtest or visual "study" that treats the ZigZag's pivots as if they were known at the time is cheating. A swing low is only confirmed after price has already rallied by the threshold, 5% in this case, above it.
How traders use the ZigZag
Mapping support and resistance. Confirmed swing highs and lows are natural reference levels. The ZigZag finds them consistently, without judgment calls.
Measuring swings. How deep are the typical pullbacks in this stock, and how long do they last? A ZigZag answers in seconds. On IWM at 5%, most down-legs were 5–10% deep.
Pattern work. Elliott wave counts, double tops and bottoms, and Fibonacci retracements all start from swing points. The ZigZag supplies them with a rule rather than by eye.
Filtering other tools. Some traders take moving-average or oscillator signals only in the direction of the latest confirmed ZigZag leg.
Pitfalls and limitations
Repainting, covered above, is the big one.
Threshold sensitivity. 5% on a utility stock and 5% on a biotech are different worlds. Many traders scale the threshold to volatility, for example a multiple of the average true range as a percentage of price.
Gaps and single bars. One extreme bar can create a pivot, as April 2025 showed. The ZigZag uses highs and lows, so intraday spikes count.
Comparison table
| Tool | What it draws | Known in real time? | Main use |
|---|---|---|---|
| ZigZag | Lines between filtered swing points | Pivots only after the fact | Studying swings |
| Parabolic SAR | A trailing stop that flips | Yes | Trailing trends |
| Moving average | A smoothed price line | Yes, with lag | Trend direction |
| Fractals / pivots | Marks on local highs and lows | After a few bars | Marking swing points |
See Parabolic SAR: how stop-and-reverse works, step by step for a real-time trailing method and Simple moving average (SMA): formula, crossovers and limits for the standard trend line.
How Finabase calculates and displays the ZigZag
Finabase draws the ZigZag on the price chart from the full bar series behind the chart (then trimmed to the range you view), using the pivot rule above with each up-leg pivot at a bar's high and each down-leg pivot at a bar's low. The study, titled ZZ (0.05), defaults to a deviation of 0.05 (5%), which you can change, for example to 0.1 for 10%. The figure on this page was drawn with that same algorithm.
ZigZag appears among the overlays in the technical gauge with its latest value but has no Buy or Sell rule, so it always counts as neutral. That is the right treatment for an indicator whose latest pivot is never confirmed.
Frequently asked questions
Does the ZigZag indicator repaint?
Yes. Its last leg extends with every new extreme and only becomes fixed when price reverses by the full threshold. Earlier, confirmed pivots do not change.
What is the best ZigZag percentage?
It depends on the market's volatility and what you want to see. 5% is a common default for stocks on daily charts; 10% shows only major swings; 2–3% suits indexes or intraday charts.
Can the ZigZag be used for trading signals?
Not directly, because pivots are confirmed only after the move that defines them. It is a descriptive tool for finding swing points, measuring retracements and building patterns.
Summary
The ZigZag redraws a chart as straight lines between swings larger than a set percentage. On IWM's two years it turned a noisy chart into 30 swings at 5% and 8 at 10%, from a 29.9% slide to a 58.2% rally. Its strength is clarity about the past. Its trap is the last leg, which is drawn with hindsight that has not finished arriving. Use it to measure and map swings, never as a signal on its own.
Sources and further reading
- Arthur A. Merrill, Filtered Waves: Basic Theory (The Analysis Press, 1977) — percentage-filtered swings
- Robert W. Colby, The Encyclopedia of Technical Market Indicators, 2nd ed. (McGraw-Hill, 2003) — the ZigZag
- Finabase chart data — IWM daily bars, 2024-10-30 to 2026-10-29, ZigZag pivots computed with Finabase’s chart algorithm