Trend / Reference
alerta.ta.dmi
TradingView-compatible spelling: ta.dmi, runs without warnings
Returns DI+ / DI- and ADX. Pine's form is ta.dmi(diLength, adxSmoothing), which smooths DI and ADX by DIFFERENT lengths and reads the chart's own high/low/close; the 4-argument form is kept for older scripts.
alerta.ta.dmi(diLength, adxSmoothing) or dmi(high, low, close, length) → { plus, minus, adx }Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
diLength | int | Yes | — | DI smoothing length. This is Pine's own form — ta.dmi(diLength, adxSmoothing) reads the chart's own H/L/C. |
adxSmoothing | int | Not specified | — | ADX smoothing length. Defaults to diLength. |
close | series | Not specified | — | Legacy 4-argument form only: close series. |
length | int | Not specified | — | Legacy 4-argument form only: length. |
Returns
{ plus, minus, adx }Example
alerta.ta.dmi
indicator("DMI", overlay=false)[diPlus, diMinus, adxValue] = ta.dmi(14, 14)plot(diPlus, { title: "+DI", pane: "oscillator" })plot(diMinus, { title: "-DI", pane: "oscillator" })plot(adxValue, { title: "ADX", pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.