Keenbase Trading » Identify a Ranging Market

How to Identify a Ranging Market: Four Tests and When to Trust Them

A ranging market is a market that moves up and down without getting anywhere. The candles travel a long way in total, but the net move from the start to the finish is small, so price keeps returning to the same area instead of building a trend.

To tell whether the market is trending or ranging, first check how much progress price made over the last 20 candles. Then confirm it with the tests traders use for a sideways market: ADX below 20, a flat moving average, a high Choppiness Index and narrow Bollinger bands.

Keenbase Trading measured those four tests on six markets over close to four years of H1 and H4 candles. When each test called a range on its own, it was right about the recent candles 64% to 73% of the time. When three or more of the four agreed, the market really was sideways 82% of the time.

What a Ranging Market Looks Like in Numbers

On a chart a range looks like candles overlapping inside a horizontal box. That picture needs a number before it can be tested, because two traders looking at the same chart often draw two different boxes.

We used the efficiency ratio: the size of the net move over the last 20 candles, up or down, divided by the total distance price travelled from close to close. Below 0.2 means price travelled at least five times as far as it got. That is the definition of sideways behind every figure on this page.

By that definition, 46% of all 20 candle stretches on H1 were sideways across EURUSD, GBPUSD, USDJPY, gold, the Dow and the S&P 500, and 46% on H4 as well. A sideways market is not a rare state. It covered close to half of the time we measured.

A sideways market is not always a quiet one. Price can swing hard up and down and still finish where it started. The efficiency ratio counts both the quiet range and the wild one, which matters in the next sections, because some tests only see the quiet kind.

Gold H1 chart with a 20 candle sideways box and the first candle that closed outside it
Gold H1. Twenty candles go nowhere inside one box, then a candle closes above it and the move that follows leaves the box far behind.

The Four Tests Traders Use, and How Often Each Was Right

Each test reads a different property of price. ADX (the Average Directional Index) measures how strong the direction is, whichever way it points. A flat moving average shows that the average price is not climbing or falling.

The Choppiness Index compares how far the candles travel with how wide the whole stretch is, and a reading above 61.8 is the usual choppy threshold.

Bollinger band width shows how quiet price has become; when the bands are unusually narrow, traders call it a squeeze.

ATR (the Average True Range) is the average size of a candle, gaps included. The flat test measures the moving average slope against ATR, which keeps it fair on gold and on EURUSD alike.

We used common settings with fixed thresholds, not tuned ones, and counted how often the last 20 candles really were sideways when each test called a range:

Test Calls a range when Last 20 candles really sideways (H1)
ADX ADX(14) is below 20 66%
Flat moving average The 20 period average moved less than half an ATR in 10 candles 73%
Choppiness Index CHOP(14) is above 61.8 64%
Squeeze Bollinger band width is in its lowest fifth of the last 120 values 72%

Every test beats a random pick, which was sideways 46% of the time, so each one tells you something real. But the best single test, the flat moving average, was still wrong about one call in four. On H4 the four figures were almost the same: 65%, 72%, 64% and 71%.

Why One Test Is Not Enough: They Rarely Agree

If the four tests measured the same thing, they would call a range at the same time. They do not. On H1, no test called a range on 45% of candles, one test on 28%, two on 19%, three on 7% and all four on only 1%.

Agreement between pairs of tests was low as well. When either ADX or the flat moving average called a range, both did only 34% of the time. For the flat moving average and the squeeze it was 21%, and for ADX and the Choppiness Index only 9%.

The flat moving average and the squeeze split over the wild kind of range. When the flat average called a range and the squeeze did not, the 20 candle box was about 60% wider than when both called it, and it was still sideways 69% of the time. Price swung hard, the average stayed flat and the bands stayed wide.

That disagreement creates a different risk: picking the indicator that agrees with you. A trader who switches indicators until one confirms the range they already see will find one on 55% of H1 candles, because at least one test calls a range that often.

Share of really sideways stretches by how many of four range tests agreed, from 24% with none to 88% with all four
Each filled dot is a share of H1 candles where the last 20 candles really were sideways, grouped by how many of the four tests called a range.

Agreement is where the tests become reliable. Each extra test that agrees lifts the hit rate on H1: 24% with no test, 55% with one, 72% with two, 81% with three and 88% with all four.

When three or more of the four called a range, the last 20 candles were sideways 82% of the time on H1 and 81% on H4. When none of them did, only 24% (H4: 26%) were sideways, so “no test” is a fair sign that the market is not ranging.

The pattern held on every market we measured. On H1, three or more tests in agreement were right 79% of the time on EURUSD, 83% on GBPUSD, 82% on USDJPY, 83% on gold, 80% on the Dow and 83% on the S&P 500.

The cost of this check is that it is rare: three or more tests agreed on about 8% of H1 candles. That fits its job. It is not a signal to look for all day; it is a check to run before you take a trend trade.

Which Test Flickers and Which One Holds

A range call that switches on and off every few candles is hard to act on. We checked how often each call was still standing 10 candles later.

ADX held best: 64% of its range calls were still on 10 candles later. The flat moving average held 35% of the time, the squeeze 34%, and the Choppiness Index only 9%. On H4 the figures were 61%, 30%, 36% and 8%.

