Volatility indicators

Average True Range

Average range-based volatility over a fixed number of bars.

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

How it works

ATR averages true range values, where true range captures the largest relevant movement among the current high-low range and gaps versus the previous close. TA-Lib marks ATR as having an unstable period.

Use case

Use ATR as a volatility feature that is independent of trend direction and reflects bar-to-bar range expansion or compression.

Parameters

ParameterTypeDefaultBounds or optionsDescription
Time Periodinteger141…100000Number of bars used to average true range.

Outputs

OutputTypeDescription
ATRnumberAverage True Range value for the bar.

Reading the result

ATR measures typical recent trading range while accounting for movement between consecutive closes. It describes magnitude, not direction: a rising value can accompany either a rally, a decline, or unstable sideways movement.

The result remains in source-price units. That is useful for one instrument but can make direct comparisons across differently priced instruments misleading.

Common mistakes

  1. Reading positive ATR as bullish direction.
  2. Comparing raw values across assets without normalization.
  3. Ignoring provider gaps that alter the previous-close relationship.
  4. Assuming a volatility spike identifies the cause of the move.

DataCat workflow notes

Use NATR when a normalized range measure better fits cross-symbol analysis. Use True Range when you need the unsmoothed one-period component rather than its rolling average.

Resources

Search documentation

Search across 46 documentation pages.