talib.dmi
The directional movement family in one call, calculated from the chart’s own bars.
It takes two lengths rather than one: diLength for the directional readings and adxSmoothing for the strength reading built on them.
talib.dmi(series int diLength, series int adxSmoothing) → [series float, series float, series float]| Parameter | Type | Required | Description |
|---|---|---|---|
diLength | series int | yes | Length used for the directional readings. |
adxSmoothing | series int | yes | Smoothing length used for the strength reading. |
Returns [series float, series float, series float] — Three series float values as a tuple, in the order positive directional indicator, negative directional indicator, average directional index.
indicator("Directional movement")
[plusDI, minusDI, adx] = talib.dmi(14, 14)
plot(plusDI, title = "Plus DI")
plot(minusDI, title = "Minus DI")
plot(adx, title = "ADX")See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.