My noob understanding of something like 9EMA is factoring the close value of the previous 9 days. That makes sense.
You're close. This is true for a 9-day SMA specifically. The 9 in a 9 S/EMA can be 9 of any time unit. Whatever unit a single bar is in your chart (the "Period"), that's what will be used. So if you want a 9-day EMA, you'd choose a:
- Length = 9 and
- set your Period to be Days
Length = 9
Period = Day
What is the formula for that concept but using minute bars?
It's exactly the same, except discrete close data is taken every minute instead of every day.
EMA(t) = Price(t)×k – EMA(t–1)×(1 – k)
where k = 2 / (N+1)
N = 9 in your example
Notice that this is weighted more heavily toward the most recent time data compared to prior time data. This makes the EMA more of a leading indicator than the SMA (or, rather, less of a lagging indicator).
Also note that it's recursive in nature.
Is it comparing the current minute close value to the same minute the previous 9 days?
No. If you're looking at the minute chart, your Period is a Minute. A 9 EMA would most strongly be influenced by the price 1 minute ago, 2 min ago, 3 min ago, and with each minute before having less and less impact. Price from 2 days ago, let alone 9, has no bearing on a 9 1min EMA.
Or is it a simple average of all the closing values from the day so far and the final close of the previous 8 days?
You're overcomplicating it. The previous days have no significance on a 9 1min EMA. The last 8-9 minutes are the only things that are important.
In the event that you want the last several days to be relevant, you should switch to a 9 Day EMA or a 50 4hr EMA.
Or even more complex... the average of each minute close, each day.
If your Period is a Minute, then in order to account for every minute of the last 9 trading days, your length would have to be:
- Length = 4050, because there are 7.5 hrs / day and 60 min / hr
But no one trades like this.