![]()
By Andrew Stowers
Updated August 28, 2026
Table of Contents
Toggle- What Is a Moving Average? The Short Answer
- The Three Types and How Each Is Calculated
- Choosing the Period: The Only Parameter You Set
- Lag: The Cost You Cannot Remove
- The Conventional Periods and What They Are Actually For
- Four Ways Traders Actually Use Them
- When Moving Averages Fail: The Whipsaw Problem
- Curve-Fitting: Why Your Backtest Lies
- Building a Moving Average Into a Rules-Based System
- The Bottom Line on Moving Averages
- Frequently Asked Questions
Traders spend enormous energy arguing about simple versus exponential and almost none deciding how many periods to average. That is backwards. Switching a 50-day simple moving average to a 50-day exponential nudges the line; switching from 50 periods to 20 changes what the indicator is for entirely. The type is a preference. The period is the parameter, and it determines whether you are looking at a regime filter, a swing guide, or noise with a line drawn through it. Our stock trading guide covers where trend tools sit in a rules-based method. This article walks the three calculations, shows how to derive a period from your holding horizon, quantifies the lag every other guide only mentions, and covers the two ways the tool reliably fails.
What Is a Moving Average? The Short Answer
| Quick Answer
A moving average is a line that plots the average price of a security over a set number of recent periods, recalculated as each new period arrives. It smooths short-term noise so the underlying trend is visible, and it is the most widely used indicator in technical analysis. |
A Rolling Window, Not a Forecast
The mechanic is simple. Take the last N closing prices, average them, plot the result. Tomorrow, drop the oldest close, add the newest, and plot again. The window slides forward one period at a time, which is where the name comes from. Nothing about the calculation involves predicting anything — a moving average describes what price has already done, more legibly than the raw series does.
That distinction matters more than it sounds. A moving average is a filtering tool applied to a noisy signal, not a forecasting tool. Traders who treat the line as a prediction are asking it to do something its arithmetic cannot do.
The Trade-Off That Governs Everything Else
More smoothing gives you a cleaner read on direction and a later read on direction. Less smoothing gives you a faster read and a noisier one. Those are the same dial viewed from opposite ends, and there is no setting that gives you both. Every decision in the rest of this article — which type, which period, which application — is a position on that single trade-off.
It Is the Base Layer of Almost Everything Else
MACD is the difference between two exponential moving averages. Bollinger Bands are a moving average with standard deviation bands around it. Many oscillators smooth their own output with one. Understanding the parent concept properly makes a large share of the indicator library legible at once, which is a better return on the effort than learning any single derived tool.
The Three Types and How Each Is Calculated
Three weighting schemes cover essentially all practical use. The arithmetic is worth seeing once, because it explains the behaviour.
Simple, Weighted, Exponential
Simple. Add the closes over N periods and divide by N. Take five closes of 20, 22, 21, 24, and 23. They sum to 110, divided by five gives a 5-period simple moving average of 22.0. Every one of those five days carried identical weight — the close from five days ago mattered exactly as much as yesterday’s.
Weighted. Scale the weights linearly toward the present. On the same five closes you would weight them 1 through 5, multiply, sum, and divide by 15, which is the sum of the weights. The result leans toward recent prices without discarding the older ones.
Exponential. Apply a smoothing multiplier of 2 divided by (N+1). For a 20-period average that is 2 divided by 21, or about 0.095. Each new value is the current close times 0.095, plus the previous average times 0.905. Weight decays geometrically, so old data never fully drops out of the calculation — it just fades toward irrelevance.
How They Compare in Practice
| Type | Weighting | Behaviour | Best for |
|---|---|---|---|
| Simple | All periods equal | Smoothest; slowest to turn | Regime filters, long horizons |
| Weighted | Rises linearly to present | Between the other two | Medium-term work |
| Exponential | Decays geometrically | Fastest to turn; more false signals | Shorter horizons, timing |
The Comparison Most Content Overstates
Here is the part worth internalising. The difference between a 50-period simple and a 50-period exponential is real but small — the exponential turns a few days sooner and sits marginally closer to price. The difference between a 50-period and a 20-period of either type is not small; those two lines answer different questions and will disagree for weeks at a time. If you are choosing between types, you are optimizing a rounding error. Our detailed treatments of the exponential moving average in detail, simple versus exponential, and weighted moving average forecasting cover each variant in depth.
Choosing the Period: The Only Parameter You Set
Almost every guide on this subject tells you that the 50-day and 200-day are popular and moves on. That is a description of what other people do, not a method. Here is a method.
Match the Lookback to the Move You Intend to Hold
The rule is that the period should be on the order of the duration of the move you are trying to capture. The reasoning is mechanical rather than aesthetic. An average much shorter than your intended hold will turn against you inside a move that is still intact and shake you out of it. An average much longer than your intended hold will not confirm the move until it is largely over, so you enter late and exit later.
That gives you a starting point derived from your own situation rather than borrowed from someone else’s.
| Trading style | Typical hold | Period range | What it is doing |
|---|---|---|---|
| Intraday | Hours | 5 to 20 bars | Filtering tick noise from session direction |
| Short swing | Days to 2 weeks | 20 to 50 | Separating pullbacks from reversals |
| Position | Weeks to months | 50 to 100 | Confirming an intermediate trend |
| Regime / allocation | Months to years | 100 to 200 | Defining which side you may trade at all |
One Instrument Can Need Two Periods
These bands are not competing answers. A long average defines the regime — whether you should be looking for longs at all — while a shorter one times entries inside that permission. Running a 200-period for direction and a 20-period for timing is not inconsistent; it is the normal structure of a trend system, and the two are answering different questions.
Start With a Conventional Length
The practical default is to begin with a round conventional number in the appropriate band — 20, 50, 200 — and only depart from it with a specific reason. That is not laziness. As the curve-fitting section below explains, a number you did not select from your own data cannot have been fitted to it, and that immunity is worth more than the marginal improvement any optimization will appear to offer.
Lag: The Cost You Cannot Remove
Every article on moving averages mentions that they lag. Almost none says by how much, which is unfortunate, because the answer is calculable and immediately useful.
Roughly Half the Lookback
A simple moving average of N periods sits approximately (N minus 1) divided by 2 periods behind price. The intuition is direct: you are plotting the average of a window at the window’s right edge, but the average is centred on the window’s middle. The line is showing you where the middle of the last N days was.
| Period | Approx. lag | In calendar terms | Common use |
|---|---|---|---|
| 10 | ~4.5 days | About a week | Intraday and fast swings |
| 20 | ~9.5 days | About two weeks | Short swing reference |
| 50 | ~24.5 days | About five weeks | Medium-term trend |
| 100 | ~49.5 days | About two and a half months | Intermediate regime |
| 200 | ~99.5 days | About five months | Long-term regime filter |
| An Approximation
The (N-1)/2 figure is a centre-of-mass approximation that holds well for a simple moving average on trending data. Exponential averages reduce effective lag somewhat but do not eliminate it, and effective lag varies with how the series is actually behaving. Treat these as orders of magnitude for planning, not precise measurements. |
What the Lag Actually Costs You
Two things follow, and both are worth accepting rather than fighting. First, a moving average cannot call a top or a bottom — by construction it turns after price does, so any system built on one gives up the first portion of every move and the last portion of every move. That is not a flaw in your implementation. It is the price of the smoothing. Second, expectations should be set accordingly: the tool is for capturing the middle of moves, and a strategy that needs the extremes needs a different tool. Our guide to forecasting with moving averages covers the projection use case and its limits.
It is also worth knowing why the lag cannot be engineered away. Every technique that reduces it — exponential weighting, double smoothing, adaptive periods — works by putting more weight on recent data. Push that far enough and the line converges on price itself, at which point it has stopped filtering anything and is useless as a trend reference. Zero lag and useful smoothing are the same quantity in opposite directions.
The Conventional Periods and What They Are Actually For
The widely watched lengths deserve an honest explanation, because the usual one implies a mathematical property they do not have.
What Each One Is Used For
The 200-period is the standard long-term regime filter. Above it with the slope rising, the long side is favoured and risk can be carried; below it with the slope falling, exposure is typically reduced. This is the most common institutional application of any moving average, and it is a filter rather than a signal.
The 50-period is the medium-term trend reference and the most frequent component in crossover systems. The 20-period serves short swings and is the standard centreline for Bollinger Bands. Faster settings of 10 periods or less belong to intraday work, where the noise floor is higher and the holding period is measured in hours.
Why They Matter, Honestly
None of these numbers is optimal in any mathematical sense. There is nothing special about 200 trading days; it is roughly ten months, which is a convenient interval and nothing more. What makes these levels meaningful is that a very large number of participants and institutional mandates watch them, so behaviour clusters around them. The significance is behavioural and self-reinforcing rather than intrinsic.
That is a better reason than mystique, and it has a practical implication. If the value of a conventional length comes partly from being widely watched, then optimizing your way to a 63-period average actively discards that benefit in exchange for a fit to your own historical sample.
Four Ways Traders Actually Use Them
The applications differ in how rule-like they are, which matters more than how popular they are.
- Trend filter — the slope of the average and price’s position relative to it together define which direction you are permitted to trade.
- Dynamic support and resistance — price frequently reacts near a widely watched average, though this is the least mechanical of the four.
- Crossover signals — a shorter average crossing a longer one, including the golden and death cross.
- Volatility band centreline — the average is the midpoint and bands are placed a number of standard deviations away.
The Filter Is the Valuable One
Of the four, the trend filter earns its place most reliably, and for a reason worth stating plainly: it removes trades rather than generating them. A rule that says you may not take long entries while price is below a falling 200-period average does not tell you what to buy. It tells you when not to, and eliminating an entire category of low-probability trades is a larger contribution to a result than any entry signal.
Crossovers Compound the Lag
Crossover systems are popular because they are unambiguous — the lines either crossed or they did not. The cost is that you are now waiting on two lagging inputs rather than one, so the signal arrives meaningfully later than either average alone would suggest. That is survivable in a strong trend and expensive in a choppy one. Our treatment of the crossover strategy covers the mechanics and the confirmation rules that make it workable.
Dynamic Support Deserves a Caveat
Price does often bounce near a well-watched average, and it is genuinely useful as context for where to look for an entry. But it is not a rule — an average is a moving line with no memory, and treating a touch as a buy signal without confirmation is where this application turns into wishful pattern-matching.
When Moving Averages Fail: The Whipsaw Problem
A moving average is a trend tool. Applied to a market that is not trending, it does not merely fail to help — it actively generates losses, and it does so quietly enough that most traders misdiagnose the cause.
The Mechanism
When price oscillates around the average in a range, every oscillation produces a crossing, and every crossing produces a signal. Each round trip costs the bid-ask spread, slippage on both sides, and short-term tax treatment on any gain. Six whipsaws in a flat year can cost several percent while the instrument finishes exactly where it began, and the equity curve bleeds down in small increments that never look like a disaster.
Shorter periods whipsaw more. That is the cost side of the responsiveness people select them for, and the two cannot be separated.
Three Mitigations and What Each Costs
Require a confirmation delay of two to three closes beyond the average before acting, which filters marginal crossings and delays every genuine one. Require price to clear the average by a band — a fixed percentage or a multiple of average true range — rather than merely touching it, which filters noise and pushes your entry further from the level. Require slope agreement, taking signals only when the average is itself moving in the signal’s direction, which is the most effective of the three and also the slowest.
Every one of those adds lag. That is not a defect in the mitigations; it is the same trade-off from the opening section appearing again. You are choosing which error to make more often, not eliminating error.
The Diagnostic
If an instrument has produced repeated crossings without follow-through over recent months, the tool is mismatched to current conditions rather than broken. The correct response is to stand aside or reduce size on that instrument, not to shorten the period in search of a signal that the market is not currently offering.
Curve-Fitting: Why Your Backtest Lies
A great deal of published content on this topic reports an optimized period as though it were a discovery. It is worth understanding why it usually is not.
Selection Is Not Discovery
Test thirty period lengths on a sample and one of them will produce the best result. That is arithmetic, not evidence — with enough candidates, some length fits any given history by chance. The length that fit best in the past is not the length most likely to work next, and the gap between those two things is precisely what destroys strategies that looked excellent on paper.
Peaked Versus Plateau
There is a useful diagnostic. Plot performance across the whole range of periods you tested rather than just reporting the winner. If the result is a sharp spike at one length with poor performance on either side, you have found an artefact — small changes in a parameter should not produce large changes in outcome if the effect is real. If the result is a broad plateau where a wide band of periods all perform reasonably, that describes something structural, and you can pick anywhere in the middle of the plateau with reasonable confidence.
Three Guards
First, prefer round conventional lengths, because a number you did not choose from your data cannot have been fitted to it. Second, require any result to hold out of sample and on related instruments before you trust it — an edge that exists on one ticker in one period is not an edge. Third, count your parameters. Every additional tuned condition multiplies the fitting surface, and a system with six optimized inputs has almost certainly been fitted to its history regardless of how principled each individual choice felt at the time.
Building a Moving Average Into a Rules-Based System
Assembled into something executable, the tool sits at the filter layer rather than the trigger layer.
The Four-Step Structure
Step 1: Define regime with a long-period average and its slope. Both conditions, not one. Price above a falling average is a different situation from price above a rising one, and requiring agreement between position and slope removes most of the ambiguous cases.
Step 2: Take entries only in the permitted direction. A shorter average, a price event, or a pattern provides the timing inside that permission. The regime filter is not generating the trade; it is defining which trades you are allowed to consider.
Step 3: Put the stop on structure, not on the average. This one is commonly done wrong. A moving average is a lagging line, so a stop placed at it triggers well after the level that actually invalidated your thesis, and it drifts while you hold. Use the prior swing low or high — a fixed price with a structural meaning — and let the average govern whether you are in the trade at all rather than where you exit it.
Step 4: Write the invalidation condition before entering. Not a price level, but the market condition that would tell you the regime read is wrong: a slope that flattens, a decisive close through the long average, or a sequence of failed signals indicating range conditions.
Where This Belongs
In the core/satellite framework, the regime filter governs the rules-based active satellite — it decides when that sleeve is deployed and in which direction. The passive core is not traded on moving average signals, because a long-term compounding allocation should not be exiting on a crossing. This article is educational and is not individualized investment advice.
The Bottom Line on Moving Averages
The type of moving average you use is close to a preference; the period you choose determines what the indicator is actually for. Lag is the unavoidable cost of the smoothing that makes it useful, and the tool works in trends and loses money in ranges — none of which is a defect to be optimized away.
The framework:
- A moving average smooths price to reveal trend; it describes what happened rather than predicting what will.
- Simple, weighted, and exponential differ in weighting, and the gap between them is smaller than the gap between two period lengths.
- Match the period to the length of move you intend to hold, not to convention.
- A simple average of N periods lags by roughly (N-1)/2 — a 50-period sits about 25 days behind price.
- The 50 and 200 matter because everyone watches them, not because the numbers are optimal.
- The trend filter is the most valuable application because it removes trades rather than generating them.
- Ranging markets produce continuous false signals, and every mitigation costs additional lag.
- Put stops on structure rather than on the average, and prefer conventional periods to fitted ones.
| Trend Rules, Maintained Through the Cycle
At AboveTheGreenLine.com the trend framework is the product — regime defined by a long-term moving average and its slope, entry confirmation inside that permission, structural stop placement, and written invalidation conditions set before the trade. The indicator is not the hard part; applying the same rules through a losing streak is. Join us Above the Green Line. |
Frequently Asked Questions
What is a moving average?
A moving average is a line that plots the average price of a security over a set number of recent periods, recalculated as each new period arrives. Take the last N closes, average them, plot the result, then drop the oldest and add the newest as each period completes. Its purpose is filtering rather than forecasting — it smooths short-term noise so the underlying direction becomes legible. It is also the base layer of many other indicators: MACD is built from two exponential moving averages, and Bollinger Bands use one as their centreline.
What is the difference between a simple and exponential moving average?
A simple moving average weights every period in the lookback equally, so the close from fifty days ago influences a 50-day average exactly as much as yesterday’s. An exponential moving average applies a smoothing multiplier of 2 divided by (N+1), so weight decays geometrically and recent prices dominate. The exponential turns faster and sits closer to price, which means it signals sooner and produces more false signals. The practical point is that this difference is small relative to changing the period — a 50-period and a 20-period answer genuinely different questions.
Which moving average period is best?
There is no universally best period, and any source claiming otherwise is describing a fitted result. Match the lookback to the length of move you intend to capture: roughly 5 to 20 periods for intraday, 20 to 50 for short swings, 50 to 100 for position trades, and 100 to 200 for regime filtering. An average much shorter than your hold will shake you out of intact moves; one much longer will not confirm until the move is largely over. Start with a round conventional length and depart from it only for a specific reason.
Why do moving averages lag?
Because every value is an average of prices that have already occurred. A simple moving average of N periods sits roughly (N-1)/2 periods behind price, since you are plotting a window’s average at the window’s right edge while that average is centred on its middle. A 50-day average therefore lags by about 25 trading days and a 200-day by about 100. This cannot be engineered away: every technique that reduces lag does so by weighting recent data more heavily, and pushed far enough the line converges on price itself and stops filtering anything.

