Source-checked October 3, 2026 · Technical analysis education
An SMA setting is a hypothesis to test. The number on the chart does not establish a trading edge.
There is no universal “best SMA” established by the evidence reviewed for this guide. A useful comparison starts with the instrument, chart interval, trading session and a complete set of decision rules. This guide explains how to choose a lookback to investigate and how to challenge the result.
A 20-period average on a five-minute chart differs from a 20-day average.
A smooth line or a profitable screenshot does not measure a strategy’s performance.
Start with the chart interval
A simple moving average, or SMA, takes the arithmetic mean of a selected number of prices. With closing prices selected, a 20-period SMA uses the latest 20 bar closes. Longer lookbacks generally produce a smoother, slower-moving line; that does not establish greater trading accuracy.
Write the full configuration as, for example, “20-bar SMA, five-minute candles, closing prices, regular-session data.” The lookback alone leaves too much unspecified.
Scroll across the table to see all columns.
| Lookback | One-minute bars | Five-minute bars | Daily bars |
|---|---|---|---|
| 10 bars | 10 minutes of bars | 50 minutes of bars | 10 daily observations |
| 20 bars | 20 minutes of bars | 100 minutes of bars | 20 daily observations |
| 50 bars | 50 minutes of bars | 250 minutes of bars | 50 daily observations |
These are arithmetic illustrations, not recommended settings. The minute totals assume consecutive, complete time-based bars. Overnight closures, missing bars, halts and session filters can make the elapsed clock time longer. A daily bar is an observation for a trading session, not necessarily a calendar day.
A 50-day or 200-day average can supply longer-term context on a separate chart. It should not be described as a short intraday lookback merely because the person viewing it day trades. Tick, volume and range bars also do not represent a fixed number of minutes.
See exactly what rolls out of the average
For a closing-price SMA, add the most recent N completed closes and divide by N. At the next close, remove the oldest included price and add the newest. The following prices are invented to make the arithmetic visible; they are not a stock’s trading record.
Scroll across the table to see all columns.
| Observation | Five closes included | Sum | SMA |
|---|---|---|---|
| Initial window | $100, $102, $101, $103, $104 | $510 | $102.00 |
| Next completed bar | $102, $101, $103, $104, $99 | $509 | $101.80 |
The latest close falls from $104 to $99, while the SMA moves down only $0.20. The change in the average is ($99 − $100) ÷ 5. That is a consequence of its calculation, not evidence that the price will recover toward the average.
An unfinished candle changes the question
If a platform updates its average while the current candle is forming, an apparent crossing can disappear before that candle closes. Specify whether your rule uses completed bars or live updates, and compare results using the same convention.
Choose the job before choosing the number
A research question might be, “Does this average help describe the broader intraday direction?” Another might be, “What happens after price closes across this average?” Those are different questions. A descriptive trend filter is not automatically an entry or exit rule.
Start with a small, documented set of candidate lookbacks. Keep the instrument, data source, session and decision timing fixed while comparing them. Changing all of those together makes it difficult to explain why a result changed. No candidate numbers in this article have been validated as profitable.
SMA and EMA are different moving-average calculations. An EMA is not an “exponential SMA.” See the companion SMA-versus-EMA guide for a side-by-side calculation before changing both the average type and its length.
A practical testing checklist
- Write an executable rule. Specify what is observed, when an entry may be submitted, the exit condition, position sizing and what happens before the session ends. “Buy when it looks strong” is not a reproducible rule.
- Record the data choices. Note the symbols, dates, bar interval, session filter, price adjustments and warm-up history. Retain losing trades and quiet periods, not only attractive chart examples.
- Respect the timing. A decision based on a completed bar’s close is available after that close is known. Do not automatically assume an order triggered by it could also fill at that exact historical price.
- Separate development from evaluation. Set aside later data before tuning. Repeatedly adjusting settings after seeing that data turns it into more development data. Keep a record of every variation tried.
- Include implementation costs. Use the intended broker’s applicable fees and realistic assumptions for the bid–ask spread, slippage and any borrowing. A zero commission does not remove every trading cost.
- Report the weak points. Record trade count, net results, peak-to-trough drawdown and losing streaks. Check whether a few trades dominate and whether nearby lookbacks materially change the conclusion.
QuantConnect’s research guidance explains overfitting, future-information leakage and survivorship bias. These can make historical tests look more convincing than they are. The checklist above is an InvestPips research framework, not a completed backtest or proof that a chosen rule will work.
For a cost illustration, suppose a hypothetical test shows $0.08 of average gross profit per share per completed round trip. Assuming $0.05 of combined entry-and-exit execution costs leaves $0.03; assuming $0.10 leaves a $0.02 loss. Those invented assumptions demonstrate sensitivity to costs. They are not estimates of typical trading expenses or returns.
Separate indicator settings from risk controls
FINRA’s day-trading risk disclosure warns of substantial losses and the possibility of losing all funds committed to day trading. Borrowing and short selling can produce losses beyond the initial investment. An SMA does not change those exposures.
A stop price is not a guaranteed exit price. FINRA’s stop-order guidance explains that a triggered stop-market order may execute at a worse price, while a stop-limit order may not execute. A position-size calculation based on an assumed stop distance therefore describes a plan, not a maximum possible loss.
Before any live trading, understand your broker’s current account restrictions, order handling and cash or margin requirements. This article does not assess suitability or establish that day trading is appropriate for you.
Continue with the mechanics
Compare SMA and EMA calculations · Explore a hypothetical position size · Build a longer-term investing plan
Sources and method
Substantively rewritten October 3, 2026. Sources linked beside the relevant claims are Fidelity’s indicator education, QuantConnect’s research documentation and FINRA’s risk and order guidance. InvestPips created and checked the numerical examples. They are synthetic illustrations; we did not run a market-data backtest, measure a win rate or verify any trader’s results.
The scope is SMA lookback selection and testing, principally in a U.S. stock-trading context. It is distinct from the companion guide’s comparison of average types. Read our editorial and advertising standards. Advertising is separate from the educational analysis.
What changed in this update
Removed the unsupported “John” success story and profitability claims. Corrected the treatment of EMA as a type of SMA and the mixing of intraday bars with daily averages. Replaced duplicate, unrelated heading IDs and added working navigation, direct sources and checked examples. The original URL and publication date remain intact.
Educational information, not personalized investment advice or a recommendation to trade. Historical and simulated results do not guarantee future performance.