FREE BOOK · REGIME

Trend or range from A to Z: measuring the market's regime

The Academy's seventeenth book in 14 chapters: why tell trend from range, how a regime is measured, the efficiency ratio, the variance ratio, the Hurst exponent, the ADX and its 25 threshold, how long regimes last, whether the regime can be predicted, breakouts and fades in the two regimes, the regime filter, regime and volatility and the regime sheet. Each chapter explains how it works, what we measured on gold's candles and what to do with it. With exercises, a glossary and a final test.

14 chapters · 4 modules · 2 hours of reading, approx. · updated 2026-11-20

How to use this book

Every chapter has figures on real gold candles, four exercises with the solution explained and a recap of the key points. Do the exercises before you move on to the next chapter. Educational content, not financial advice.

Part 1: What is measured

Why tell trend from range and how a regime is measured.

  1. 1Why tell trend from rangeThe most repeated advice after «look at the bigger chart» is «work out whether the market is trending or ranging, then pick the strategy». Here we put it to the test on 4,865 hourly candles of gold, with four regime measures (efficiency, variance, Hurst, ADX) and a comparison with 30 random series. The starting point is uncomfortable: two 48-hour windows of the same market, one with ER 0.58 (a $163 move on a $280 path) and one with ER 0.00 ($0.46 net on $717), and a random series produces phases like these too. · 7 min
  2. 2How a regime is measuredFour measures to say whether the market is trending or ranging, computed at the close of every candle on the latest candles: the 48-candle efficiency ratio (median 0.14), the 4-over-96 variance ratio (0.96), the Hurst exponent over 240 (0.50) and the 14-period ADX (26). On random series they are 0.15, 0.97, 0.49 and 26: the distributions are almost equal. The four measures correlate little (0.23-0.63), and with fixed thresholds the shares of «trend» on the real data and on chance coincide (ER above 0.3: 15% and 15%; ADX above 25: 53% and 54%). · 8 min

Part 2: Four measures

Efficiency ratio, variance ratio, Hurst exponent and ADX on the same candles.

  1. 3The efficiency ratioKaufman's efficiency ratio is the net move divided by the total path over a window: 1 if the price goes straight, 0 if it comes back. On a random walk it is about 1 over the square root of the window: 0.14 at 48 candles, and on gold the median is exactly 0.14 (0.15 on random series). High or low does not say what the price will do: the correlation between today's ER and the one 48 candles later is −0.02 (non-overlapping samples), and the move over the next 24 candles in the previous direction is +0.34 ± 0.94 ATR after a high regime and +0.55 ± 0.81 after a low one, inside the chance band. · 7 min
  2. 4The variance ratioThe variance ratio compares the variance of q-candle moves with q times that of one candle: it is 1 if the price has no memory, above 1 if candles reinforce each other (trend), below 1 if they cancel (reversion). On hourly gold it is 1.00 at q = 2, 0.99 at q = 4 and 1.01 at q = 8, that is no memory over a few hours; it rises to 1.07 (q = 16), 1.14 (q = 24, z = 1.8, above the random series, 0.94-1.09) and 1.15 (q = 48): a hint of persistence at one or two days, with an error that variable volatility makes larger than the one stated. Rolling over 96 candles the VR(4) has a median of 0.96, sits below 0.9 in 38% of candles and above 1.1 in 26%, and varies less than random series (deviation 0.20 against 0.24). · 7 min
  3. 5The Hurst exponentThe Hurst exponent H says how the size of moves grows with duration: 0.5 for a random walk, above 0.5 if moves reinforce each other, below if they cancel. On the whole gold series it is 0.51 with aggregated variance (0.50 on chance) and 0.57 with the R/S method (0.55 on chance: the estimator rises above 0.5 even without memory). Over 240 candles H swings between 0.44 and 0.56 (10th-90th percentile) and a random series between 0.41 and 0.59: a «trend» value like 0.55 appears in 15% of gold's candles and in 22% of random ones. · 7 min
  4. 6The ADX and its 25 thresholdWilder's ADX measures the strength of directional movement without saying its direction, and the classic rule is «above 25 there is a trend, below 20 there is not». On gold's hourly candles the 14-period ADX has a median of 26, sits above 25 in 54% of candles and above 40 in 17% (random series: 54% and 15%): the threshold does not separate. After an ADX above 25 the move over the next 24 candles, in the direction of the last 14, is −0.01 ± 0.78 ATR and after an ADX below 20 it is +0.85 ± 1.19: inside the chance band and opposite to what the rule would lead you to expect. · 8 min

Part 3: Duration, prediction and strategies

