ZigZag swings
A line that connects swing highs and swing lows, ignoring moves smaller than a set percent.
What it shows
The ZigZag filters out small moves. It draws a straight line from a low to the next high only when the move is at least 5% (or another set size), and the same on the way down.
Because the last leg changes until the next swing is confirmed, the final segment can move. It helps see the structure of past swings.
How we find it
The same code that draws it on your chart follows these steps, with the same result every time.
- Start at the first bar.
- Track the highest high and lowest low.
- When price reverses by at least 5% from the extreme, fix that extreme as a swing point.
- Connect the swing points.
Starting values: Threshold 5%. These are proposed and will be tuned on real price data before launch.
How to read it
- The gold line connects the swings.
- Small wiggles inside are ignored.
- The last leg is unconfirmed.
Status labels you may see
| Label | What it means |
|---|---|
| Last swing up | Latest confirmed swing is a low. |
| Last swing down | Latest confirmed swing is a high. |
| Few swings | Fewer than 3 swings in the period. |
What cancels it
The last leg can change until it reverses by the threshold.
What traders check next
- Size of swings.
- Number of swings.
- Last confirmed swing.
Limits
- Repaints the last leg.
- Only for the past.
- Threshold changes everything.
Try it in forecastviz
- Open any ticker and choose Relative strength, cycles and structure → ZigZag swings in the left menu.
- Switch between 6M, 1Y, 3Y to see how the picture changes.
- Compare with Higher highs and higher lows and Pivot trendlines on the same chart.
Questions
Can I trade off the last line?
It can still change, so we only use confirmed swings.
Why 5%?
A common starting point.
Related trends
Further reading
- O'Neil, How to Make Money in Stocks
- Levy, The Relative Strength Concept of Common Stock Forecasting
- Pring, Technical Analysis Explained
- Frost and Prechter, Elliott Wave Principle
- Hank Pruden, The Three Skills of Top Trading
- Hirsch, Stock Trader's Almanac
Educational only. Not financial advice, and not a price forecast. Charts are drawn by code from past price data, which may be delayed.