ZigZag¶
Indicators · Levels
ZigZag pivots filtered by percent reversal threshold.
ZigZag filters out the noise and draws only the significant swings — straight lines connecting the major highs and lows, ignoring any move smaller than a threshold you set. It strips a chart down to its skeleton: the big zig-zag of meaningful turning points, with all the small wiggles removed. It's invaluable for seeing structure clearly, identifying swing points for pattern recognition, and as a foundation for Elliott Wave or harmonic analysis.
How it works¶
The block tracks price and only registers a new pivot when price reverses by at least the Threshold (%) (default 2.0) from the last pivot. Moves smaller than that are ignored, so the ZigZag line changes direction only at confirmed significant pivots. It also emits Pivot ↑ / Pivot ↓ signals on the bars where a high or low pivot confirms. One essential caveat: ZigZag repaints — the most recent leg isn't confirmed until price has moved the threshold amount, so the last segment can redraw. It never looks ahead, but the current leg is provisional until confirmed.
When to use it¶
Use ZigZag to see and measure structure. It's excellent for visually identifying the swing highs and lows that define a trend, for measuring the size and rhythm of legs, and as the backbone of pattern-based methods (Elliott Wave, harmonics, ABCD). The Threshold is the key dial — raise it to keep only major swings, lower it to capture minor ones. The non-negotiable rule: because the last leg repaints, never build an entry trigger off the current ZigZag pivot in a backtest, or you'll fool yourself with hindsight. Use confirmed (older) pivots for analysis, and a non-repainting tool like Swings for actual signals.
Example¶
Read structure at a glance: wire bars into ZigZag with a 2% threshold to skeletonise the chart into major swings, and use the confirmed pivot points to define your higher-high/lower-low structure. For trading signals, pair the structural read with non-repainting Swings and Market Structure. Study it in the Tester.
Tips & gotchas¶
- It repaints — the current leg is provisional. Never trigger entries off the latest pivot in a backtest; it's hindsight.
- For honest signals, use Swings (confirmed, non-repainting); ZigZag is for analysis.
- Threshold sets the scale — high = major swings only, low = minor ones too.
- The backbone of pattern methods — Elliott, harmonics, ABCD.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| ZigZag | series |
Line | ZigZag line — changes only at confirmed pivots |
| Pivot ↑ | signal |
Signal arrows | Confirmed high pivot bar |
| Pivot ↓ | signal |
Signal arrows | Confirmed low pivot bar |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| Threshold (%) | number · 0.1–50.0 | 2.0 |
Minimum percent reversal to confirm a pivot |
| Line color | colour | #ffb300 |
Reference auto-generated from the block catalog · category Indicators.