How long regimes last, whether they can be predicted, breakouts and fades in the two regimes.

  1. 7How long regimes lastWith the relative regime (measure above or below its median over the last 500 candles) the «trend» periods last a median of 2 candles with efficiency, 6 with variance, 17 with Hurst and 26 with the ADX (means 9, 19, 49 and 31 candles), and they are as long as those of a random series: 3, 8, 25 and 19 in median. Only the ADX has periods longer than chance (26 against 19, band 14-24). The four measures indicate the same regime in 29% of candles (chance 26%), and pairwise in 54-69%, like chance (53-69%). · 6 min
  2. 8Can the regime be predictedIf the market is trending now, will it be afterwards? On non-overlapping samples, the share of candles still trending after 24 candles is 48% with efficiency, 67% with variance, 73% with Hurst and 53% with the ADX, against 55%, 77%, 85% and 59% for random series: no measure persists more than chance, and variance and Hurst persist less. The level of the measure keeps only by construction (the windows overlap) and the correlation at 96 candles is −0.03 with efficiency and −0.24 with variance. The regime «seen afterwards» instead looks like a treasure: on the plan, trades with high future efficiency make +1.14 R and those with low +0.34, but random series produce the same gap too (0.41, band from −0.19 to +0.97 against 0.81), because it is hindsight. · 8 min
  3. 9Breakouts in trend and in rangeOn the 240 breakout rules of book 12 (at least 15 trades), keeping only the signals in a trend regime according to efficiency takes the mean R from +0.09 to +0.22 (234 rules out of 240 improve) and keeping only those in range takes it to −0.09; random series give −0.00 and +0.05 (bands −0.14/+0.12 and −0.06/+0.17). The trend minus range difference is +0.31 against −0.05 (−0.24/+0.11): outside the band. The ADX makes +0.19 and +0.11, variance and Hurst stay inside. On the best rule the filter changes nothing (+0.74 without, +0.77 in the trend). The efficiency sign holds with other windows but leaves the band only with the 48-candle window. · 9 min
  4. 10Fading in the rangeThe fade, that is trading against the breakout, loses −0.13 R on average over book 12's 240 rules. Keeping only the signals in a range regime according to efficiency raises the mean R to +0.05 (237 rules out of 240 improve; random series −0.12, band −0.23/+0.01); keeping only those in a trend lowers it to −0.18. With the ADX, the fade in a trend worsens to −0.24 (10 rules out of 240 improve), outside the band. Variance and Hurst have no effect. But the best fade (N = 10, half-ATR stop, 458 trades) makes +0.04 ± 0.16 R with or without a filter: no fade rule became an edge, only a less losing one. · 9 min

Part 4: Filter, sheet and check

The regime filter, regime and volatility, the regime sheet, mistakes, glossary and final test.

  1. 11The regime filter and the system that switches ruleA system that breaks out in the trend and fades in the range, over the grid's 240 rule pairs, gives with efficiency +0.16 R on average (213 rules out of 240 positive; random series −0.04, band −0.14/+0.06), with the ADX +0.06, with variance and Hurst −0.06 and −0.07. The opposite system (breakout in the range, fade in the trend) makes −0.16 with efficiency. The best pair makes +0.70 ± 0.38 R (81 trades) against +0.74 ± 0.43 for the plain 80-candle breakout: no gain at the top. The system is better than breakout and fade taken alone (+0.09 and −0.13), but the effect lives in a single measure and must be tested forward. · 9 min
  2. 12Regime and volatilityIs a trend regime just a way of saying high volatility? On gold the regime measures and the ATR are correlated (efficiency 0.17, Hurst 0.30, ADX 0.36; random series 0.06, −0.11 and 0.26): with high volatility 57% of candles are in a trend according to efficiency, with low volatility 40% (50% and 49% on chance). The 20-candle breakout splits its result into four cells: trend and high volatility +0.62 ± 0.56 R (45 trades), range and high volatility −0.46 ± 0.41 (38), trend and low +0.11 (29), range and low +0.07 (48). The difference between regimes sits entirely in high volatility; the volatility-only filter gives +0.13 with high volatility and +0.03 with low. · 8 min
  3. 13The regime sheetAn eight-field sheet to write before using a regime measure: measure, window, threshold, when it is read, what the rule does in each regime, how volatility is treated, what to do if the measures disagree, test done. Filled in for the example plan (80-candle breakout, no regime: 79 trades, +0.74 ± 0.43 R), for a 20-candle breakout with an efficiency filter (94 trades, +0.38 ± 0.38 R against +0.10 ± 0.27 without a filter, about 16 months for 155 trades) and for a two-lane system (180 trades, +0.27 ± 0.27). · 9 min
  4. 14A regime told twice, mistakes, reference, glossary and final testThe same idea told in two ways: «I trade breakouts only when the market is trending and fades only in the range: I use the right tool at the right time» and «the regime measures sit inside chance, last two hours, cannot be predicted; only 48-candle efficiency separates the results (+0.22 against +0.09 R on the breakout) and only at that window, and on the best rule it changes nothing». Then the most frequent mistakes in chapter order, the quick reference with rules and measurements, the glossary and a 15-question final test. · 17 min

Another course

Forex course for beginners: from zero to your first demo tradeRisk and psychology in trading: the course that decides whether you lastMarket structure on gold: the book of swings, BOS and zones, with real chartsOrder blocks from A to Z on gold: the book of the zone, the displacement and the trade, with real chartsFVG and liquidity from A to Z on gold: the book of the price gap and the stop hunt, with real chartsSMC: the whole system on gold, from bias to order, tested step by step on real candlesIndicators from A to Z on gold: averages, RSI, MACD, Bollinger and the rest, measured on real candlesElliott and Fibonacci on gold: retracements, extensions and waves, measured on real candlesChart patterns on gold from A to Z: head and shoulders, double tops, triangles, wedges and flags, measured on real candlesCandlesticks on gold from A to Z: doji, hammer, engulfing, stars and soldiers, measured on real candlesHours, sessions and news on gold: when price moves, measured on real candlesSupport, resistance and levels from A to Z: how well they really hold, measured on real candlesRisk and position sizing from A to Z: simulations on real resultsBacktest and overfitting from A to Z: how not to fool yourself with dataPsychology and the trading journal from A to Z: measuring behavioural mistakesVolatility and ATR from A to Z: measuring how much gold movesExits and trade management from A to Z: testing many exits on the same entriesMultiple timeframes from A to Z: what looking at the bigger chart addsComplete trading course: market structure, ICT, SMC and algorithmic tradingHow to follow the room signals: from message to trade, step by stepGold in depth: how XAUUSD moves and how to trade it with a methodPremium zone: scenario playbooks, chart exercises and trade reviews