ta.macd
MACD: returns [macdLine, signalLine, histogram]. macdLine = ema(fast) - ema(slow), signal = ema(macdLine, signal).
ta.macd(source: float, fastlen: simple int, slowlen: simple int, siglen: simple int) -> series [float, float, float]
Parameters
sourcefloat: The values to use, usually close or another price; a series that may change on every bar.fastlensimple int: Bars of the fast EMA; a literal or an input, 1 to 5000.slowlensimple int: Bars of the slow EMA; a literal or an input, 1 to 5000.siglensimple int: Bars of the signal line, an EMA of the MACD line; a literal or an input, 1 to 5000.
Example
[m, s, h] = ta.macd(close, 12, 26, 9)