TTR (version 0.23-6)

ADX: Welles Wilder's Directional Movement Index

Description

Directional Movement Index; developed by J. Welles Wilder.

Usage

ADX(HLC, n = 14, maType, ...)

Arguments

HLC

Object that is coercible to xts or matrix and 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.

Other arguments to be passed to the maType function.

Value

A object of the same class as HLC or a matrix (if try.xts fails) containing the columns:

DIp

The positive Direction Index.

DIn

The negative Direction Index.

DX

The Direction Index.

ADX

The Average Direction Index (trend strength).

Details

The DIp/DIn (positive/negative) is the percentage of the true range that is up/down.

References

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 https://www.metastock.com/Customer/Resources/TAAZ/?p=49 https://www.linnsoft.com/techind/directional-indicator-diplus-diminus https://www.linnsoft.com/techind/adx-avg-directional-movement https://www.linnsoft.com/techind/adxr-avg-directional-movement-rating http://www.stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

See Also

See EMA, SMA, etc. for moving average options; and note Warning section. The DX calculation uses ATR. See aroon, CCI, TDI, VHF, GMMA for other indicators that measure trend direction/strength.

Examples

Run this code
# NOT RUN {
data(ttrc)
dmi.adx <- ADX(ttrc[,c("High","Low","Close")])

# }

Run the code above in your browser using DataLab