On This Page
- What is a moving average crossover?
- Bullish and bearish crossover rules
- Moving average crossover example: 20-day and 50-day SMAs
- Crossover trade example: signal vs fill
- How to build a moving average crossover strategy
- Golden cross, death cross and MACD crossovers
- Limitations of moving average crossovers
- Bottom line
- FAQ
Key Takeaways
- A crossover happens when a fast moving average moves from one side of a slow moving average to the other, which chart readers treat as a shift in the prevailing trend.
- The fast average crossing above the slow average is read as bullish, and the fast average crossing below is read as bearish.
- Define the crossover event separately from the state: a new crossing changes sides, while the above-or-below relationship can persist across many bars.
- Combine the cross with the slope of each line, price position and a defined entry and exit rule.
- Specify the average types, periods, input and chart interval. Those settings define the signal you are evaluating.
What is a moving average crossover?
A moving average crossover is the observation on which a faster moving average moves from one side of a slower moving average to the other. The fast average crossing above the slow one is read as bullish, and crossing below it is read as bearish. The shorter-period line is conventionally called fast and the longer-period line slow.
The event happens on a specific observation. The resulting above-or-below state can continue across many observations.
Bullish and bearish crossover rules
Define the spread as fast minus slow. A bullish cross has a positive current spread and a prior spread at or below zero. A bearish cross has a negative current spread and a prior spread at or above zero. This convention treats equality as the boundary.
Formula
Let D(t) = fast MA(t) − slow MA(t). Bullish cross: D(t) > 0 and D(t−1) ≤ 0. Bearish cross: D(t) < 0 and D(t−1) ≥ 0.- Fast and slow identify the selected shorter and longer period settings. For an SMA, the update is (incoming price − outgoing price) / n.
- EMA and SMA use different weight profiles. The complete price path and initialization determine their crossover dates.
- Evaluate on completed bars for a close-based rule, or specify the sampling and execution timing for an intrabar rule. Here, prior equality counts as the boundary for a new cross.
Moving average crossover example: 20-day and 50-day SMAs
A trader follows a 20-day and 50-day simple moving average on XYZ. Going into Tuesday the 20-day SMA sits at $49.05 and the 50-day SMA at $49.30, so the fast average is below the slow average. XYZ closes Tuesday at $53.00, the close leaving the 20-day window was $44.00, and the close leaving the 50-day window was $52.60.
- 20-day SMA change: ($53.00 − $44.00) / 20 = +$0.45, moving it from $49.05 to $49.50
- 50-day SMA change: ($53.00 − $52.60) / 50 = $0.008, moving it from $49.30 to $49.308, displayed as $49.31
- Crossover test: $49.50 exceeds $49.31, a positive $0.19 spread after the prior negative $0.25 spread
- Planned stop distance: $53.40 entry − $48.90 stop = $4.50 per share
At the stated $53.40 entry and $58.00 exit, the gross gain is $4.60 per share, or 1.02 times the $4.50 planned stop distance. The entry is $3.90 above the signal-day fast SMA of $49.50. That distance compares a fill with an average; it is not an execution cost.
The spread changes from −$0.25 to +$0.19. That is the bullish crossing event.
The separate chart shows a 10/20-period crossing on bar 12. Its short average is $78.14 and its long average is $77.52. The marker identifies the short average at that bar.
Crossover trade example: signal vs fill
The trade example enters at $53.40 with a planned stop at $48.90. The planned distance is $4.50 per share. An exit at $58.00 produces a gross $4.60 gain, or 1.02 times that distance.
The entry is $3.90 above the signal-day fast SMA. That is a price-to-average distance. Execution cost instead compares the fill with the selected execution reference and includes the applicable fees.
How to build a moving average crossover strategy
Select SMA or EMA, both periods, the input field and the bar interval. A close-based rule evaluates completed observations. An intrabar rule specifies when to sample and act.
Each SMA update depends on both the incoming and outgoing price. EMA uses its recursive weight profile. The full path determines when either pair crosses.
Choose whether the cross triggers an entry or sets the allowed direction for a separate breakout or pullback setup. Add the entry, exit and position-sizing rules to evaluate one complete strategy. On the crossing bar, Options Flow shows whether large premium is moving with the new direction, and the Options Profit Calculator compares expirations by their payoff at your target on each date in the plan.
Golden cross, death cross and MACD crossovers
A conventional 50/200 bullish crossing is a golden cross; the bearish counterpart is a death cross.
With standard MACD, the 12/26 EMA crossover corresponds to MACD crossing zero. MACD crossing its signal line is a separate comparison between that EMA difference and its own smoothed value.
Limitations of moving average crossovers
- Measure how far price has run before you act on the cross. Both averages are built from past prices, so the cross arrives after the turn has begun and part of the move is gone by the signal bar.
- When price chops sideways, the lines cross back and forth and each signal reverses quickly. Check the slope of both lines and the price structure before you take the next cross.
- The cross date comes from the average type, periods, input and interval, so match all four before you compare two charts or backtests.
- An SMA also moves when an old price leaves the window: the example’s 20-day average rises $0.45 partly because a $44.00 close drops out. Check the outgoing price before you read a jump in the fast line as fresh momentum.
- A cross sets the direction; the plan sets the target and the stop. The example earns 1.02 times its $4.50 stop distance because the plan exits at $58.00.
Bottom line
A moving average crossover turns two trend lines into a dated event: the bar on which the fast average changes sides against the slow one. Fix the average type, periods and interval, use the cross as a trigger or direction filter inside a complete rule, and plan for repeated crossings in sideways markets.
Clear answers
Frequently Asked Questions
Sources and Further Reading
- Fidelity: Simple Moving Average
- Fidelity Viewpoints: What Moving Averages Say About Stocks
- Fidelity: Moving Average Convergence Divergence
How entries are sourced, calculated and updated: editorial methodology.