Very basic question but how do we go about calculating live SMA values correctly ourselves given we can access the current price of a stock at any interval (I’m using polygon.io)? Suppose I want a SMA with a period of 9. I tried getting the mark prices every second and then (once I had at least 9) did a rolling average calculation with a period of 9. However, when I plot my price vs SMA calculation, it doesn't look like the SMA with a period of 9 reported on TradingView or inside TD Ameritrade/ToS's SMA live technical chart. Any suggestions?
Submitted October 14, 2020 at 01:47PM by codininja1337