Compute a rolling mean
For n observations, SMA = sum of the last n inputs divided by n. An illustrative sequence 10, 12, 14 has a three-observation SMA of 12. These are constructed values, not market data.
Define readiness
A full-window calculation requires n observations. Specify how the strategy behaves during warm-up and whether current-bar information is complete. An average of closing prices should not be treated as known before that close.
Separate indicator and strategy
An SMA summarizes past observations. A strategy still needs entry, exit, sizing and execution rules. Smoothing changes the response to new inputs; it does not establish predictive value by itself.
Sources & references
References support specific definitions or methodological context. Examples and research checklists are explanatory; no performance result is claimed.