Zig Zag indicator

Zig Zag
Indicator

Support and resistanceOn the price chartFree on ChartLabs

Zig Zag joins swing highs and lows that are at least 5% apart and hides the smaller moves in between. It shows the main swings of the market at a glance.

A classic swing tool. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIZig Zagchartlabs.co/charts
Atlas reads it

Last confirmed swing: a high at 72,552. Price is -10.8% from it.

Deviation 5% · depth 10 · 5 points

Atlas reads it

Last confirmed swing: a high at 72,552. Price is -10.8% from it.

Deviation 5% · depth 10 · 5 points

Illustration on simulated data.

Zig Zag indicatorWhat is the Zig Zag indicator?

Zig Zag draws straight blue lines on the price chart, from swing high to swing low and back. Each turning point carries a label with its price, the change from the previous point and the volume traded during the leg.

A bar becomes a candidate swing when no bar within 5 bars on either side went further. A new turning point is only accepted when it is at least 5% away from the last one; smaller moves are folded into the current leg. If a more extreme candidate of the same kind appears, it replaces the last point.

The final leg runs from the last turning point to the newest bar and moves with every tick. The confirmed points before it are fixed once the line has passed them, but each is only known about 5 bars after it happened.

A map, not a signal

Zig Zag is drawn with hindsight. It is useful for measuring swings and reading structure, not for timing entries on the live bar.

Choosing the deviation

A smaller deviation keeps more swings, a larger one only the big ones. 5% suits many daily and hourly crypto charts; quieter markets often need less.

Zig Zag signalsFour patterns to know.

72,552Swing high
1Bearish lean

Swing high

The line turns down from a peak at least 5% above the last low. The market has made a meaningful top, for now.

57,717Swing low
2Bullish lean

Swing low

The line turns up from a trough at least 5% below the last high.

72,552-2.8% dip: under 5%, no new point
3Inconclusive

A small move ignored

Price pulls back, but by less than 5%, so no new point is drawn. The leg is still in force.

64,51464,408This leg moves with every bar
4Inconclusive

The live leg

The last line runs to the newest bar. Until a new swing is confirmed, it moves with price.

Zig Zag formulaHow it is calculated.

Swing high at bar p:highp≥highs of the next 5 bars,highp>highs of the previous 5 barsNew point only if|price−last point|last point×100≥5
STEP 1

Find candidate swings

With depth 10, a bar is a swing high when none of the 5 bars after it is higher and all 5 before it are lower. Swing lows mirror this.

STEP 2

Filter by deviation

A swing of the other kind becomes a new point only if it is at least 5% from the last point. A more extreme swing of the same kind replaces the last point.

STEP 3

Extend to the last bar

A final leg joins the last point to the newest bar's high or low. It is redrawn as price moves.

Zig Zag settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Price deviation for reversals (%)50.00001 to 100How far price must move to start a new leg. Smaller values keep more swings.
Pivot legs102 to 500Depth of the swing test: half of it (at least 2) is the number of bars checked on each side.
Extend to last barOnOn or offDraws the live leg from the last point to the newest bar.
LabelsPrice, change and volume onEach on or offWhat each turning point shows. Change can be absolute or in percent.
LineBlue #2962FF, 2 pxFixedThe legs are always blue and 2 px. High labels are green, low labels red.
Setting
Price deviation for reversals (%)
Default
5
Range
0.00001 to 100
What it changes
How far price must move to start a new leg. Smaller values keep more swings.
Setting
Pivot legs
Default
10
Range
2 to 500
What it changes
Depth of the swing test: half of it (at least 2) is the number of bars checked on each side.
Setting
Extend to last bar
Default
On
Range
On or off
What it changes
Draws the live leg from the last point to the newest bar.
Setting
Labels
Default
Price, change and volume on
Range
Each on or off
What it changes
What each turning point shows. Change can be absolute or in percent.
Setting
Line
Default
Blue #2962FF, 2 px
Range
Fixed
What it changes
The legs are always blue and 2 px. High labels are green, low labels red.
54 swing points in view
72,55257,71764,51464,40870,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

Zig Zag strategiesUse it in 3 setups.

57,71764,514Leg +11.8% over 49 bars

Measure the last swing

Takethe lastswing lowtoswing highthensize targets from it

Many traders use the size of the last leg as a reference for the next, or as the anchor for Fibonacci levels.

57,717Swing lowKnown 5 bars later

Act only on confirmed points

Wait5 barsafter a swingbeforetreating it as fixed

A swing is only known once 5 later bars have failed to go further. Waiting avoids reading a point that may still move.

72,552-2.8% dip: under 5%, no new point

Match the deviation to the swings you trade

SetDeviationso small pullbacksstayinside the leg

Here a 2.8% dip stays inside the leg at 5%. A lower setting would split it into its own swing.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

Zig Zag mistakesCommon mistakes.

64,51464,408This leg moves with every bar

Treating the last leg as fixed

The final line moves with every bar and can be redrawn completely when a new swing appears. Only the earlier points are settled.

57,717Swing lowKnown 5 bars later

Backtesting with hindsight

Each point is known only about 5 bars after the turn. A test that trades at the exact point uses information nobody had at the time.

72,552-2.8% dip: under 5%, no new point

Expecting it to show every pullback

Moves under the deviation are hidden on purpose. A quiet chart can show a single long leg with plenty of swings inside it.

Zig Zag combinationsPair it with these.

Zig Zag FAQQuestions traders ask.

What are the default Zig Zag settings?

Price deviation 5% and pivot legs 10, with the last leg extended and price, change and volume labels on, as on TradingView.

Does Zig Zag repaint?

The last leg does: it follows price until a new swing is confirmed. Earlier points never move once the line has passed them, but each is only known a few bars after it formed.

Can I trade Zig Zag signals?

It is better suited to measuring swings and reading structure. Because points are confirmed late, it does not give timely entries on its own.

What does the deviation setting do?

It is the minimum move, in percent, between a swing high and a swing low. Smaller values show more swings.

What does pivot legs mean?

It sets how many bars around a candidate swing are checked. With 10, five bars on each side must not go further.

What do the labels show?

The price of the turning point, the change from the previous point and the volume traded during the leg that ended there.

Why does Zig Zag skip some obvious swings?

Either the move was smaller than the deviation, or a more extreme swing of the same kind came later and replaced it.

Does Zig Zag work on crypto?

Yes. Crypto moves a lot, so the 5% default keeps the main swings without too much noise on hourly and daily charts.

Is Zig Zag leading or lagging?

Lagging. It needs bars after a turn to confirm it.

Who created Zig Zag?

It has no single inventor. It became widely used through charting software as a way to filter out small price moves.

Related indicatorsMore support and resistance tools.

All support and resistance indicators

Try Zig Zag on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
Zig Zag (5, 10)
64,51464,408