Swing Highs and Lows: The Definition Everything Else Depends On

9 min readQuantParadox research

Almost every structural technique rests on swing points, and almost nobody states how they are identified. That omission is where a surprising amount of accidental look-ahead enters otherwise careful tests.

The short answer

A swing high is a bar whose high exceeds the highs of a stated number of bars on either side, and because that bar count is a parameter and the swing is only confirmed after the later bars have formed, every market structure technique built on swing points inherits both a tuning choice and a delay.

What is a swing high or swing low?

A swing high is a local peak: a bar whose high is greater than the highs of a specified number of bars before and after it. A swing low is the mirror image. The specified number is the only input, and it decides everything about which points qualify.

The concept underlies far more than it appears to. Market structure breaks are defined relative to prior swings. Trendlines connect them. Fibonacci retracements anchor to them. Stops are placed beyond them. Order blocks and liquidity pools are located by reference to them. A change in the swing definition propagates into every one of those techniques.

The common fractal definition uses two or three bars either side, which is a convention rather than a derived value. Two bars either side on a five-minute chart identifies a great many swings, most of them minor; ten bars either side identifies few, all significant.

There is no correct answer, which is precisely why the choice has to be stated. A result reported without the swing definition cannot be reproduced.

When is a swing point actually confirmed?

A swing high requiring three bars on either side is not confirmed until three bars after it forms, which means any level anchored to it did not exist for those three bars — and treating it as available earlier is look-ahead bias.

This is the most common accidental leak in structure-based testing, and it is invisible in the output. The chart shows the swing marked at its own bar, because that is where it occurred, and a test that reads the marked series bar by bar picks it up at that timestamp. Nothing looks wrong; the strategy is simply using a fact that had not yet been established.

The effect is not small for fast strategies. Three bars of foreknowledge about where a local extreme formed is a substantial advantage on a lower timeframe, and it flatters exactly the entries that fire soon after a swing — which is most structural entries.

The correct handling is to stamp each swing with its confirmation time rather than its occurrence time, and to make it available only from that point. Any tool that cannot express that distinction cannot test structural strategies honestly, whatever else it does well.

How does the swing definition change your results?

Tightening or loosening the bar count changes the number of swings by an order of magnitude, and every downstream technique inherits that change, so the swing parameter is frequently the largest single driver of a structural strategy's result.

A tight definition produces many swings, which means market structure appears to break often, trendlines are frequently redrawn, and stops sit close by. A loose definition produces few swings, so structure changes rarely, lines are stable and stops are distant. These are not variations of one strategy — they are materially different trading systems.

This creates an under-recognised overfitting surface. Someone tuning entry and exit parameters carefully while leaving the swing definition unexamined may find that adjusting the bar count changes results more than anything they were tuning, which means it belongs in the parameter count and the out-of-sample discipline like everything else.

Volatility normalisation is worth considering as an alternative. Defining a swing by a minimum retracement expressed as a multiple of recent average range, rather than by a fixed bar count, makes the definition adapt across instruments and regimes instead of meaning different things in each.

How should stops relate to swing points?

Placing a stop just beyond a recent swing is standard practice and it concentrates stops at a level that is visible to everybody, which is the mechanism the sweep and stop-hunt vocabulary describes.

The practical consequence for testing is severe and specific. A stop a few points beyond a swing extreme is close to the entry, which means the entry candle frequently also touches the stop. What the tester assumes about the order of events inside that candle can invert the result, and this applies to a large share of structural strategies because they nearly all place stops this way.

Adding a normalised buffer beyond the swing is the usual response, and it is a parameter with a genuine trade-off: a wider buffer avoids marginal sweeps and increases the loss when the stop is reached. Testing several buffer values is legitimate research provided the number tried is recorded.

The alternative worth comparing against is a volatility-based stop that ignores structure entirely. If a structure-anchored stop performs no better than a plain multiple of average range, the structural placement is not earning its complexity, and that comparison is cheap to run.

How does QuantParadox identify swings?

QuantParadox reads swings and structure as of the bar being decided, never with hindsight, which directly addresses the confirmation-delay problem that quietly contaminates most structural testing.

That is the Chart Reader module's defining constraint. It reads the chart the way a trader does — structure, swings, ranges, compression, the shape of the candles — while restricting every reading to information available at that bar. A swing requiring later bars to confirm becomes available when those bars exist and not before.

The intrabar question is handled by the minute-resolution archive. Where a stop sits just beyond a swing and the entry candle reaches both levels, the finer data decides which came first, and where no finer data exists the loss is booked rather than the win.

Both properties matter more for this topic than almost any other, because swing definition sits underneath market structure, trendlines, retracement levels and stop placement alike. A leak here propagates into every strategy built on top of it, which is why it is worth checking in whatever tool you use rather than assuming.

Questions people actually ask

How many bars define a swing high?

Common conventions use two or three bars either side, but the number is a parameter rather than a standard, and it changes how many swings exist by a large factor. Fix it in advance, state it alongside any result, and include it in the count of parameters when assessing how much searching stands behind a finding. An alternative is to define swings by a minimum retracement normalised to recent volatility.

What is the difference between a swing high and a market structure break?

A swing high is a single identified point, while a market structure break is an event defined relative to prior swing points — typically price closing beyond the most recent one in the opposite direction to the prevailing sequence. The break therefore inherits every property of the swing definition, including its confirmation delay, which is why a structure-break strategy cannot be tested honestly without stating how swings were identified.

Do swing points work the same on all timeframes?

The definition applies identically on any timeframe, but what it identifies differs in character. Lower timeframes produce far more swings, each carrying less structural significance and a larger share falling inside the range where spread and noise dominate. Measuring per timeframe rather than pooling avoids averaging two different populations into a figure that describes neither.

The only backtest that settles it is yours.

Build a strategy from a sentence, paste your own Python, or import your live trade history and have it graded. Five full backtests free, no card, and we'll tell you plainly when the result is indistinguishable from luck.

We publish research and tooling, not trading advice, and we make no claim about future returns. Everything above describes how to test an idea — not a reason to trade one.