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
| Parameter | Type | Default | Bounds or options | Description |
|---|
Outputs
| Output | Type | Description |
|---|---|---|
| True Range | number | Gap-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
- Reading a positive range as upward movement.
- Comparing raw price-unit values across differently priced assets.
- Treating isolated spikes as a persistent volatility regime.
- 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.