Average True Range (ATR)
Average True Range (ATR) is a technical analysis indicator developed by J. Welles Wilder, based on trading ranges smoothed by an N-day exponential moving average.
The range of a day's trading is simply the high - low. The true range extends it to yesterday's closing price if it was outside of today's range.
The true range is the largest of the:
Most recent period's high minus the most recent period's low
Absolute value of the most recent period's high minus the previous close
Absolute value of the most recent period's low minus the previous close
|Average Type besides Simple
x is the period and must be an integer.
z is the offset. An offset of 1 would be 1 bar ago.
t is the type of moving average used to smooth true range. Leave blank for a simple, X for exponential, F for front weight and H for Hull.
Note that you can use an exponential average type to get the traditional Wilder's smoothing, but you need to set
x to ((period * 2) - 1). So a 14 period Wilder's smoothed ATR would use a period of 27.
A 14 period ATR for the current bar can be written as follows.
But you can get rid of the offset since it is zero and just use the following instead.
A 14 period Wilder's smoothed ATR for the current bar can be written as follows.
A 14 period Wilder's smoothed ATR from 2 bars ago can be written as follows.
Read more about Average True Range on Wikipedia.