Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.ta.dmi
On this pageSignatureParametersReturnsExample

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

NameTypeRequiredDefaultDescription
diLengthintYes—DI smoothing length. This is Pine's own form — ta.dmi(diLength, adxSmoothing) reads the chart's own H/L/C.
adxSmoothingintNot specified—ADX smoothing length. Defaults to diLength.
closeseriesNot specified—Legacy 4-argument form only: close series.
lengthintNot 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.

AlertaScript

No results found.

Search by name, alias, or keyword.