1nTest · strategy backtester and trading bot builder

Fractal (swing high and low)

A fractal is a candle whose high is above the highs of its neighbours (a swing high) or whose low is below their lows (a swing low): a local top or bottom of the chart.

3-candle fractals
Real EURUSD H1 candles from 2025-05-30; the shapes are drawn from the output of our engine's detector.
5-candle fractals
Real EURUSD H1 candles from 2025-05-30; the shapes are drawn from the output of our engine's detector.

What it means

Fractals are where traders place stops and where liquidity accumulates, so they serve as the levels for sweeps and as the swings that define market structure.

A fractal is only known after the candles to its right have closed — drawing it earlier is a classic source of look-ahead bias in backtests.

How 1nTest computes it

Sweep levels use 3-candle fractals: the middle candle's high is above both neighbours' highs (low below both lows).

The event is timestamped to the close of the right-hand candle, not to the fractal candle itself, so the backtest never uses a fractal before it exists.

BOS and CHoCH levels use the same 3-candle fractals.

Example backtests with this step

Related concepts

← All concepts