Verdict · Technical Analysis
Moving Averages as a Trend Filter: Pick the Side, Then the Entry
A trend filter is the job moving averages do most reliably. Using moving averages as entry signals means trading crossovers that lag by construction, so the timing has to come from somewhere closer to price.
The verdict
Use moving averages to decide which side of the market to trade, and take entry timing from pullbacks, since crossovers are late by construction.
Trade long only while price is above a rising 50-day moving average. That one rule does more for a swing trader than any crossover signal, and it is where a moving average earns its place on the chart. The rest of the job, timing the entry, is better done closer to price, because an average of past closes has to lag the closes it is built from.
The simple and exponential averages, worked
A simple moving average is the mean of the last N closes. Nothing more.
An exponential moving average gives more weight to recent closes. Each day it moves a fixed fraction of the way from yesterday’s value toward today’s close: new EMA = prior EMA + k x (today’s close - prior EMA), where k = 2 / (N + 1). The exponential moving average definition covers how the weights decay.
Look at what happened. The stock closed at $24, and the average moved to $21.87. It covered less than a fifth of the gap. That is the lag, in numbers, and it is built into the formula. The moving average calculator will run either version over a longer series.
Which one to use? For the filter, the difference is small, because a 50-day line is slow either way. For the pullback line, the EMA hugs price a little more closely after a fast move. Choose one per job and keep it.
Why crossovers arrive late
A crossover fires when a short average moves above a long one, or when price moves above an average. For that to happen, enough recent closes have to be high enough to drag the average up past the other line. By the time the signal prints, the move that produced those closes is already on the chart.
That is fine for a filter. A filter only has to say “the trend is up”, and a late confirmation of a trend that lasts months still leaves most of it ahead. It is poor for an entry, where a late signal means buying after the easy part, often near the top of a short-term leg, with the stop a long way below. The golden cross and death cross are the best-known examples: the 50-day crossing the 200-day marks a change that has usually been under way for weeks.
A rule set built on that split
Here is the verdict as rules you could copy into a plan.
Take longs only when price sits over a 50-day that is still climbing. That is the filter, and it decides the side.
Buy pullbacks toward the 20-day. Inside an uptrend, a dip to the shorter average puts your entry close to a level buyers have been defending, which keeps the stop near.
Exit on a daily close below the 50-day. The filter has switched off, and the case for holding went with it.
Each rule has one job. The 50-day is slow enough to ignore a bad week and fast enough to catch a trend that has actually ended, while the 20-day is close enough to price that a pullback to it is a normal event in a healthy advance and a sensible place to put money to work with a tight, definable risk.
Walk it through on a hypothetical stock. Price is $100, the 50-day sits at $92 and has been rising for weeks, and the 20-day is at $97. The filter says long. Over the next few days the stock slips to $97.50 and closes up off the 20-day, so you buy there, with a stop under the pullback low at $94.00, which is $3.50 of risk a share. From then on you get out at the $94.00 stop or when a daily close lands under the 50-day, wherever that average has climbed to by then, which in a long advance can sit well above your entry and lock in most of the move without you ever having to guess where the top is.
The objection: the lengths are arbitrary
Why 20 and 50, and not 18 and 47? No good reason. The common lengths, 10, 20, 50 and 200, are conventions.
Their value comes partly from use. Because many traders watch the same averages, orders gather near them, which gives price a reason to react there. An 18-day average might have fitted last year’s chart slightly better, but nobody else is watching it, and a length picked because it fitted the past is curve fitting that will not repeat.
Keep the conventional lengths. Change them only for a reason you can state in advance, and test the change on data you did not use to choose it.
Where moving averages fail
They fail in sideways markets. When a stock trades in a range, price crosses the average back and forth, a rising 50-day turns flat and then dips and rises again, and every signal you take loses a little, until a string of small losses adds up to a large one. Nothing in the average warns you that a range has started. You see it only after several crosses.
So add one more rule. If price has crossed the 50-day several times in a few weeks and the average itself is flat, stop taking trend trades in that stock. Mark the range edges instead, or move on to a stock that is trending. A way to test the rules on your own charts before risking money is set out in how to backtest a moving average strategy, and other trend tools sit under technical analysis.
Questions traders ask next
Is the EMA better than the SMA for swing trading?
Neither is better across the board. The EMA weights recent closes more heavily, so it turns sooner after a change in direction and also reacts more to single sharp days. The SMA treats every close in its window equally and moves more steadily. Pick one for each job in your plan and use it consistently.
Why is the 200-day moving average so widely watched?
Mostly because it is widely watched. Many investors, traders and commentators use it as a line between a long-term uptrend and downtrend, so orders and attention gather around it. Its length is a convention with no special property, and its usefulness depends partly on how many market participants keep looking at it.
Should I buy when price crosses above the moving average?
A cross above a moving average tells you the recent closes have moved higher than the average of older closes, which by the time it happens usually means much of the move has already occurred. It works better as a condition that allows long trades than as the trigger itself. Time the entry with a pullback or a price pattern.