Hi everyone !
I accidentally found that the value returned by the talib was not equal to the value computed by the MACD formula.
e.g.
MACD line computed by formula, saved in: macd_formula
EMA12 = talib.EMA(prices, timeperiod = 12)
EMA26 = talib.EMA(prices, timeperiod = 26)
macd_formula = EMA12 - EMA26
MACD line computed by talib, saved in: macd_talib
macd_talib, signal, hist = talib.MACD(prices,
fastperiod=12,
slowperiod=26,
signalperiod=9)
'macd_formula' not equals to 'macd_talib', and has a 5% average difference.
Why this happened ?
Thanks,
Rein