Volatility indicators

True Range

Per-bar price range expanded to include gaps from the previous close.

Engine
TA-Lib
Function
TRANGE
Input series
high, low, close
Outputs
1

How it works

TRANGE returns the greatest of the current high-low range, the absolute difference between current high and previous close, and the absolute difference between current low and previous close.

Use case

Use True Range as an unsmoothed, direction-independent volatility feature and as the base input for range-derived indicators.

Parameters

ParameterTypeDefaultBounds or optionsDescription

Outputs

OutputTypeDescription
True RangenumberGap-aware True Range value for the bar.

Reading the result

True Range describes the magnitude of one bar while accounting for displacement from the previous close. Unlike ATR, it is not smoothed across a rolling average.

Large values identify periods with unusual range or close-to-open discontinuity, but they do not indicate direction.

Common mistakes

  1. Reading a positive range as upward movement.
  2. Comparing raw price-unit values across differently priced assets.
  3. Treating isolated spikes as a persistent volatility regime.
  4. Ignoring how missing previous-close input affects the calculation.

DataCat workflow notes

Use True Range when downstream code should control aggregation or normalization. Use ATR or NATR when a ready-made smoothed or relative volatility feature is preferable.

Resources

Search documentation

Search across 46 documentation pages.