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:
- True range of each candle (chapter 1): the largest of high − low, |high − previous close| and |low − previous close|.
- Simple average of the last N. It is the version of our books, with N = 14.
- 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 average | Wilder | |
|---|---|---|
| Weight of the last N candles | equal | decreasing, with a long tail |
| What happens to an old candle | leaves all at once after N candles | fades slowly |
| Reaction to a new candle | 1/N | 1/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:
| Measure | Value |
|---|---|
| Median | $18.6 |
| 10th percentile | $13.2 |
| 90th percentile | $33.0 |
| Minimum | $2.5 |
| Maximum | $130.6 |
| Median in % of the price | 0.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.
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 24 | Typical error | Forecast / realised (median) |
|---|---|---|---|
| 7 | 0.765 | 22% | 0.98 |
| 14 | 0.783 | 18% | 1.00 |
| 21 | 0.776 | 17% | 1.01 |
| 50 | 0.714 | 16% | 1.02 |
| 100 | 0.647 | 16% | 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.
- 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.
- 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.
- 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:
| Candle | True range | ATR simple average | ATR 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
- Write which ATR you use (simple or Wilder) and with which window (here 14).
- Look at the ATR in dollars and in percent: the first is for stops, the second for comparing periods.
- Do not change the window to make a number come out right: between 14 and 21 the difference cannot be told from noise.
- After a huge candle, remember the step: the simple-average ATR drops at once when it leaves the window.
- Treat the ATR as a scale, with about 18% error on the next 24 hours: not a forecast.
Procedure in four steps
- Calculate the true range of each candle.
- Average the last 14 (simple) or update with Wilder's formula.
- Write the value in dollars and in percent of the price.
- 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?
Read the chart in words
| When | What | Price |
|---|---|---|
| 21 May 2026 15:00 UTC | Point A | 4,517.44 |
| 21 May 2026 22:00 UTC | Point B | 4,546.89 |
| 22 May 2026 04:00 UTC | Point C | 4,535.52 |
| 22 May 2026 10:00 UTC | Point D | 4,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.