← Back to Blog Strategy

ZigZag Pattern Trading on Gold —
How to Avoid False Signals on M5

Prabir Sarkar · December 20, 2025 · 11 min read
ZigZag pattern structure on XAUUSD chart showing swing highs and lows

The ZigZag indicator has a reputation problem. Ask most traders about it and you'll hear one of two reactions: either "it's useless because it repaints" or "it's the only thing I need for swing structure." Both camps are wrong — but for interesting reasons.

The ZigZag is one of the most misunderstood indicators in MetaTrader. People expect it to give them entry signals like an arrow indicator. That's not what it's for. ZigZag is a structural tool — it cleans up price action by connecting significant swing highs and swing lows, filtering out the noise between them.

When you understand what ZigZag actually does well versus what people expect it to do, it becomes genuinely useful. Especially on gold, where the price action is noisy enough that raw candle charts can be hard to read during volatile sessions.

The Repainting Problem — And Why It's Not as Bad as You Think

Let me address the elephant in the room right away. Yes, the standard MetaTrader ZigZag indicator repaints. The last segment — the one currently forming — will move as new price data comes in. That's by design, not a bug.

Here's why: the ZigZag draws a line from the last confirmed swing point to the current extreme. Until a new swing point is confirmed (by price moving a minimum distance in the opposite direction), the endpoint of the current line updates with each tick. Once a swing point is confirmed, it stays fixed forever.

The issue is when traders treat that moving endpoint as a signal. "ZigZag turned up, time to buy!" No — ZigZag hasn't turned up. It's just following the current price. It might reverse on the next candle.

What's actually reliable about ZigZag:

My Approach: ZigZag for Structure, Not Signals

I don't use ZigZag to generate buy/sell signals. I use it to understand where the market's structural pivots are. Think of it as a clean-up tool that strips away the noise and shows you the skeleton of price movement.

On a raw M5 gold chart during London session, you might see 30-40 candles of choppy price action. It's hard to identify the key swing points by eye, especially when you're stressed about an open position. ZigZag draws the structure for you — here's swing high #1, here's swing low #1, here's swing high #2.

Once I can see the structure clearly, I combine it with other analysis:

Setting ZigZag Parameters for Gold

The default ZigZag settings in MetaTrader (Depth: 12, Deviation: 5, Backstep: 3) are designed for daily charts on forex pairs. They're too sensitive for gold on lower timeframes — you'll get too many minor swings that don't represent meaningful structure.

For gold M5-M15 scalping, I've found these parameters work better:

These settings produce cleaner swings that represent actual structural shifts rather than intra-session noise. Fewer lines on the chart means each swing point carries more significance.

For H1 or H4 analysis, you can keep parameters closer to default since higher timeframe candles already filter out micro-noise.

The Three ZigZag Patterns I Actually Trade

Pattern 1: Higher Low After Sweep

This is my highest-conviction ZigZag setup. Here's the sequence:

  1. ZigZag shows a clear uptrend — higher highs (HH) and higher lows (HL).
  2. Price drops below the last higher low. Retail traders see "broken structure" and sell.
  3. Price quickly reclaims the level and forms a new swing low that's marginally below or at the previous HL.
  4. This is a liquidity sweep — stops were grabbed below the obvious level, and now the real move begins.

I enter long when the ZigZag confirms the new swing low (by beginning a new upward leg) and my EMA ribbon supports the bullish direction. The stop goes below the sweep low — because if price comes back through that level again, the structure genuinely is broken.

Pattern 2: Compression into Expansion

When ZigZag swings start getting smaller and smaller — like a coiling spring — it means volatility is contracting. On gold, this typically happens during the late Asian session or mid-day lull.

I don't trade the compression. I wait for the first ZigZag swing that's significantly larger than the compressed swings — the expansion. That first large swing after compression usually marks the beginning of a new trending move.

The key is waiting for confirmation. The first large candle after compression might be a fake-out. I wait until ZigZag actually confirms a new swing point in the expansion direction before entering.

Pattern 3: Measured Move Targets

ZigZag legs often respect proportional relationships. If the first leg of a move covers 200 pips, the third leg (after a pullback) often covers a similar distance — give or take 20%.

I use this for target setting rather than entry. When I'm already in a trade and wondering where to place my TP2 or TP3, I measure the previous ZigZag leg and project a similar distance from the pullback point. It's not perfect, but it's a better target than an arbitrary round number.

ZigZag as a Trend Filter

Beyond pattern trading, I use ZigZag as a running trend filter. The logic is dead simple:

This is essentially the same trend definition that every trading textbook teaches, but ZigZag automates the identification. On a busy M5 chart with 200+ candles visible, manually identifying all the swing points is time-consuming and subjective. ZigZag does it algorithmically with consistent rules.

Why I Built ZigZag Scalper

After using various ZigZag implementations for a couple of years, I got frustrated with the limitations:

So I built ZigZag Scalper to solve all three problems. It identifies ZigZag swing structure, filters for the high-probability patterns I described above, cross-references with momentum indicators, and generates non-repainting signals only when multiple conditions align.

The non-repainting part was critical to me. The ZigZag structure itself can update its latest segment — that's inherent to how ZigZag works. But the signals — the actual buy/sell arrows — are calculated on confirmed swing points only. Once a signal appears, it never disappears or moves. Period.

Common ZigZag Mistakes

Trading every swing point. Not every ZigZag swing is a trading opportunity. Some swings are just minor pullbacks within a larger move. I only trade swings that align with my higher timeframe bias and occur at significant levels.

Using default parameters on low timeframes. As I mentioned earlier, default ZigZag settings generate too many swings on M5-M15. Either increase the parameters or use a custom implementation that includes volatility-adaptive settings.

Expecting ZigZag to predict the future. ZigZag describes what has happened. The current segment moves with price — it's not predicting where price will go. Use confirmed historical swings for analysis and other tools for timing your entries.

Ignoring the context. A ZigZag pattern on M5 means one thing during London session and something completely different during Asian session. The same pattern during high volatility is more significant than during compression. Always pair ZigZag structure with session awareness and volatility context.

My Practical Workflow

Here's how ZigZag fits into my overall analysis process:

  1. H4 direction — EMA ribbon for trend bias (bullish/bearish/neutral).
  2. H1 structure — ZigZag on H1 to identify the current swing structure and key levels.
  3. M15 timing — Check if momentum is building in my direction.
  4. M5 entry — ZigZag confirms a swing pattern I recognize → combine with ribbon pullback → enter.

Notice that ZigZag contributes at two levels: H1 for big-picture structure and M5 for entry-level pattern recognition. I don't use it on every timeframe — that would give me conflicting signals and analysis paralysis.

If you've been dismissing ZigZag because "it repaints" or because you tried it once and got confused, give it another chance with the right expectations. It's not an entry signal generator. It's a structural clarity tool. And when you combine structural clarity with momentum confirmation and proper session timing, you end up with trades that have genuine logic behind them — not just a green arrow.

Disclaimer: This article describes my personal approach to using ZigZag patterns and is not financial advice. Trading involves significant risk. Past performance does not guarantee future results.

ZigZag Structure + Smart Signals

ZigZag Scalper combines structural swing analysis with momentum filters to generate non-repainting signals on confirmed patterns.