So ADX gives the steadier reading, while a Choppiness range call is rarely still standing 10 candles later. Read a Choppiness call as “price is choppy right now”, not as “the market is in a range”.

All of these figures come from closed candles. A reading taken while the candle is still forming can change before it closes, so compare the tests on the last closed candle.

What Usually Comes After a Range

A range describes the market now. It does not promise that the market stays sideways: in our data the 20 candles after a range call were not more sideways than any other 20 candles.

What usually followed was a breakout. When three or more tests agreed, price closed outside the high and low of the last 20 candles within the next 20 candles. That happened 90% of the time on H1 (93% on H4), against 69% when no test called a range. The median wait was 5 candles.

The price range after the call was also larger. After three or more tests agreed, the next 20 candles covered about 1.5 times the height of the range box; after no test called a range, about 0.8 times. A small box is easier to break, so read this as “the range ends”, not as “a trend has started”.

A range call is therefore a reason to hold back trend entries and watch for a close outside the box. All six markets showed the same pattern: 88% to 93% of the H1 range calls by three or more tests were followed by that close within 20 candles.

Best Indicator for a Ranging Market on MT4 and MT5

Among the four tests, the flat moving average was right most often and ADX held its call longest. But the strongest reading is agreement, and agreement shows up on only about 8% of candles, so it is easy to miss when you check four indicators by hand on every chart.

ACB Trade Filter IndicatorACB Trade Filter IndicatorMarks when to trade long, short or not at all, with a histogram and a trend reading, on MT4 and MT5.See the indicator ›

A filter that marks when to stay out directly on the chart makes the check simpler. The ACB Trade Filter Indicator for MT4 and MT5 shows a histogram under the chart and tells you which side to trade, or to stay out:

Histogram and trend What it means
Green histogram, bullish trend Long trades only
Red histogram, bearish trend Short trades only
Gray histogram or sideways trend Avoid trading

Here is how that reads on two real gold H1 ranges. At the end of each 20 candle box, three of the four tests called a range. In both, the Trend Detector of ACB Trade Filter read sideways on at least 16 of the 20 candles. It then read the breakout side by the time price closed outside the box, with the histogram in the matching colour.

Gold H1 chart with ACB Trade Filter reading sideways through a 20 candle box and bullish when price closed above it
Gold H1. The strip above the histogram is the Trend Detector reading for each candle: sideways through the box, then bullish three candles before the first close above it. On your chart the indicator shows the current reading in the top corner.
Gold H1 chart with ACB Trade Filter reading sideways through a 20 candle box and bearish when price closed below it
Gold H1, a range that broke down. Sideways on 16 of the 20 box candles, then bearish one candle before the first close below the box, with a red histogram.

It is built to keep traders out of choppy conditions, and it pairs with the ACB Breakout Arrows Indicator. That pairing fits our finding: when three or more tests agreed, a close outside the box followed 9 times in 10 on H1.

A range on one timeframe is often not a range on the next. When three or more tests called a range on H1, the same tests on the last closed H4 candle agreed only 15% of the time. In 29% of cases, none of them called a range on H4 at all.

KT Trend Filter IndicatorKT Trend Filter IndicatorShows each timeframe as up, down or sideways in one scanner, on MT4 and MT5.See the indicator ›

If you check several timeframes, the KT Trend Filter Indicator shows each one as up, down or sideways in one scanner, and marks sideways when the direction is unclear.

Multiple timeframe analysis explains how to read the timeframes together.

Five Checks Before You Take a Trend Trade

1.Look at the last 20 candlesIf price travelled far but finished close to where it started, treat the market as sideways. Close to half of all 20 candle stretches are.46%
2.Read ADX firstBelow 20 is the steadiest of the four range readings. It was still on 10 candles later 64% of the time.64%
3.Look for agreementA single test that called a range was right 64% to 73% of the time; three or more tests in agreement raised that to 82%.82%
4.Treat a Choppiness reading as momentaryOnly 9% of its range calls were still on 10 candles later.9%
5.Watch for the close outside the boxWhen three or more tests agreed, it came within 20 candles 90% of the time, and those 20 candles covered about 1.5 times the box height.90%

These figures come from one broker’s price history on six markets with fixed test settings, January 2023 to October 2026. Each closed candle was one observation, and neighbouring candles share most of their 20 candle history. They describe how often the tests were right about the market, not a trading result.

Watch the five checks run on real gold charts, including a trade that was bought near the top of a range:

How to Identify a Ranging Market Before You Buy Into One
How to Identify a Ranging Market Before You Buy Into One (8 minutes)

ACB Trade Filter Indicator tells you on your MT4 or MT5 chart when to trade long, short or not at all, so you can stay out of sideways conditions before you take a trend trade.

See sideways conditions on your chart with ACB Trade Filter

About this article

Published by Keenbase Trading, which has been trading since 2018 and builds MT4 and MT5 indicators, Expert Advisors, free trading tools and custom MetaTrader development.

Price history differs between brokers, so check the numbers on your own chart before you rely on them.

>