I have a couple questions after looking into security prices vs the SMA returned for a set of security...

I am logging the price for a given security by accessing 'security.Price' inside of an alpha. The first number is the price returned, and the second is the SMA with a window of 5 days.

2020-07-20 09:31:00 : UPRO: 50.07, 49.112 2020-07-21 09:31:00 : UPRO: 52.17, 49.984 2020-07-22 09:31:00 : UPRO: 51.42, 50.552 2020-07-23 09:31:00 : UPRO: 52.25, 51.018 2020-07-24 09:31:00 : UPRO: 49.59, 51.208

1) Are the prices returned by 'security.Price' the closing price for the day? Opening? I couldn't find them matching up perfectly with daily charts I was looking at from other sources.

2) How is the SMA calculated? It was my understanding that the simple moving average is the sum of the prices in the lookback window divided by the lookback length. In this case (50.07 + 52.17 + 51.42 + 52.25 + 49.59) / 5 would give me the 5 day SMA right? This equals $51.10, and this doesn't seem to align with the 51.208 displayed. Does the SMA calculation not use the same values that would be returned by 'security.Price'?

Note: I am using 'self.EnableAutomaticIndicatorWarmUp = True' this shouldn't have any affect on these values should it, as opposed to other warmup methods?

Thanks for any tips or info you have!