True range (TR) is a measure of volatility of a High-Low-Close series; average true range (ATR)
is a Welles Wilder's style moving average of the TR. Developed by J. Welles Wilder in 1978.
Usage
ATR(HLC, ma = list("EMA", n=14, wilder=TRUE))
Arguments
HLC
Object able to be coerced to a matrix, which contains High-Low-Close prices.
ma
A list whose first component is a string containing the moving average function
name; additional parameters may also be specified as named components.
Value
A matrix containing the columns:
trThe true range of the series.
atrThe average (as specified by ma) true range of the series.
true.highThe true high of the series.
true.lowThe true low of the series.
concept
volatility
Details
TR incorporates yesterday's close in the calculation (high minus low). E.g. if
yesterday's close was higher than today's high, then the TR would equal yesterday's
close minus today's low.
The ATR is a component of the Welles Wilder Directional Movement Index (DX, ADX).
References
The following site(s) were used to code/document this indicator:
http://www.fmlabs.com/reference/TR.htmhttp://www.fmlabs.com/reference/ATR.htmhttp://www.equis.com/Customer/Resources/TAAZ/?c=3&p=35http://www.linnsoft.com/tour/techind/trueRange.htmhttp://stockcharts.com/education/IndicatorAnalysis/indic_ATR.html
See Also
See EMA, SMA, etc. for moving average options; and note
Warning section. See DX, which uses true range.
See chaikinVolatility for another volatility measure.