Part 1: What volatility is · Chapter 2 of 14 · 9 min

The ATR step by step

The ATR is the average of the true ranges of the last N candles. On hourly gold the 14-candle ATR has a median of $18.6 (0.41% of the price), a 10th percentile of $13.2 and a 90th of $33.0. The simple average and Wilder's version give very close series (correlation 0.98); a shorter window reacts sooner but errs more, a longer one reacts late: at 14 candles the correlation with the next 24 hours is the highest (0.78), at 50 and 100 candles the typical error falls to 16% but the correlation drops to 0.71 and 0.65.

The calculation, step by step

The ATR (average true range) is the average of the true ranges of the last N candles. It is the most used yardstick for putting a dollar number on the volatility of the moment, and we have used it in all the previous books: the stop of our example plan is 1.5 ATR, and the filters and zones of books 5-10 are measured in ATR.

Three steps:

  1. True range of each candle (chapter 1): the largest of high − low, |high − previous close| and |low − previous close|.
  2. Simple average of the last N. It is the version of our books, with N = 14.
  3. Update at each new candle: you add the new true range and drop the oldest.

An example with N = 3. The true ranges of the last three candles are 10, 14 and 12: the ATR is 12. The next candle has a true range of 20. With the simple average the ATR becomes (14 + 12 + 20) ÷ 3 = 15.3: the 10 left, the 20 came in.

There is a second version, the original one by J. Welles Wilder, which does not drop the old candle but lets it fade slowly:

> new ATR = (old ATR × (N − 1) + new true range) ÷ N

With the same numbers: (12 × 2 + 20) ÷ 3 = 14.7. For N = 14 the weight of the new candle is 1/14, about 7%, and the weight of an old candle shrinks a little at every step instead of dropping to zero all at once.

Simple averageWilder
Weight of the last N candlesequaldecreasing, with a long tail
What happens to an old candleleaves all at once after N candlesfades slowly
Reaction to a new candle1/N1/N

On hourly gold the two series almost overlap: correlation 0.98, mean relative difference 9.6%. For the decisions of this book the difference does not matter, but it helps to know which of the two your software uses, because the same «ATR(14)» can give 15.3 or 14.7.

Gold's typical values

On the 4,865 hourly candles with the market open, the 14-candle ATR (simple average) is:

MeasureValue
Median$18.6
10th percentile$13.2
90th percentile$33.0
Minimum$2.5
Maximum$130.6
Median in % of the price0.414%
10th / 90th percentile in %0.301% / 0.704%

An hourly ATR of $18.6 means that a typical hour moves about $19 between high and low. The same number also tells us, as we will see in chapter 7, how wide a one-day movement is. The ratio between the 90th and the 10th percentile (2.5 times) shows that the ATR is not a constant: over the ten months hourly volatility changes a lot.

Figure 1. ATR over 7 (grey), 14 (pink) and 50 candles (blue), in dollars, taken at the last candle of each day. At the end of January all three rise above $50; the 50-candle average (blue) is the slowest to rise and to fall.Data: gold, XAUUSDT perpetual future (real candles) · daily (D1) · from 15 Dec 2025 to 5 Oct 2026.
Read the chart in words

Daily gold chart with, below, three ATR lines: a more nervous one, a middle one and a slower one.

The window: how far back to look

How many candles should go in the average? We compared five windows on a concrete question: how well does the ATR of now describe the mean true range of the next 24 candles?

Window (candles)Correlation with the next 24Typical errorForecast / realised (median)
70.76522%0.98
140.78318%1.00
210.77617%1.01
500.71416%1.02
1000.64716%1.03

The typical error is the median of |log(forecast ÷ realised)|: an 18% means that the ATR is usually off by almost a fifth, up or down. Three readings.

  1. At 14 candles the correlation is the highest, but between 14 and 21 the difference is tiny (0.783 against 0.776) and sits inside the measurement error of a ten-month series.
  2. Long windows err less on average but follow changes worse. The typical error falls to 16%, but the correlation drops: a 100-candle average (four days) is slow to notice a change of phase.
  3. No window beats the 18% error by much. An ATR is an indication of scale, not a precise forecast.

The step effect

With the simple average, a huge candle enters the window and stays N candles; then it leaves and the ATR drops at once, without the market having done anything at that moment. It is an artefact of the calculation.

The biggest case in our data is 29 January 2026, at 15:00 UTC: a true range of $391.5 with an ATR of $49.7 before. Fourteen candles later the candle leaves the window:

CandleTrue rangeATR simple averageATR Wilder
13 hours after the spike$64.1$109.2$81.7
14 hours after (the spike leaves)$63.5$85.7$80.4

The simple-average ATR falls by $23.5 in a single candle (391.5 − 63.5 divided by 14); Wilder's falls by $1.3. If you use the ATR for the stop, a sudden drop of this kind means a stop a fifth tighter from one hour to the next, only because an old candle left the window. Keep it in mind when you compare the ATR with the numbers of the book: in this book we use the simple average over 14.

What to do

  1. Write which ATR you use (simple or Wilder) and with which window (here 14).
  2. Look at the ATR in dollars and in percent: the first is for stops, the second for comparing periods.
  3. Do not change the window to make a number come out right: between 14 and 21 the difference cannot be told from noise.
  4. After a huge candle, remember the step: the simple-average ATR drops at once when it leaves the window.
  5. Treat the ATR as a scale, with about 18% error on the next 24 hours: not a forecast.

Procedure in four steps

  1. Calculate the true range of each candle.
  2. Average the last 14 (simple) or update with Wilder's formula.
  3. Write the value in dollars and in percent of the price.
  4. Compare it with the typical values (10th and 90th percentile) before using it for a stop.

Exercises

Chapter exercises

1. In the chart the marked candles are A (21 May, 15:00 UTC), B (22:00), C (22 May, 04:00) and D (10:00). Which has the largest true range?

Chart exercise. Data: gold, XAUUSDT perpetual future (real candles) · 1 hour (H1) · from 21 May 2026 07:00 UTC to 22 May 2026 12:00 UTC.
Read the chart in words
WhenWhatPrice
21 May 2026 15:00 UTCPoint A4,517.44
21 May 2026 22:00 UTCPoint B4,546.89
22 May 2026 04:00 UTCPoint C4,535.52
22 May 2026 10:00 UTCPoint D4,538.60

Times in UTC.

2. The true ranges of the last three candles are 10, 14, 12 and the new candle has a true range of 20. What is the 3-candle ATR (simple average)?

3. With the same numbers and Wilder's formula (N = 3), what is the new ATR?

4. A candle with a very large true range leaves the window of a simple-average ATR. What happens?

Have a question or want to share your exercise?

Post in the community, or join the free signals room on Telegram.

Educational content, not financial advice. Trading involves risk.