SMA on different time frames

how do you calculate SMA for a different time frame other than daily, say,

SMA20 , sma 100 for a 10 min time frame?

i know i can look at charts and know where the SMA is, but i would love to excel it?

Help me out, please. Thanks , community

Well isn’t that a bit obvious.

Like it’s just a simple average calculation.
If you wanna calculate for hourly then get the data of closing price for every one hour and apply the formula. Or let’s say for 5 min, then get the data of closing price for every 5 min passed and apply the formula.
If you wanna find SMA 200 then get 200 values and apply the formula. It’s very simple.