Simple Moving Average: Half a Period Behind
A simple moving average is the arithmetic mean of the last N closing prices, recalculated on every new bar. Because all N bars carry equal weight, the average age of the data inside it is half the period, which is exactly how far behind price the line sits.
Covered on this page: TradingView.
How it works
Add up the last twenty closing prices, divide by twenty, and plot the result. Do it again on the next bar with a window shifted forward by one. That line is the simple moving average, and there is nothing else in it.
The word “simple” is doing real work. It distinguishes this from the weighted versions, and what it means is that every bar inside the window contributes exactly the same amount. The close from twenty bars ago is as important as today’s.
That single design choice produces every property the line has — good and bad — and most pages about moving averages never mention it.
The lag is the arithmetic, not a defect
Ask where the “center of mass” of the window sits. With equal weights across twenty bars, the average age of the data in the line is 9.5 bars. In a steadily rising market the average is therefore sitting where price was about ten bars ago.
That is not an imperfection to be engineered away. It is what an average of past prices is. Any line built from the last twenty closes is a statement about the last twenty closes, and the middle of that window is nine and a half bars back whatever you do to the formula.
Which is why “is it lagging?” is the wrong question and “how much lag am I buying?” is the right one. The number is computable in advance: roughly half the period for this kind of average. A 50-period average is centered about 24 bars behind. A 200-period average is centered about 100.
So the period setting is a single dial with smoothness at one end and timeliness at the other. There is no setting that gives both, and a page recommending one specific number without saying what it is trading away is not telling you what the number does.
The drop-off effect almost nobody explains
Each new bar does two things to the average: it adds a value and it removes one. The line can therefore move meaningfully on a day when price barely moved at all, purely because the bar dropping out of the back of the window was unusual.
This is specific to the equal-weight design. An exponential moving average never drops a bar out — it fades it — so it has no equivalent event. A simple average has a hard edge, and that edge is a real source of movement that has nothing to do with what is happening now.
Practically: if a simple average turns and you cannot see why on the right-hand side of the chart, look at the left-hand edge of its window. That is often the whole story.
In practice: what it is genuinely useful for
The slope is the honest reading. Rising, falling or flat is a summary of the last N bars that your eye cannot produce reliably on its own, and it is available at a glance. That is a genuine service.
The crossing is the weaker reading, because price crosses an average constantly and most crossings mean nothing. Moving average crossover covers what happens when you trade them: a fast pair such as 5/10 can hand you several times as many decisions as a 20/50 on exactly the same data.
The 200-period average is a special case, and the reason is not statistical. It is watched by enough people, quoted in enough headlines and coded into enough systems that price reaching it produces real behavior. That is a self-fulfilling effect and it is the one honest argument for a specific setting. It is not that 200 measures something 180 does not.
It sees no volume at all. A bar that traded a thousand contracts and a bar that traded four count identically. If you want participation in the average, that is the volume-weighted version, and it is a different tool.
A gap drags the line without a single trade inside the gap. The close is the close; the average does not know the market was shut. On instruments that gap regularly this produces lines that jump in ways nobody’s mental model of “a smooth average” predicts.
Placing a stop at the average puts it at a price a great many people can compute exactly. That cuts both ways: the level attracts genuine reaction, and it also sits where resting orders cluster, which is precisely the sort of place price reaches for.
Every crossing you act on pays a round trip in spread and commission. Most people price the losing trades and forget the fee on every trade; at $10 a round trip, a setting that crosses 30 times a year costs $300 and one that crosses 10 times costs $100, for the same underlying moves.
And nothing in the order book is aware of it. The average is drawn by your platform from prices that already happened. Whatever reaction occurs at the line comes from other people drawing the same line, not from the line itself.
What a simple moving average is not
It is not a prediction. It is a summary of bars that have already closed, and it contains no statement about the next one.
It is not support or resistance in the structural sense. Support and resistance describes a price where trading actually happened. An average is a computed value that moves every bar, and price “respecting” it is a much weaker claim than price respecting a level it visibly turned at three times.
It is not made better by a longer period. Longer is smoother and later. Those are the same adjustment described twice.
And it is not independent of other averages. Two averages on one chart are two summaries of the same closes, which is the whole subject of the confluence page.
How this connects
The average of closes over a window, weighted equally. The exponential moving average is the same idea with recent bars counting more.
The difference between them is smaller than it is usually sold as - one turns slightly sooner and whipsaws slightly more, which are the same property from either end.
It is the component inside many other tools - Bollinger bands, envelopes, ribbons and most crossover systems.
The MA crossover is the standard application, and its lag is structural: both lines summarize bars that have already printed.
And the widely watched periods can be self-fulfilling. The 50 and 200 attract orders because enough people watch them, which is a real mechanism and a different one from the arithmetic.
When it fails
A range is where it does the most damage. Price oscillates around the mean, so the mean sits in the middle and gets crossed on almost every leg. Every crossing looks like a signal and none of them is one, and this single regime accounts for most of the money lost to averages.
The second failure is the period hunt. Testing 18, 19, 20, 21 and 22 on past data and keeping the best one is fitting a parameter to noise. The differences between adjacent periods are far smaller than the differences between market regimes.
A third is treating the line as a level. It moves every bar. A stop “at the average” is at a different price tomorrow, which makes risk on the position a moving target rather than a decision.
A fourth is switching period after a loss. The average did not fail; the market changed regime. A new period will work well in the regime that just ended and badly in the next one.
And a fifth is stacking several of them and calling it analysis. A ribbon of ten averages is ten views of one price series. It looks like ten pieces of evidence and it is one.
The original data
On the S&P 500 from 1950 to 2026, 53.1% of trading days closed up and 59% of ten-day windows finished higher. That drift reframes the “price is above the 200” observation completely: in a market that trends upward over the sample, being above the long average is the ordinary state, not a signal.
The other figure worth having is the crossing count, and no published number substitutes for your own: a 5/10 pair, a 20/50 and a 50/200 on the same chart produce very different totals. Run that count on your own instrument before you choose a period. It takes ten lines of code, and it tells you how many decisions the setting is going to hand you per year — which is the number that actually determines what the tool costs you.
Related
Moving average is the parent page covering the family as a whole. Exponential moving average is the alternative weighting, and the comparison is more interesting than it is usually made to sound. And moving average crossover is what most people actually do with two of these lines.
I do not hunt for the right period as though one of them is correct and the rest are wrong. What you are really choosing is how late you want to be told, and once you see it that way the question gets much smaller and much easier to answer.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money. Some links on this page earn a commission if you buy through them. It costs you nothing and it does not decide what appears here or in what order — how these pages are made is set out in our methodology.