ZigZag Indicator: The Setting Is the Analysis
The ZigZag indicator draws straight lines between significant highs and lows, ignoring moves smaller than a chosen threshold. It is a measuring tool rather than a signal, because the most recent leg is always provisional until price moves far enough to confirm the pivot.
How it works
The ZigZag connects significant turning points with straight lines and ignores everything smaller than a threshold you set. What it removes is the point of it.
A pivot is not confirmed when it prints. It is confirmed when price has moved back from it by the threshold amount. Until then the running extreme keeps updating and the line keeps moving.
So the final leg redraws. This is not a flaw to be fixed — it is the definition working correctly, and it is why a zigzag on a completed chart looks like it caught every turn.
The threshold decides everything
On this site’s shared 576-bar history a 0.5% threshold produces 175 pivots — one every 3 bars, with a median leg of 2 bars and 1.21 price units.
A 3% threshold on the same 576 bars produces 15. One every 38 bars. Same data, same tool, eleven times fewer swings — and every conclusion about structure changes with it.
The intermediate settings fill the gap smoothly. 1% gives 85 pivots and a 5-bar median leg; 2% gives 32 and 13 bars. There is no natural setting hiding in the data, which means the choice is yours and it should be made deliberately and written down.
This is why it is not a signal generator. A tool whose output depends entirely on a parameter you chose, and whose most recent value is provisional, cannot tell you what to do next. It can tell you what has already happened, precisely and reproducibly, which is a genuinely useful thing.
In practice
It sees price only. A swing made on heavy volume and one made on nothing are the same line, which is why it belongs alongside a participation check rather than instead of one.
A percentage threshold does not transfer across timeframes. 1% is a routine move on a daily chart and a large one on a five-minute chart, so the setting has to be chosen per timeframe.
A gap can confirm a pivot instantly, and the leg drawn across it represents a distance nothing traded through.
Its one direct trading use is a confirmed pivot as a stop reference. That works because the pivot is already settled — you are using the part of the tool that does not move.
At the 0.5% setting, trading every pivot means 175 round trips on 576 bars. Each one costs 2% of a median bar’s range on this history, which is a large bill for a tool that confirms two bars late.
The real job is upstream of trading. It is what turns a vague argument about whether the trend is intact into a reproducible statement: at this threshold, on this timeframe, the last three swing highs were these prices. That is worth having precisely because it stops you moving the goalposts once a position is open.
There is a second, quieter use worth naming: measuring your own market. Run the tool at two or three thresholds and record how many swings each produces, how long the median leg runs in bars, and how far it travels in price. Those three numbers describe the instrument’s rhythm better than any indicator reading, and they tell you whether a method expecting weekly swings has any chance on the timeframe you are watching.
They also change over time, which is the part that makes it worth repeating. A market that produced a 5-bar median leg last quarter and a 12-bar one this quarter has slowed down, and every stop distance and target built on the old rhythm is now mis-sized. Measuring it takes minutes and it is the kind of check almost nobody runs.
What the ZigZag indicator is not
It is not predictive. Every line it draws describes the past.
It is not repainting in the dishonest sense. The provisional leg is the definition working.
It is not a strategy. A backtest that buys its lows is reading the future.
And it is not objective. The threshold is a choice with large consequences.
When it fails
In a range it oscillates between the same two boundaries and produces a swing count that looks like structure while describing a market going nowhere.
The second failure is the backtest that trades it. Buying every zigzag low is buying with information that did not exist at the time, and the equity curve produced is fiction.
A third is a threshold chosen after looking. Tuning it until the swings match the story you already believe is curve fitting with extra steps.
A fourth is reading the last leg. It is the one part of the output that is not yet real.
And a fifth is using it as Elliott Wave confirmation. Two subjective tools agreeing is not corroboration; it is the same choice made twice.
The original data
On this site’s shared 576-bar history: a 0.5% threshold gives 175 pivots, one every 3 bars, median leg 2
bars and 1.212 price units. 1% gives 85 pivots, one every 7 bars, median leg 5 bars. 2% gives 32, one every
18 bars, median 13 bars. 3% gives 15, one every 38 bars, median 26 bars. The figures are in
research/series-measurements.json, produced by site/measure_series.py.
The eleven-fold spread in pivot count across four ordinary settings is the finding. It means two traders looking at the same chart with the same tool can honestly disagree about how many swings are in it, and neither is wrong. Pick one threshold per timeframe, write it in your plan, and do not change it because a position needs it to change — the value of the tool is entirely in the fact that the definition is fixed before you look.
Related
Swing high and low is what the tool is filtering for. Market structure is what the filtered swings are used to describe. And Elliott Wave is the framework it most often gets attached to.
The zigzag is the tool I use to settle arguments with myself about what counts as a swing. It stops me redrawing structure to suit the position I already have. What it never does is tell me anything is about to happen, and the moment I catch myself looking at the last leg for a signal, I close it.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money.