ADX {TTR} | R Documentation |
Directional Movement Index; developed by J. Welles Wilder.
ADX(HLC, n=14, maType="EMA", wilder=TRUE, ...)
HLC |
Object able to be coerced to a matrix, which contains High-Low-Close prices. |
n |
Number of periods to use for DX calculation (not ADX calculation). |
maType |
A function or a string naming the function to be called. |
wilder |
Only used for the default case. If TRUE , a Welles Wilder type EMA
will be calculated. |
... |
Other arguments to be passed to the maType function. |
The DIp
/DIn
(positive/negative) is the percentage of the true range that is up/down.
A matrix containing the columns:
DIp |
The positive Direction Index. |
DIn |
The negative Direction Index. |
DX |
The Direction Index. |
ADX |
The Average Direction Index (trend strength). |
A buy/sell signal is generated when the +/-DI crosses up over the -/+DI, when the DX/ADX signals a strong trend. A high/low DX signals a strong/weak trend. DX is usually smoothed with a moving average (i.e. the ADX).
Josh Ulrich
The following site(s) were used to code/document this indicator:
http://www.fmlabs.com/reference/DI.htm
http://www.fmlabs.com/reference/DX.htm
http://www.fmlabs.com/reference/ADX.htm
http://www.fmlabs.com/reference/ADXR.htm
http://www.equis.com/Customer/Resources/TAAZ/Default.aspx?c=3&p=49
http://linnsoft.com/tour/techind/dirInd.htm
http://linnsoft.com/tour/techind/adx.htm
http://linnsoft.com/tour/techind/adxr.htm
http://stockcharts.com/education/IndicatorAnalysis/indic_ADX.html
See EMA
, SMA
, etc. for moving average options; and note
Warning section. The DX calculation uses ATR
.
See aroon
, CCI
, TDI
, VHF
for other indicators that measure trend direction/strength.
data(ttrc) dmi.adx <- ADX(ttrc[,c("High","Low","Close")])