macdline
MACD line (fast EMA − slow EMA)
Reference/Oscillators/Function
macdline(source, fast, slow, signal)
Defaults close, 12, 26, 9. Short form macdline() or macdline(12, 26, 9) uses close. Sisters: macdsignal, macdhist.
Parameters
| Name | Type | Description |
|---|---|---|
sourceoptional | series default close | Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9). |
fastoptional | int default 12 | Fast EMA. |
slowoptional | int default 26 | Slow EMA. |
signaloptional | int default 9 | Signal EMA of the MACD line. |
Return value
series
Short form: if the first argument is a number, Dovee uses close as the source.
Example
oscillator m = macdline() s = macdsignal() h = macdhist() plot m as "MACD" blue plot s as "Signal" orange plot h as "Hist" gray when m crosses above s then buy