What Is True Range? Measure Daily Price Movement with Python

AAPL candlesticks above a comparison of daily High-Low range and True Range calculated in Python

We have spent several lessons asking how price changes over time.

Momentum
→ absolute change

ROC
→ percentage change

RSI
→ balance of gains and losses

MACD
→ relationship between smoothed time scales

Now we will ask a different question:

How much did one bar move?

The first answer seems obvious: High - Low.

But when price jumps away from the previous Close, High - Low can miss part of the move.

That is the problem True Range is designed to solve.

1. Start with the Ordinary Daily Range

Suppose today's prices are:

High = 106
Low  = 103

The ordinary range is:

106 - 103 = 3

If we only look at today's candle, the bar spans three price units.

2. Now Add Yesterday's Close

Previous Close = 100
Today's High   = 106
Today's Low    = 103

The market did not begin its story at 103. It came from a previous Close of 100.

Previous Close  100
                  │
                  │ gap
                  ↓
Today's Low      103
Today's High     106

High-Low is still only 3, but the distance from yesterday's Close to today's High is 6.

3. True Range Checks Three Distances

1. High - Low

2. |High - Previous Close|

3. |Low - Previous Close|

Then it keeps the largest one:

True Range
=
max(
    High - Low,
    |High - Previous Close|,
    |Low - Previous Close|
)

4. Calculate the Gap-Up Example

High - Low
= 106 - 103
= 3

|High - Previous Close|
= |106 - 100|
= 6

|Low - Previous Close|
= |103 - 100|
= 3

Therefore:

True Range
=
max(3, 6, 3)
=
6

The simple High-Low range saw only 3. True Range captured the larger distance created by the gap.

5. Why Use Absolute Values?

Consider a gap down:

Previous Close = 110
High           = 106
Low            = 102
High - Low = 4

|High - Previous Close|
= |-4|
= 4

|Low - Previous Close|
= |-8|
= 8

True Range = 8

Absolute values remove direction because True Range asks about size, not bullish or bearish direction.

6. True Range Measures Magnitude, Not Direction

large True Range
does not mean
bullish

large True Range
does not mean
bearish

A large gap up and a large gap down can both produce a large True Range.

True Range
→ movement magnitude

not
→ trend direction

7. Why Is Open Missing from the Formula?

The formula uses:

High
Low
Previous Close

Open does not appear directly.

The gap is captured through today's High and Low relative to the previous Close.

True Range asks for the largest relevant distance, not the difference between yesterday's Close and today's Open.

8. When Does True Range Equal High - Low?

Previous Close = 104
High           = 108
Low            = 103
High - Low = 5
|High - Previous Close| = 4
|Low - Previous Close| = 1

High-Low is already the largest candidate.

True Range = 5

True Range does not have to be larger than the ordinary range.

9. Why the First Value Is None

The calculation needs a previous Close. The first row in a dataset has no previous row inside that series.

Our educational function therefore starts with:

[None, ...]

That keeps missing information visible instead of inventing it.

10. Build True Range from Scratch

The new Learning Block accepts:

high_values
low_values
close_values

The core calculation is:

for i in range(1, len(close_values)):
    high_now = float(high_values[i])
    low_now = float(low_values[i])
    previous_close = float(close_values[i - 1])

    high_low_range = high_now - low_now
    high_gap = abs(high_now - previous_close)
    low_gap = abs(low_now - previous_close)

    current_true_range = max(
        high_low_range,
        high_gap,
        low_gap,
    )

Read it as a flow:

current High and Low
        ↓
previous Close
        ↓
three distances
        ↓
take the maximum
        ↓
True Range

11. Validate with a Tiny Sequence

High:
102, 106, 108, 106

Low:
99, 103, 104, 102

Close:
100, 105, 107, 103

The expected result is:

None, 6, 4, 5

The Python file verifies this before downloading AAPL data.

12. Compare High-Low and True Range on Real Data

The script calculates both:

Daily Range
=
High - Low

and:

True Range
=
max(
    High - Low,
    |High - Previous Close|,
    |Low - Previous Close|
)

It then finds dates where:

True Range
>
Daily Range

Those rows are useful because the previous Close enlarged the measured movement beyond the candle's own span.

13. The Chart Uses Two Focused Panels

Panel 1
AAPL candlesticks

Panel 2
High - Low
versus
True Range

When the two lines overlap, High-Low was the largest candidate.

When True Range rises above High-Low, one of the previous-Close distances was larger.

14. True Range Is in Price Units

If True Range is 6:

True Range = 6 price units

It does not mean:

6%

This is similar to the distinction between Momentum and ROC.

Momentum
→ price units

ROC
→ percent

True Range
→ price units

15. True Range Is Not Standard Deviation

The word volatility can refer to different calculations.

True Range
→ one bar + previous Close
→ maximum relevant distance

Standard deviation asks a different statistical question about dispersion across multiple observations.

Do not treat all volatility measures as interchangeable.

16. Why True Range Is a Building Block

One True Range value describes one bar. The next question is how to summarize True Range across many bars.

True Range
     ↓
average / smoothing
     ↓
Average True Range
     ↓
ATR

This is why true_range() should remain unchanged when we move to Phase 3-15.

17. True Range Is Not a Trading Rule

large True Range
→ large measured movement

not automatically
→ buy
→ sell
→ trend continues
→ trend reverses

Trading use is a later hypothesis that must be tested.

18. Change One Thing Yourself

True Range itself has no lookback parameter. So this lesson's experiment changes the observation, not the formula.

Find dates where:

True Range > High - Low

Then inspect:

Where was the previous Close?

Was today's price area above it?

Was today's price area below it?

Which of the three candidates
became the maximum?

19. A Historical Note — But Not the Full History Yet

True Range is associated with J. Welles Wilder's volatility and directional-movement framework.

True Range, ATR, DMI, and ADX are closely connected. Rather than repeat the same historical background in several Core Path articles, Alphesta will treat their origin and philosophy together later.

True Range
→ ATR
→ Directional Movement
→ DMI / ADX

then

Origin & Philosophy companion
→ Why did Wilder build this system?

Check Your Understanding

  • The ordinary daily range is High minus Low.
  • High-Low can miss part of a move when price gaps away from the previous Close.
  • True Range checks three distances and keeps the largest.
  • Absolute values remove direction from the previous-Close comparisons.
  • True Range measures magnitude, not bullish or bearish direction.
  • Open is not used directly in the formula.
  • The first True Range value is None in our implementation.
  • True Range is measured in price units, not percent.
  • True Range is not the same as standard deviation.
  • True Range becomes the building block for ATR in the next lesson.

What You Just Learned

Current High and Low
+
Previous Close
        ↓
three candidate distances
        ↓

High - Low

|High - Previous Close|

|Low - Previous Close|

        ↓
max(...)
        ↓
True Range
        ↓
How large was the move?

not

Which direction did price move?

High-Low describes the bar itself. True Range also asks where that bar sits relative to the previous Close.

Sources