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.
Object that is coercible to xts or matrix and contains High-Low-Close prices.
Number of periods for moving average.
A function or a string naming the function to be called.
Other arguments to be passed to the
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
A object of the same class as
HLC or a matrix (if
try.xts fails) containing the columns:
The true range of the series.
The average (as specified by
ma) true range of the series.
The true high of the series.
The true low of the series.
The following site(s) were used to code/document this
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.