Does the calculation of moving averages include the current price?

Suppose I have the historical closing prices of a stock, and the current real-time price. I want to calculate a simple moving average (SMA).

Historical prices:

Day Closing price
1 \$1.10
2 \$1.20
3 \$1.30

Today is day 4. The markets are still open, and the last trade price of the stock is \$1.35.

At this moment, while the markets are still open, which numbers do I use to calculate a simple moving average? Do I include the last trade price in the calculation? If I want to calculate the 3-day SMA, do I use the last trade price, day 3's price, and day 2's price to calculate the mean? Or should I use day 1's price instead of the last trade price?

• Normally an unweighted, non-accumulative moving average is calculated by the mean of the previous k closing prices.. So I guess the current price shouldn`'t be included. Aug 25, 2021 at 12:03
• Similar question on Stack Overflow: Does SMA include the current day?
– Flux
Sep 9, 2021 at 9:37