A moving average is the average of the last N closing prices, recalculated on every new candle: a single line that smooths out market noise and is used to gauge a trend or trigger an entry and an exit. That simplicity hides a real trap, the time lag: the line only reacts after price does. This guide walks through the calculation, the uses, and what published studies have measured on these rules, limits included.
- Simple (SMA) and exponential (EMA) differ in the weight given to recent prices; the EMA reacts faster.
- A moving average is used to gauge trend: price position relative to the line, and the slope of the line itself.
- Crossing two moving averages is a common signal technique, with a well-known inherent lag.
- Lag is a real, documented limitation: better to combine moving averages with other confirmation than trade them alone.
- Published studies are mixed: moving average rules beat their benchmark on the Dow Jones from 1897 to 1986, before costs, and that result did not repeat from 1987 to 1996.
The moving average is a basic indicator, shipped as standard on platforms such as MetaTrader 5, which files it among its trend indicators. A hand-drawn trend line plays the same role, doing the smoothing by eye instead of by formula, and trend line trading is often where a beginner starts before discovering the average. Its promise is simple: smooth out erratic price fluctuations to reveal a more readable direction, the underlying trend, to base an entry or exit decision on.
This guide explains the difference between simple and exponential moving averages, how they're used to gauge a trend, how crossovers work as signals, the well-known limitation of lag, and why practical wisdom is to combine them with other confirmation rather than trade them alone.
Simple or exponential moving average: what changes
The simple moving average (SMA) calculates the arithmetic mean of closing prices over a given number of periods, giving exactly equal weight to every price in the period, whether recent or older. That is the formula in the MetaTrader 5 documentation on the Moving Average: the sum of the closes divided by the number of periods. An example over 5 periods: for closes of 10, 12, 11, 13 and 14, the sum is 60 and the SMA is 12. If the next close is 18, the window slides one step (12, 11, 13, 14, 18), the sum becomes 68 and the SMA 13.6.
The exponential moving average (EMA) applies a different weighting: it gives more weight to the most recent prices, and a declining weight to older ones. A fibonacci calculator does something comparable with distance rather than time, placing levels at fixed fractions of a completed move, and both are ways of turning a subjective read of the chart into a number you can write down before the trade. In practice, this means an EMA reacts faster to a recent price change than an SMA calculated over the same period, since it 'listens' more to what just happened. This added reactivity cuts both ways: it reduces lag but also increases sensitivity to short-term noise.
That weight can be calculated. The smoothing multiplier is 2 / (n + 1), where n is the number of periods: StockCharts' ChartSchool, on its moving averages page, gives the example of a 10-period EMA, which applies 18.18% to the most recent price (2 / 11). The new value is: (close − previous EMA) × multiplier + previous EMA, the very first EMA being seeded with a simple average. Back to the example: over 5 periods the multiplier is 2 / 6, one third. Starting from 12, a close at 18 gives (18 − 12) × 1/3 + 12 = 14. The EMA reads 14 where the SMA reads 13.6: it has tracked the latest price more closely.
There is a third family, the linearly weighted moving average (WMA, labelled LWMA in MetaTrader 5): each close is multiplied by its rank, 1 for the oldest and n for the most recent, and the total is divided by the sum of the ranks. On the same window: (12 × 1 + 11 × 2 + 13 × 3 + 14 × 4 + 18 × 5) / 15 = 219 / 15 = 14.6. None of these versions is better in itself: StockCharts writes that the differences between simple and exponential are clear, yet one is not necessarily better than the other.
| Type | Behavior |
|---|---|
| SMA (simple) | Equal weight to every price; smoother, reacts more slowly |
| EMA (exponential) | Heavier weight on recent prices; reacts faster, but more sensitive to noise |
| WMA (weighted) | Weight proportional to the price's rank; the most recent counts most |
Using a moving average to gauge trend
The most basic use of a moving average is observing price position relative to it. A price that trades durably above its moving average is generally read as a sign of an uptrend; a price that trades durably below, as a sign of a downtrend. This simple reading often serves as a context filter, even before looking for a more precise entry signal.
The slope of the moving average itself gives a second useful piece of information: an average rising sharply reflects an accelerating trend, while a flattening average reflects a slowdown or a range phase, even if price stays technically above it. Combining position and slope gives a richer reading than a simple binary observation of above or below the line.
Moving average crossovers as a signal
A classic technique uses two moving averages of different periods, a short one and a long one, and watches their crossovers. When the short average crosses above the long one, some traders read it as a buy entry signal; when it crosses below, a sell entry or exit signal. StockCharts calls the bullish crossover a golden cross and the bearish one a death cross. It's a mechanical technique, easy to automate, which explains its popularity.
It's important to describe this technique for what it is, a common signal tool, rather than claim that a particular crossover 'works' reliably. StockCharts states the limit plainly: moving average crossovers produce relatively late signals, and when there is no strong trend they produce many whipsaws.
The same mechanism can be applied to an indicator instead of price. The TDI (Traders Dynamic Index), for example, crosses two simple averages of the RSI, one over 2 periods and one over 7: same signals, same lag, same false starts in a range.
Some indicators merely dress this crossover up. EMA clouds shade the gap between two exponential averages, in one colour when the short one is above the long one, in another when it is below: the lesson works the calculation by hand and shows that the change of colour is the crossover itself, with the same lag.
The lag problem
Every moving average, by construction, is calculated from past prices. By nature, it can therefore only react after price has already moved, never before. This delay, called lag, is a structural characteristic of the tool, not a settings flaw that could simply be fixed by changing the period used. A shorter period reduces lag but increases noise; a longer period reduces noise but increases lag. There's no setting that eliminates this trade-off.
This lag poses a particular problem in ranging markets, where price oscillates with no clear direction: moving average crossovers can then multiply, generating repeated entry and exit signals, often just before price reverses direction again, a phenomenon sometimes called 'false signals' or 'whipsaw'. It's precisely in these phases that the structural weakness of pure crossover technique shows up most clearly.
Some indicators do without an average in order to react faster: momentum simply compares the close with the close n candles earlier. The lesson on momentum and the Rate of Change shows that this does not remove the problem: in a market with no direction, its line crosses its centre line again and again as well.
An illustrative example
Imagine a market entering a clear, sustained uptrend: a short EMA crosses above a long EMA shortly after the move begins, and price keeps rising for several weeks. In this illustrative scenario, the crossover signal, despite its inherent lag, would still have captured a good portion of the move, because the trend lasted far longer than the signal's delay.
Now imagine the same pair of moving averages applied to a market oscillating in a tight range for several weeks, with no clear direction. In this second illustrative scenario, the two averages cross and re-cross repeatedly, generating a series of signals that mostly cancel out in small losses, because the lag gets the trader in right as the move is already running out of steam. The same tool, the same method, produces radically different results depending on the market regime, which illustrates well why a crossover alone isn't enough as a complete method.
What studies have measured on moving average rules
The reference study is Brock, Lakonishok and LeBaron, Simple Technical Trading Rules and the Stochastic Properties of Stock Returns, published in the Journal of Finance in 1992. It tests moving average and trading range break rules on the Dow Jones index from 1897 to 1986. The authors conclude that the results provide strong support for these strategies: buy signals are followed by higher, and less volatile, returns than sell signals. The population is specific: a single US equity index, daily data, and profits measured before transaction costs.
Seven years later, Sullivan, Timmermann and White, in Data-Snooping, Technical Trading Rule Performance, and the Bootstrap (Journal of Finance, 1999), take the same data and widen the universe from 26 rules to 7,846, to correct for the bias of keeping, after the fact, only the rules that worked. Their conclusion comes in two parts. Over 1897-1986, the result survives that correction. Over the following ten years, 1987 to 1996, which the original study could not have seen, it does not repeat: the best rule is no longer statistically significant, and no rule beats the benchmark on the S&P 500 futures contract from 1984 to 1996. The authors also calculate that the best rule over the full hundred years made about 63 trades a year, and that a cost of 0.27% per trade was enough to wipe out its gain.
On a monthly scale, Mebane Faber, in A Quantitative Approach to Tactical Asset Allocation (2013 update), tests a single rule: hold the index when its month-end price is above its 10-month simple moving average, move to Treasury bills otherwise. On the S&P 500 with dividends reinvested, from 1901 to 2012, he gets 10.18% a year compounded against 9.32% for buy and hold, and during the bear market of the late 1920s the maximum drawdown goes from 83.66% to 42.24%. Two limits are written in the paper itself: the rule underperforms the index in roughly half of all years, and the calculation excludes taxes, commissions and slippage.
What these three readings allow you to say: a moving average rule had a measurable edge on a US equity index over a long period, that edge depends on the period chosen, and it is measured before costs. None of it transfers as is to forex, crypto or a 5-minute chart: it has to be tested on your market, with your costs.
Combining moving averages with other confirmation
Given this well-known limitation, the more careful practice is not trading a moving average crossover in isolation, but combining it with other confirmation elements before triggering an entry. This can include a reading of price structure (a break of a significant level), volume context, or any other element that reinforces the probability that the moving average signal isn't just a false signal generated by a range phase.
Many traders also use moving averages less as a direct trigger than as a context filter: only taking buy entries, sourced for instance from an entirely different method, when price trades above a reference moving average, without using the crossover itself as the entry signal. This approach captures part of the tool's usefulness (trend reading) while reducing exposure to its main weakness (lag on the crossover signal).
The most common periods and their logic
Certain moving average periods come up from one manual to the next, without any of them being a universal truth. StockCharts gives orders of magnitude: 5 to 20 periods for the short term, 20 to 60 for the medium term, 100 or more for the long term, and describes the 200-day average as perhaps the most popular. These values are conventions, not optimums. In the Sullivan, Timmermann and White study, the top-ranked rule over a hundred years of the Dow Jones was a 5-day simple moving average; over 1987-1996 the top-ranked rule is an entirely different one, which makes only six trades in ten years.
There's no 'correct' period in the absolute: the right choice depends on the trading horizon, the instrument, and above all how the trader intends to use it, as a context filter or as a direct trigger. A scalper and a swing trader who both use a moving average generally have no reason to choose the same period, since their very definition of the 'relevant trend' doesn't operate on the same time scale.
Moving averages and risk management
Beyond their use as an entry signal, moving averages also sometimes serve as a reference for placing a stop or managing a gradual exit. A trader in a position might, for example, choose to exit as soon as price closes clearly on the other side of a reference moving average, which offers an objective, easy-to-apply exit rule rather than a decision made on feel mid-trade.
This use for exit management inherits, however, the same limitations as its use as an entry signal: lag means an exit based on a moving average always occurs after the opposing move has already begun, mechanically giving up part of the gain already banked. It's an accepted trade-off rather than a flaw to fix: the rule has value precisely because it's simple and objective, even though it never optimizes the exact exit point.
Another trend-following indicator was designed for this kind of exit management: the Parabolic SAR, a stop that closes in on price as the trend goes on. It shares the limit described here: in a market with no direction, it flips again and again.
How Tradoshi helps
Whatever your entry method, moving averages, price zones or any other technical approach, the question that matters stays the same: does it produce a measurable result over time, in the market conditions where you actually trade? Tradoshi doesn't take sides on which moving average setup to use, but it gives you the means to objectively check whether your entries based on these signals give you an edge, and in which market regime.
By tagging your trades taken on a moving average signal, with or without extra confirmation, you can compare their respective results and identify whether your crossovers work better in trending conditions than in a range, a distinction that only rigorous tracking over time can truly reveal.
- Per-trade setup tags: separate your crossover-only entries from your entries with extra confirmation.
- Stats by tag: win rate and average R-multiple compared by market context (trend or range).
- Detailed journal: note the market regime identified at the time of the trade to refine your reading over time.
- Market replay: revisit price history to verify after the fact how reliable your signals actually were.
Trend lines, retests and patterns: what they actually say
A trend line joins successive turning points and makes a slope visible. What does a trendline tell you? One thing: while the slope holds, the sequence holds. A trendline trading strategy is therefore less about drawing than about deciding what you do when it breaks. Trading trend lines works the same way on any timeframe, and no PDF will add much to the paragraph you just read.
A retest is the move that follows a break: price comes back to touch the level it crossed before leaving again. A successful retest turns resistance into support, and a break and retest trading strategy waits for that confirmation rather than entering on the break itself.
Continuation and reversal patterns deserve the same caution. Whether you use day trade patterns on stocks or futures trading patterns on the indices, they are hypotheses, not signals: they propose a scenario, and only the invalidation settles it. A stop loss strategy is not an accessory to the pattern, it is part of it, and anyone who wants to test a trading strategy built on patterns should measure the stop as carefully as the entry.
Frequently asked questions
What's the difference between simple and exponential moving averages?
The simple moving average (SMA) gives equal weight to every price in the period. The exponential moving average (EMA) gives more weight to recent prices, making it more reactive to a recent change, at the cost of increased sensitivity to short-term noise.
How do you use a moving average to gauge trend?
By observing price position relative to the line (above generally read as bullish, below as bearish) and the slope of the average itself, which reflects an acceleration or slowdown of the trend.
What is a moving average crossover?
It's a technique that watches two averages of different periods, a short one and a long one. The short one crossing above the long one is often read as a buy signal, and the reverse as a sell signal. It's a common signal tool, not a guaranteed method.
What's the lag problem with moving averages?
Every moving average is calculated from past prices, so it can only react after price has already moved. This lag is structural: a shorter period reduces it but increases noise, a longer period reduces noise but increases the lag.
Why do crossovers generate false signals in a range?
In a market oscillating with no clear direction, the two averages cross and re-cross repeatedly, often just before price reverses direction because of the lag, generating a series of signals that cancel out in small losses.
Should you trade moving average crossovers alone?
The more careful practice is combining them with other confirmation (price structure, volume, other context) rather than trading them in isolation, or using them as a trend filter rather than a direct entry trigger.
Which moving average period should you choose?
There's no universally correct period. StockCharts cites 5 to 20 periods for the short term, 20 to 60 for the medium term and 100 or more for the long term: these are conventions. The right choice depends on the trading horizon (scalping, swing) and the intended use, as a context filter or direct trigger.
Have moving average rules been tested?
Yes. Brock, Lakonishok and LeBaron (1992) find they had an edge on the Dow Jones from 1897 to 1986, before costs. Sullivan, Timmermann and White (1999) confirm that result over the same period but do not find it again from 1987 to 1996. Faber, with a 10-month average on the S&P 500 from 1901 to 2012, gets a compounded return above buy and hold, excluding taxes, commissions and slippage. These tests cover US equity indices, not forex or intraday trading.
Can a moving average be used to place a stop?
Yes, some traders exit as soon as price closes clearly on the other side of a reference average, an objective and easy-to-apply rule. It inherits the same lag as when used for entries though, mechanically giving up part of the gain already banked.
