Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Details

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

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).

Note

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).

Author(s)

Joshua Ulrich

References

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

data(ttrc)
dmi.adx <- ADX(ttrc[,c("High","Low","Close")])

TTR

Technical Trading Rules

v0.24.2
GPL (>= 2)
Authors
Joshua Ulrich
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.