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 DI Period. adxSmoothing required series int ADX Smoothing Period. Return Type
[series float, series float, series float] Example
//@lipi=2
indicator("DMI Example", overlay=false)
// Define input length and smoothing factor
length = 14
smoothing = 14
// Compute DMI values
[plusDI, minusDI, adx] = talib.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)