Functions
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.
Syntax
talib.dmi(series int diLength, series int adxSmoothing) → [series float, series float, series float]
Arguments
diLength required series int Length used for the directional readings. adxSmoothing required series int Smoothing length used for the strength reading. Return Type
[series float, series float, series float] Example
indicator("DMI Example", overlay=false)
// Define input length and smoothing factor
length = 14
smoothing = 14
// Compute DMI values
[plusDI, minusDI, adx] = ta.dmi(length, smoothing)
// Plot the results
plot(plusDI, title="+DI", color=color.green)
plot(minusDI, title="-DI", color=color.red)
plot(adx, title="ADX", color=color.blue)