webull
webull copied to clipboard
How to calculate MACD to match Webull number?
Hello,
I've looked at several ways to calculate the MACD indicator but the numbers seem to always be off of what Webull shows. Does anybody know of a way to get the accurate numbers?
Thanks
I don't know if it will be exactly the same as webull but you can use python stock indicators:
https://daveskender.github.io/Stock.Indicators.Python/indicators/Macd/#content
When I use it, it is sometimes off by a little but I don't know why. Webull probably calculates everything slightly differently.
The only way to really know if it’s accurate is to calculate it manually and compare. I have both code example in C#, the underlying algo for that Python package, and a manually calculated spreadsheet that you can drop in your raw quotes that might help. One side note, MACD can have convergence related errors in early warmup periods:
:hourglass: Convergence warning: The first
S+P+250
periods will have decreasing magnitude, convergence-related precision errors that can be as high as ~5% deviation in indicator values for earlier periods.Where
S
is slow periods andP
is signal periods