20 and 50 EMA Crossover Strategy for Swing Trading

Why a crossover is a late signal by construction, what the ADX filter removes, and the stop, target and position size arithmetic behind each trade.

Tyson PNovember 15, 2025Last reviewed October 7, 20267 min read
Back to Blog

A moving average crossover is late by construction. StockCharts puts it in one line: "Moving average crossovers produce relatively late signals. After all, the system employs two lagging indicators."

Knowing that changes how you use the signal. You are not catching a turn. You are waiting for two averages to confirm a move that has already started, and the cost of that confirmation is the part of the move that happened before the cross printed.

The 20 and 50 EMA crossover strategy below is a moving average crossover trading strategy built from a 20-day EMA, a 50-day EMA, an ADX filter, a 6% stop and a 3R target. Every one of those is a parameter you choose.

What the moving average crossover trading strategy does

A crossover is one moving average passing through another. This setup uses the 20-day exponential moving average as the short average and the 50-day EMA as the long one.

John Murphy calls the two-average version the "double crossover method" in "Technical Analysis of the Financial Markets". The upward cross has a common name of its own: "A bullish crossover occurs when the shorter moving average crosses above the longer moving average. This is also known as a golden cross." The downward cross is the death cross.

Exponential averages weight recent closes more heavily than simple ones, so they turn sooner. The trade-off is stated in the same source. Simple averages "represent a true average of prices for the entire period", and the page adds that they may be better suited to identifying support or resistance levels. Faster is not better. It is faster.

The strategy suits positions held from a few days to a few weeks, on any exchange that gives you daily closing prices.

What a crossover tells you, and what it does not

The direction of an average describes the direction of price over its look-back window. The 50-day EMA covers about ten trading weeks of closes, weighted toward the recent ones. The 20-day covers about four weeks.

The short average crossing above the long one means recent closes have pulled the shorter average above the longer one. That is a description of what has happened, not a forecast. StockCharts is explicit: a moving average "doesn't predict price direction. Instead, it defines the current direction."

The failure mode is equally well documented. The same page states that "when there's no strong trend, a moving average crossover system will produce many whipsaws". In the source's own worked example, a 10-day and 50-day EMA pair produced three false signals before the fourth caught a move of over 20%.

Two remedies appear on that page. Apply a price filter, or a time filter: "Traders might require the crossover to last three days before acting." This strategy uses a different filter, below.

The ADX filter

The Average Directional Index measures trend strength without regard to direction. Welles Wilder published it in his 1978 book "New Concepts in Technical Trading Systems", alongside the Average True Range, the Parabolic SAR and the RSI. StockCharts bases its own calculation example on a 14-period setting, which it attributes to Wilder.

The thresholds are his, and they are not a single line. StockCharts states them this way: "Wilder suggests that a strong trend is present when ADX is above 25 and no trend is present when ADX is below 20. There appears to be a gray zone between 20 and 25." The same page notes that "many traders, however, use 20 as the key level", and that against a 25 threshold "a lower setting means more possible signals".

This article uses 20, which sits at the permissive end of that range. Set it at 25 and you take fewer trades with a stronger trend reading behind each. Either number is a choice about how many setups you are willing to skip.

One caution from the source: "ADX also has a fair amount of lag" because of the smoothing in its calculation. Adding it to two lagging averages makes a late system later.

Entry rules for the 20/50 EMA crossover

Rule 1: the 20-day EMA closes above the 50-day EMA. Wait for the daily close. An intraday cross that reverses by the close has not happened as far as this rule is concerned.

Rule 2: price is above the 20-day EMA. The averages can cross while price is falling back through both of them, and that is a different chart. This rule removes it.

Rule 3: ADX (14) is above 20. Below that level the cross is happening inside a range, which is where the whipsaws in the source's example came from.

An example of a setup that passes: a stock at $105 with its 20-day EMA at $102, the 20-day having just closed above the 50-day, and ADX reading 22. All three rules hold, so the trade qualifies.

Exit rules and the 3R target

Three exits. The first that triggers ends the trade.

The trend-change exit. The 20-day EMA closes back below the 50-day EMA. The condition that defined the trade has reversed.

The price exit. Price closes below the 50-day EMA. This fires earlier than the crossover exit, because price reaches the long average before the short average does.

The 3R target. Risk $1.00 per share and the target is $3.00 per share. At three units of reward per unit of risk, the breakeven win rate is 1 / (1 + 3) = 25%. Take a quarter of your trades to target at this ratio and you finish level, before costs.

Selling half at the target and trailing the rest with the EMA rules is a common variation. It caps half the position at 3R and leaves the other half to the exit rules, so the average result moves closer to the middle of the range.

Risk and position size

The stop. This article uses 6% below the entry price. That number is a choice, not a property of the stock. Widen it and the share count falls; tighten it and the position grows.

Account risk. At 2% risk on a $50,000 account, the most one trade can cost is 0.02 x $50,000 = $1,000.

Position value. With a 6% stop, the position value is $1,000 / 0.06 = $16,667, which is 33% of the account. A 2% risk rule is not a 2% exposure rule, and the second number is the one a gap acts on.

