1nTest · strategy backtester and trading bot builder

Trading range

A range is the market state after a trend: price stops, cannot update the last high or low the trend made, and trades sideways between them with lower volatility.

Range
Real AUDUSD H4 candles from 2026-04-10; the shapes are drawn from the output of our engine's detector.

What it means

The boundaries are structural points: the last extreme of the trend and the opposite extreme of the first pullback after it. While neither is broken for good, price moves to the right rather than up or down.

A range ends when price leaves it and stays outside; a short excursion that comes back inside is a deviation.

How 1nTest computes it

Before the range there must be a trend: at least 4 ATR(14) of movement into the extreme over the previous 40 candles.

The opposite boundary is the pullback extreme that has held for 15 candles. The range is confirmed when the trend extreme has not been updated for 30 candles and swings and slope are clearly smaller than in the trend (no more than 80% and 35% of it). A box taller than half of the trend leg is a reversal, not a pause.

The range breaks when, before an excursion is accepted as a deviation, price closes beyond the boundary more than 12 times in total, goes further than the range height, or reaches the other side.

Example backtests with this step

Related concepts

← All concepts