Momentum / Reference
alerta.ta.macd
TradingView-compatible spelling: ta.macd, runs without warnings
Returns MACD line, Signal line and Histogram.
alerta.ta.macd(source, fast, slow, signal) → [macdLine, signalLine, histogram]Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series | Yes | — | Series of values to process. |
fast | int | Yes | — | Fast EMA length. |
slow | int | Yes | — | Slow EMA length. |
signal | int | Not specified | 9 | Signal line length. |
Returns
[macdLine, signalLine, histogram]Example
alerta.ta.macd
indicator("MACD Pro", overlay=false)[macdLine, signalLine, hist] = macd(close, 12, 26, 9)plot(macdLine, { title: "MACD Line", color: color.blue, pane: "oscillator" })plot(signalLine, { title: "Signal Line", color: color.orange, pane: "oscillator" })plot(hist, { title: "Histogram", style: "histogram", pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.