amv-dev / yata

Yet Another Technical Analysis library [for Rust]
Apache License 2.0
329 stars 52 forks source link

MACD implementation #48

Open SeanEClarke opened 3 months ago

SeanEClarke commented 3 months ago

I was migrating from some previous C++ and Rust () indicators and I noticed the MACD has completely different values to what I expected. I also checked on Yahoo finance and the difference was also apparent. Looking at your implementation, there is no K (multiplier) used - to be fair, I have seen MACD formula's online (inc Wikipedia I think) that do not utilise a multiplier, however a great many MACD implementation do, including TradingView.

https://www.investopedia.com/ask/answers/122414/what-moving-average-convergence-divergence-macd-formula-and-how-it-calculated.asp