The short answer
The ZigZag indicator draws a line from each swing high to the next swing low, ignoring the small moves in between. It is very useful for seeing structure on a gold chart: higher highs and higher lows, lower highs and lower lows, and the size of each swing.
It is not an entry signal, because the last line repaints. Until a swing is confirmed, the end of the line keeps moving. On old charts this is invisible, so ZigZag always looks perfect on history.
How ZigZag works
ZigZag waits for price to reverse by a minimum amount before it turns the line:
- Price rises. ZigZag follows it up, drawing a line to each new high.
- Price starts falling. If the fall is smaller than the setting, ZigZag ignores it.
- Once the fall reaches the setting (for example 1%), ZigZag locks in the last high as a swing high and starts a new line down.
- The same happens in reverse at swing lows.
A bigger setting ignores more noise and shows fewer, larger swings. A smaller setting shows more swings but more noise.
The settings
MT5’s ZigZag
The ZigZag that comes with MT5 has three settings. The defaults are Depth 12, Deviation 5, Backstep 3.
| Setting | Default | What it does | Bigger number means |
|---|---|---|---|
| Depth | 12 | How many bars to look back when finding a new high or low | Fewer, bigger swings |
| Deviation | 5 | How far price must move (in points) before the line can turn | Fewer swings |
| Backstep | 3 | Minimum bars between two swing points | Fewer swings close together |
Because Deviation is in points, the same setting means very different things on different symbols and at different gold prices. Depth often matters more on gold.
Percentage ZigZag
Many charting platforms, including TradingView’s built-in Zig Zag, let you set the reversal as a percentage of price. This is easier to compare over time: 1% means “turn after a 1% move”, whether gold is at $2,400 or $4,000. Check the default in your platform’s settings panel, as it varies.
How big are gold’s swings? Real data
We ran a percentage ZigZag on hourly COMEX gold closes from 11 June 2024 to 12 November 2026 (13,906 bars) at four settings:
| ZigZag setting | Swings found | Median swing | Average swing | Median length | Times the live end moved per swing |
|---|---|---|---|---|---|
| 0.5% | 1,193 | $42.4 | $57.2 | 8 hours | 3.5 |
| 1% | 465 | $85.4 | $105.1 | 20 hours | 6.1 |
| 2% | 161 | $154.2 | $200.0 | 45 hours | 11.2 |
| 3% | 79 | $239.1 | $305.0 | 111 hours | 17.6 |
Source: COMEX gold futures (GC=F) hourly bars via Yahoo Finance, from our site data. A “swing” is one confirmed line from a swing high to a swing low or back. Lengths are in hourly bars.
What this tells you:
- A 0.5% ZigZag on the hourly chart shows intraday swings of around $40 to $60. Useful for day traders marking the day’s structure.
- A 1% ZigZag shows swings of about $85 to $105 lasting about a day. Useful for marking structure on the 1-hour and 4-hour charts.
- 2% and 3% show the big swing-trading moves, each lasting days.
Gold’s swings got bigger as the price and volatility rose, so the same percentage gives bigger dollar swings now than in 2024.
The repaint problem, in plain words
Look at the last column of the table. With a 1% setting, the end of the live line moved about six times before each swing was locked in. With 3%, it moved more than 17 times.
Here is what that looks like in real time:
- Gold rises to $3,920. ZigZag draws a line up to $3,920. It looks like a swing high.
- Gold rises again to $3,935. The line moves to $3,935. The “swing high” at $3,920 is gone.
- Gold rises to $3,948. The line moves again.
- Gold falls 1% from $3,948, to about $3,909. Only now is $3,948 locked in as the swing high.
So in real time you only know a high is final after price has already fallen about $39 from it (1% of $3,948). Any rule like “sell when ZigZag prints a high” is really “sell $39 after the top”, at best. On an old chart you only see the final line, so it looks like ZigZag called the top exactly.
Never judge a ZigZag strategy on an old chart. The finished lines are drawn with hindsight. To test it honestly, use bar replay and step forward one candle at a time, or code the rule so it only acts once a swing is confirmed.
What ZigZag is good for
1. Marking market structure
Turn ZigZag on, and higher highs, higher lows, lower highs and lower lows are easy to see. This is the most useful job ZigZag does. Our guide to market structure on XAUUSD explains what to do with that structure.
2. Finding support and resistance
Confirmed ZigZag swing points are natural places to draw levels. Where several old swing highs or lows line up, you have a level worth watching. See how to find support and resistance on gold.
3. Drawing Fibonacci
Fibonacci retracements need a clear swing high and swing low. ZigZag gives you both, without arguing about which wick to use. Our Fibonacci on XAUUSD guide shows how.
4. Counting Elliott Waves
ZigZag makes waves easier to see. But the count depends on the setting. Pick one setting for one timeframe and keep it. See Elliott Wave on gold.
5. Measuring normal swing size
The table above is a good example. If a normal 1% swing on hourly gold is about $85, a target of $300 from a 1-hour setup is asking for a lot more than normal.
How to set it up on gold
- Choose your timeframe first. 1-hour for day trading structure, 4-hour or daily for swing trading.
- Choose a setting that matches your swings. On hourly gold, start with 1% (or MT5’s default Depth 12 and adjust).
- Keep the setting fixed. Changing it to make the chart “look right” is curve-fitting.
- Only use confirmed swings. Treat the last, live line as a guess.
- Combine it with price. A confirmed higher low plus a break of the last swing high is a structure signal. The ZigZag just helps you see it.
Common mistakes
- Trading the live leg. The end of the last line is not a confirmed swing.
- Testing on old charts. History shows only finished lines.
- Using a tiny setting. At very small settings ZigZag draws a line on almost every wiggle and tells you nothing.
- Changing settings until the chart looks good. This makes your structure depend on the setting, not on price.
- Forgetting that MT5 Deviation is in points. It does not scale with the gold price.
Key takeaways
- ZigZag joins swing highs and lows and is excellent for seeing structure.
- The last leg repaints. With a 1% setting on hourly gold, it moved about six times per swing before confirming.
- On hourly gold, median swings were about $42 at 0.5%, $85 at 1%, $154 at 2% and $239 at 3%.
- Use confirmed swings for structure, levels, Fibonacci and Elliott Wave, not as entry signals.
Data and method
- COMEX gold futures (GC=F) hourly closes via Yahoo Finance, as stored in the site data file gold-h1.json (11 June 2024 to 12 November 2026).
- Close-based percentage ZigZag: a swing is confirmed when the close reverses by the set percentage from the running extreme. “Times the live end moved” counts each new extreme before confirmation, averaged per confirmed swing.
- MT5’s ZigZag uses highs and lows and the Depth/Deviation/Backstep method, so its swings will differ from this percentage version.
Educational content only, not financial advice. Trading gold with leverage carries a high risk of loss.
Frequently asked questions
Does the ZigZag indicator repaint?
Yes, the last leg does. ZigZag cannot know a swing high is final until price has fallen far enough from it. Until then, the end of the last line keeps moving to each new high. In our hourly gold test with a 1% setting, the end of the live line moved about six times on average before each swing was confirmed. Older, confirmed lines do not change.
What are the best ZigZag settings for gold?
It depends on the swings you want to see. On hourly gold from June 2024 to November 2026, a 0.5% ZigZag found a median swing of about $42, 1% about $85, 2% about $154 and 3% about $239. Pick the setting whose swings match the moves you actually trade.
What do the ZigZag settings Depth, Deviation and Backstep mean in MT5?
The MT5 ZigZag defaults are Depth 12, Deviation 5 and Backstep 3. Depth is how many bars must pass before a new swing can be drawn. Deviation is how far price must move, in points, before the line turns. Backstep is the minimum number of bars between two swing points. Bigger numbers mean fewer, larger swings.
Can I trade with the ZigZag indicator?
Not as a signal on its own. Because the last leg repaints, any rule like ‘buy when ZigZag prints a low’ only works on old charts. Traders use it to mark structure, measure swings for Fibonacci and Elliott Wave, and see higher highs and lower lows at a glance.
Is ZigZag good for Elliott Wave on gold?
It helps you see the swings, which is the first step in counting waves. But the wave count depends on the setting: a 1% ZigZag and a 3% ZigZag will show very different waves on the same chart. Choose a setting first and keep it, or your count will change every time you adjust it.
Sources and further reading
- CME Group — Gold futures overview — Contract specifications and trading hours for COMEX gold
- CFTC — Commitments of Traders — Weekly futures positioning, including gold
- Investor.gov — Stop order — How stop orders work, and their limits in fast markets
External sites are independent of XAUUSD Global. Check dates and data yourself.
Comments
No comments yet.
More in Strategies & technical analysis
- How to Analyse the Gold Weekly Chart: Structure, Key Levels and a Sunday Plan for XAUUSD
- How to Trade Gold in a Downtrend: Sell the Rally, Stops Above Structure, No Bottom Picking
- Fair Value Gap vs Order Block: The Difference, Which Comes First, and How Gold Traders Use Both
- Money Flow Index (MFI) on Gold: How It Works, MFI vs RSI, and the Volume Problem on XAUUSD
- Best MACD Settings for Gold (XAUUSD): 12/26/9 vs Faster and Slower, by Timeframe
Latest on the blog
- The Philly Fed Survey for Gold Traders: Diffusion Index, Prices Paid and the Thursday Reaction
- NR7 Breakout on Gold: How the Narrowest Day of the Last Seven Behaves
- What Is the Fed Beige Book? A Gold Trader's Guide to District Reports, Price Clues and Market Reaction
- Trading Psychology Quotes That Actually Help: 12 Lines From Famous Traders and What They Mean for Gold