Overnight gaps. Holding for days or weeks means holding through market closes, and a gap prints straight through a stop. On that $16,667 position, a 10% gap down costs $1,667, which is 3.3% of the account, not the 2% you planned for. The stop caps intraday risk. It does not cap gap risk.

A worked moving average crossover example

This example is hypothetical. The stock, the prices and the outcome are invented to show the arithmetic.

On Monday, the 20-day EMA closes above the 50-day EMA. Price is $10.50, above the 20-day EMA, and ADX reads 24. All three rules hold.

  • Buy 1,000 shares at $10.50, a position of $10,500
  • Stop, 6% below: 10.50 x 0.94 = $9.87
  • Risk per share: 10.50 - 9.87 = $0.63, so $630 across the position
  • The account this fits: $630 at 2% risk implies an account of $630 / 0.02 = $31,500
  • The 3R target: 10.50 + (3 x 0.63) = $12.39

Two weeks later, price reaches $12.00. That is $1.50 per share, or 2.38R, short of the $12.39 target. Price then turns and closes at $10.70, below the 50-day EMA, and the price exit fires.

The result: 1,000 x $0.20 = $200, which is 0.32R. Small and positive, on a trade that was 2.38R at its best. That gap is what the exit rules cost, and it is the trade-off you accept when the exit is a lagging average rather than a fixed target.

Tracking moving average crossover trades in Swingfolio

Swingfolio ships this setup as a template. On the Strategies page, the "Import from Library" button opens a sheet titled "Strategy Library", where one entry is named "Moving Average Crossover".

Hover a row and press Preview, and the modal lists what the import creates. Entry Rules (3): "20-day EMA crosses above 50-day EMA", "Price is above 20-day EMA" and "ADX (14) is above 20", the last carrying an "Optional" badge. Exit Rules (2): "20-day EMA crosses below 50-day EMA" and "Price closes below 50-day EMA", the second also marked Optional. Under Risk Management: Stop Loss 6%, Target R-Multiple 3R and Position Size 2%.

Those numbers match this article because the template uses the same parameters. Change them in the strategy after importing and the checklist follows.

On the trade form, a "Strategy" selector assigns the trade. Further down, opening the Pre-Trade Checklist shows the strategy's entry rules as a checklist you tick one by one. The ADX rule is the one worth recording carefully, because the cross and the price position are both visible on the chart and the ADX reading is not.

The same form shows Exp. Risk, Exp. Reward, R:R Ratio and Port. Risk, plus a warning reading "Risk exceeds 5% of portfolio value" when the trade crosses that line. It does not produce a share count. The position size calculator takes an entry price, a stop price, an account value and a risk percentage. It prints the share count under "Your Position Size", with Investment Amount, Risk Amount and Stop Loss Distance below it. Add a target price and it adds Potential Reward and Risk:Reward Ratio.

Once trades close, "P&L by Setup Type" on the analytics page groups them by the strategy attached to each and charts win rate and profit factor for every strategy side by side. "Profit Factor by Compliance" splits the same trades into Compliant and Non-Compliant bars. That is what the ticked ADX rule feeds, and it is how you see whether the trades you took without the filter behaved differently.

Which moving average crossover is best for swing trading

No pair is best in general. Each pair trades speed against noise, and the right one depends on how long you plan to hold.

  • Faster pairs, such as 10 and 20 days, cross sooner and more often. They suit holds of a few days, and they produce more whipsaws inside a range.
  • The 20 and 50 day pair used here sits in the middle. The 20-day EMA covers about four weeks of closes and the 50-day about ten, which fits holds of a few days to a few weeks.
  • The 50 and 200 day pair is the one most often quoted for the golden cross and the death cross. It crosses rarely and fits positions held for months better than swing trades.

A faster pair crosses more often inside ranges, so the ADX rule removes a larger share of its signals. Whichever pair you choose, record it in the strategy and compare its closed trades against the same rules on another pair before you switch.

Common mistakes with moving average crossovers

Entering with ADX below 20. The cross looks the same on the chart either way. The ADX reading is the only rule in this strategy that separates a cross inside a trend from a cross inside a range.

Chasing the cross. Buy at $11.55 instead of $10.50 and the 6% stop moves to $10.86. The risk per share rises from $0.63 to $0.69, and the distance to the $12.39 target drops from $1.89 to $0.84. The setup falls from 3R to 1.2R.

Widening the stop after entry. Move the stop from $9.87 to $9.45 and the risk per share goes from $0.63 to $1.05, so the position you sized for $630 of risk now carries $1,050. The 3R target moves to $13.65 at the same time.

Trading against the index. A crossover in one stock sits inside whatever the broader market is doing. Check the index your stock belongs to, whether that is the ASX 200, the S&P 500 or another benchmark, before you treat the signal as independent.

Pull up your last five crossover trades and write down the ADX reading on each entry day. If you cannot find it, import the Moving Average Crossover template so the next one records that rule as ticked or skipped. Start the 30-day trial.

Share this article

Share:

Ready to improve your swing trading?

Track your trades, follow your strategies, and get AI-powered insights to become a better trader.

Related Articles

20 and 50 EMA Crossover Strategy: Exact Rules | Swingfolio