Skip to content

ATR

Summary

Wilder-smoothed average of the True Range over a period, measuring price volatility regardless of direction. Higher ATR means greater volatility; no directional bias.

Formula

TR_t = max(high-low, |prevClose-high|, |prevClose-low|) ATR seed = simple average of first period TR values ATR_t = (ATR_{t-1} * (period-1) + TR_t) / period

Inputs

  • inPriceHLC — High, low, close price series

Outputs

  • outReal — Average True Range value

Parameters

  • optInTimePeriod — Smoothing period

Implementation

TA-Lib Definition: atr.c · atr.yaml

Native File
C ta_ATR.c
Rust atr.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Average True Range

See Also

TRANGE · NATR · SMA · EMA

References

  • J. Welles Wilder, New Concepts in Technical Trading Systems, Trend Research (ISBN 0894590278)