charton API / @chart-on/ta / dmi
Function: dmi()
dmi(
high,low,close,length,adxLength,out?,state?):Dmi
Defined in: trend.ts:36
Directional movement index with its average (ADX). Each bar's upward move is high - prevHigh and its downward move prevLow - low; only the larger one counts, and only when it is positive. Both moves and the true range are averaged with Wilder's smoothing over length bars. A zero true range reads 0 for both DIs, and DIs that are both 0 give a DX of 0. The first bar has no previous bar and no value. Lookback length for the DIs and length + adxLength - 1 for the ADX.
Pass state to keep the averages for dmiAt.
Parameters
high
low
close
length
number
adxLength
number