Indicators

ZigZag Indicator Explained

How the ZigZag indicator filters insignificant moves to expose swings, with the repaint caveat every bot must respect, in Setup.Cash.

By Setup.Cash TeamLast updated 2026-07-032 min read216 words

Featured image placeholder

/og/setup-cash-og.svg

ZigZag redraws price as its significant swings only: any move smaller than the threshold (percent or ATR-based) is ignored, and what remains is the skeleton — the legs a swing trader actually cares about. It is also the most infamous repainting indicator in existence, which bots must handle correctly.

How It Works

  • A new pivot is confirmed only after price reverses by the threshold from an extreme.
  • The final, in-progress leg keeps moving with price — that's the repaint.
  • Confirmed pivots (all but the last) are fixed history and safe to trade on.

How to Trade It

Build rules on confirmed pivots only: leg-length statistics for projection targets, higher-high/higher-low sequences as trend state, and equal-swing measurements for harmonic or measured-move logic. Never condition on the live leg — that's the backtest lie that never survives live trading.

Building It in Setup.Cash

Add ZigZag in the strategy builder — the length input controls its sensitivity — and use its value in any entry, exit, or filter condition. You can also combine it with other tools in the Indicators Lab or via the AI indicator generator. See Fractals for the fixed-width, non-repainting alternative. For the full category overview, see the market structure tools guide.

Structure tools define context; your entry logic supplies timing. Backtest both halves together before going live.

Not financial advice. Trading involves risk. Use backtesting and paper trading before risking real capital.

Related Posts

View all

Start here

Build your trading bot workflow with structure

Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.