My technical indicators way of, can someone take a look where my error is?

Example with a 5 day simple moving average Indicator.
I believe a SMA indicator is generated from the last 4 days closing prices and the current price
So, for SPY, x = [310.62, 308.64, 311.78, 311.66, 313.60] where the last index is the current price at 2:15. Trying to get the simple moving average on this returns 311.26 when my broker says the 5 SMA is closer to 313.62. Can someone point out my error here, and let me know how to accurately calculate a simple moving average indicator? Thank You.

They may be using different numbers for example the mid point (high+low/2) or previous 5 days excluding current day.