Strategies we backtested 50/200 SMA cross

Tested by BacktestingMax

Golden cross and death cross strategy backtest

Does the golden cross make money?

Mostly no. A golden cross is when the 50 SMA (the average closing price of the last 50 candles) crosses above the 200 SMA (the average of the last 200), and a death cross is a cross below. On 4-hour charts, buying at every golden cross and selling short (selling first, to make money if price falls) at every death cross, with a fixed stop-loss, made money on only 4 of the 10 markets we tested. We call these the standard rules. Gold was the only market where the profit came from many trades. On the S&P 500, the Nasdaq 100 and the DAX, the 4-hour tests lost money before July 2018, when our index prices often did not move outside stock exchange hours, and made money from then on (see 'Price data'). On daily charts, the rules made only 10 to 23 trades per market, too few to judge, so the 'Where it worked' box does not count them. We ran 20 backtests from 2014 to 2025, after trading costs, on 10 markets: 4 stock indices, gold, silver and 4 currency pairs, each on 4-hour and daily charts. They do not include overnight fees (what a broker charges for keeping a trade open overnight). The death cross sells lost money in total on all 4 indices, gold and silver, and buying only did better on all 6, but with fewer than the 100 trades we need to judge a test.

20 backtests 2014–2025 Trading costs included Tested 19 October 2026

Where it worked 20 backtests
Made money
4
of 20 tests, using the standard rules
Made money in both periods
3
2014–2021 and again 2022–2025
Best backtest
+47%
Gold, 4-hour chart: account growth 2014–2025
With a trailing stop-loss
2
tests made money in both periods, compared with 3 using the standard rules

Made money in both periods

  • Gold, 4-hour
  • EUR/USD, 4-hour
  • GBP/USD, 4-hour

The results

Results on every market

Each box shows one backtest of the 50/200 SMA cross using the standard rules, from 2014 to 2025, after trading costs: the % result, and a small chart of the account balance. The solid line is the account balance and the dashed line is the starting balance. Green results made money; red results lost money. Under each result: whether it made money in both 2014–2021 and 2022–2025, or passed all four of our checks (see "How a test passes" further down).

Market 4-hour daily
S&P 500 −13% Too few trades −1% Too few trades
Nasdaq 100 +10% Made money overall, lost in one period +22% Too few trades
DAX −5% Lost money +5% Too few trades
FTSE 100 −30% Lost money −7% Too few trades
Gold +47% Passed all four checks +7% Too few trades
Silver −18% Lost money +15% Too few trades
EUR/USD +39% Made money in both periods +2% Too few trades
GBP/USD +25% Passed all four checks +3% Too few trades
USD/JPY −15% Lost money −4% Too few trades
AUD/USD −18% Lost money −5% Too few trades
All the numbers, test by test
Market Chart Trades Win rate Profit factor Result Max drawdown 2014–2021 2022–2025 Monte Carlo drawdown Trading costs
S&P 500 4-hour 97 19.6% 0.79 −13.2% −21.4% −18.1% +6.0% −30.7% $90
S&P 500 daily 12 16.7% 0.88 −1.0% −5.7% −5.7% +5.0% — $3
Nasdaq 100 4-hour 102 26.5% 1.16 +9.7% −13.7% −7.1% +18.2% −22.9% $120
Nasdaq 100 daily 13 38.5% 4.63 +22.1% −3.7% +5.4% +15.9% — $5
DAX 4-hour 126 26.2% 0.93 −5.2% −12.2% −8.5% +3.5% −26.1% $50
DAX daily 10 30% 1.96 +5.1% −4.4% −3.5% +8.9% — $1
FTSE 100 4-hour 131 19.1% 0.62 −29.6% −34.4% −13.9% −18.2% −41.1% $116
FTSE 100 daily 17 17.6% 0.40 −6.5% −7.4% −6.3% −0.2% — $5
Gold 4-hour 124 25% 1.52 +47.1% −9.7% +19.3% +23.3% −24.5% $179
Gold daily 15 13.3% 1.77 +6.8% −5.6% +10.8% −3.6% — $6
Silver 4-hour 112 25% 0.76 −17.8% −27.9% +5.0% −21.7% −31.0% $391
Silver daily 19 21.1% 2.22 +14.9% −9.0% −2.7% +18.0% — $28
EUR/USD 4-hour 112 23.2% 1.39 +39.1% −15.8% +38.0% +0.8% −28.1% $139
EUR/USD daily 19 31.6% 1.16 +1.7% −5.9% +1.6% 0.0% — $6
GBP/USD 4-hour 108 24.1% 1.32 +25.3% −16.0% +9.4% +14.6% −24.6% $126
GBP/USD daily 16 12.5% 1.26 +2.9% −5.5% +1.0% +1.9% — $6
USD/JPY 4-hour 113 23.9% 0.79 −14.6% −25.0% −20.9% +8.0% −29.9% $94
USD/JPY daily 18 11.1% 0.65 −4.4% −8.9% −8.9% +5.0% — $5
AUD/USD 4-hour 122 24.6% 0.75 −17.9% −26.2% −18.6% +0.9% −33.6% $141
AUD/USD daily 23 30.4% 0.58 −4.8% −6.2% −1.8% −3.0% −9.4% $11

Profit factor is the money won divided by the money lost. Above 1 means the test made money. Max drawdown is the biggest fall from the highest balance. 2014–2021 and 2022–2025 show the result in each period on its own. Monte Carlo drawdown: we shuffled the trades into a random order 1,000 times; in 95% of those runs, the worst drawdown was this number or less. Result is the change in the account, with the risk of each trade set to 1% of the account at that time.

The account balance

The best test and the middle test

Best test Gold, 4-hour chart +47.1% from 2014 to 2025
Middle test (median): half of the 20 did better, half did worse EUR/USD, daily chart +1.7% from 2014 to 2025

What we found

What the 20 backtests show

  1. On 4-hour charts, the standard rules made money on 4 of the 10 markets: gold (+47.1%), EUR/USD (+39.1%), GBP/USD (+25.3%) and the Nasdaq 100 (+9.7%). Gold, EUR/USD and GBP/USD made money in both 2014–2021 and 2022–2025, and gold and GBP/USD also passed all four of our checks (see 'How a test passes' further down). The other 6 markets lost money, from −5.2% on the DAX to −29.6% on the FTSE 100. The S&P 500 lost 13.2% in 97 trades, just under the 100 we need to judge a test, so it is marked 'Too few trades'. On the S&P 500, the Nasdaq 100 and the DAX, the 4-hour tests lost money before July 2018, when our index prices often did not move outside stock exchange hours (see 'Price data' further down). From July 2018 to 2025, the S&P 500 made 4.4%, the Nasdaq 100 made 26.5% and the DAX made 0.6% on 4-hour charts. The FTSE 100 lost money both before and after: 13.2% before July 2018 and 18.8% after.

  2. On most markets that made money, one or two trades made most of the profit. R is the money one trade risks: 1% of the account. On 4-hour charts, gold was the only market where the profit came from many trades: without its 2 best trades, it still made 14.3R. On EUR/USD, GBP/USD and the Nasdaq 100, the trades lost money in total without their single best trade. So passing our four checks, as GBP/USD did, does not prove that a profit came from many trades. On daily charts, the rules made only 10 to 23 trades on each market, and one trade could decide the result: on gold, one buy from January 2019 to February 2021 made 15.7R, and the other 14 trades lost 8.0R together.

  3. The stop-loss was 3 times the ATR away (ATR is how far price moves in an average candle), and it closed about two thirds of the trades before the next cross: 68% on 4-hour charts and 66% on daily charts. After a stop-loss, the rules wait for the next cross, and on a daily chart that can take months or years: half of the waits after a daily stop-loss lasted more than 51 days, and 26 of the 104 waits lasted more than 6 months. On the S&P 500 daily chart, 9 of the 12 trades ended at the stop-loss. The buy at the golden cross of April 2016 hit its stop-loss in June 2016, the morning after the UK's Brexit vote. The next cross came in December 2018, so the test had no trade open from June 2016 to December 2018, while the S&P 500 rose. The same happened in 2023: the buy at the golden cross of January 2023 hit its stop-loss in March 2023, and the next cross came only in April 2025 (see the first table below).

  4. Without the stop-loss, every trade stays open until the next cross. On daily charts, removing the stop-loss gave a better result on 6 of the 10 markets, and the daily trades of all 10 markets together made 65.1R instead of 39.9R. On 4-hour charts, removing it gave a better result on only 3 of the 10 markets, and the trades together lost 65.8R instead of making 28.3R. Leaving out the index trades before July 2018 (see 'Price data'), the 4-hour trades made 58.8R without the stop-loss and 79.2R with it, so the stop-loss still did better there. One reason: a stop-loss keeps the test out of the market for much less time on 4-hour charts than on daily charts. After a 4-hour stop-loss, half of the next trades opened within 10 days, and none waited more than 6 months. Without a stop-loss, losses got bigger: the losing 4-hour trades lost 1.50R on average, compared with 0.88R with the stop-loss, and the worst one lost 7.9R.

  5. On stock indices and metals, the death cross worked better as a signal to close a buy than as a signal to sell short. On all 4 stock indices, gold and silver, the death cross sells lost money in total on both charts, and on daily charts only 4 of their 40 sells made money. These 6 markets all rose from 2014 to 2025, and so did USD/JPY, so the sells went against the long rise. Buying at the golden cross and closing at the next death cross or at the stop-loss, with no short trades, gave a better result than the standard rules on all 6 of them and on USD/JPY, on both charts (see the second table below). On EUR/USD and GBP/USD, which fell from 2014 to 2025, the sells made more money than the buys.

The S&P 500 daily chart

Every golden cross and death cross on the S&P 500, with and without the stop-loss

These are the 12 trades of the S&P 500 daily test, from 2014 to 2025, after trading costs. The first column shows when the 50 SMA and the 200 SMA (the average closing prices of the last 50 and the last 200 candles) crossed, and which trade opened. The second column shows how that trade ended with the standard rules, with a stop-loss 3 times the ATR away. The third column shows that trade without a stop-loss, held until the next cross. R is the money one trade risks: 1% of the account. For example, −1.0R means the trade lost 1% of the account.

Cross and trade With the 3 × ATR stop-loss Without a stop-loss
Death cross, Aug 2015: sell −0.9R, hit the stop-loss in Nov 2015 −0.6R, closed in Dec 2015
Golden cross, Dec 2015: buy −1.0R, hit the stop-loss in Jan 2016 −1.4R, closed in Jan 2016
Death cross, Jan 2016: sell −0.9R, hit the stop-loss in Mar 2016 −1.5R, closed in Apr 2016
Golden cross, Apr 2016: buy −1.0R, hit the stop-loss in Jun 2016 +9.0R, closed in Dec 2018
Death cross, Dec 2018: sell −0.6R, closed in Mar 2019 −0.6R, closed in Mar 2019
Golden cross, Mar 2019: buy −0.9R, hit the stop-loss in Mar 2020 −3.3R, closed in Mar 2020
Death cross, Mar 2020: sell −0.6R, hit the stop-loss in May 2020 −0.6R, closed in Jul 2020
Golden cross, Jul 2020: buy +4.6R, closed in Mar 2022 +4.4R, closed in Mar 2022
Death cross, Mar 2022: sell −0.7R, hit the stop-loss in Mar 2022 +0.5R, closed in Jan 2023
Golden cross, Jan 2023: buy −1.0R, hit the stop-loss in Mar 2023 +6.6R, closed in Apr 2025
Death cross, Apr 2025: sell −0.6R, hit the stop-loss in Jun 2025 −0.7R, closed in Jun 2025
Golden cross, Jun 2025: buy +2.7R, still open at the end of 2025 +2.9R, still open at the end of 2025
All 12 trades −0.8R +14.6R

Both versions work out the trade size the same way: the size that loses 1% of the account at a stop-loss 3 times the ATR away. So the R results in the two columns can be compared. In the third column, the old trade is always still open at the next cross, so the new trade opens one candle later (see rule 4) than in the second column, where the old trade had usually already hit its stop-loss. So it starts at a slightly different price, and the same cross can give a slightly different result: for example, +4.6R and +4.4R for July 2020. Trades that hit the stop-loss lost between 0.6R and 1.0R, often less than 1R, for two reasons: the trade size is rounded down to the smallest step the market allows (0.1 of a contract on the S&P 500), and the trade opens at the next candle's open, not at the close that the trade size was worked out from. Our S&P 500 prices are CFD prices (the prices a broker quotes for trading the index): their daily candle closes an hour after the stock exchange, and they also trade on some US holidays. So our cross dates can be a few days away from the dates reported in the news.

Buying only

Without the death cross sells, the stock indices and metals did better

Each cell is one backtest from 2014 to 2025, after trading costs: the change in the account. 'Buy and sell' are the standard rules. 'Buy only' buys at each golden cross and closes the trade at the next death cross or at the stop-loss, with no short trades.

Market 4-hour: buy and sell 4-hour: buy only Daily: buy and sell Daily: buy only
S&P 500 −13.2% +15.4% −1.0% +3.1%
Nasdaq 100 +9.7% +50.8% +22.1% +24.1%
DAX −5.2% +15.3% +5.1% +6.6%
FTSE 100 −29.6% −13.3% −6.5% −1.8%
Gold +47.1% +68.0% +6.8% +11.6%
Silver −17.8% −10.1% +14.9% +21.8%
EUR/USD +39.1% −4.0% +1.7% +0.1%
GBP/USD +25.3% −3.0% +2.9% −5.3%
USD/JPY −14.6% −7.1% −4.4% +1.9%
AUD/USD −17.9% −23.5% −4.8% −4.8%

Buying only makes about half as many trades as the standard rules: 49 to 66 per market on 4-hour charts, and 6 to 12 on daily charts. That is fewer than the 100 trades we need to judge one test. So the 4-hour results here are less certain than those of the standard rules, and the daily results are too few to judge at all. The 4-hour index results include the index prices before July 2018 that often did not move outside stock exchange hours (see 'Price data'): on the S&P 500, the Nasdaq 100 and the DAX, buying only made most of its profit after July 2018. These results are not like-for-like with buying and holding the market: each trade is sized to risk 1% of the account, not to put the whole account into the market, and for most of the time the test has no trade open.

The strategy

What the 50/200 SMA cross is

An SMA (simple moving average) is an indicator that shows the average closing price of the last few candles. The 50 SMA averages the last 50 candles, and the 200 SMA averages the last 200 candles, so the 200 SMA moves more slowly. On a daily chart, they are the 50-day and the 200-day moving averages. When the 50 SMA crosses above the 200 SMA, traders call it a golden cross: the average price of the last 50 candles is now higher than the average of the last 200, a sign of an uptrend. When the 50 SMA crosses below the 200 SMA, traders call it a death cross, a sign of a downtrend. News sites report these crosses on the S&P 500 and other big markets. Many traders buy at a golden cross and sell at a death cross: some only close their buy, and some also sell short. Our standard rules do both. The classic golden cross trade has no stop-loss: the next cross closes it. We added a stop-loss, 3 times the ATR away, so that every trade risks the same 1% of the account. The version with no stop-loss is in the improvements further down, and the version that only buys is in the 'Buying only' table above. Both averages are slow, so crosses do not happen often: in our test, about once or twice a year on a daily chart. On a 4-hour chart, 200 candles cover only about 7 weeks, so the crosses come more often, 8 to 11 times a year. We tested 4-hour charts too, because daily charts give too few trades to judge one market.

SMAs
50 and 200, simple moving averages of the closing prices
Stop-loss
3 × ATR, with the ATR measured over the last 14 candles. It does not move.
Take-profit
None. The next cross the other way closes the trade.
Trading costs
Included: every trade pays the market's spread, the gap between the buy price and the sell price. On four markets, the default spread in our test software is lower than a typical retail broker's, so we used a wider spread: 1.5 points on the Nasdaq 100, 1 point on the DAX and the FTSE 100, and $0.020 on silver.
Risk per trade
1% of the account. When a trade that risks 1% would be smaller than the smallest trade size the market allows, the test uses the smallest size, but only if it risks no more than 2%. This happened on 8 of the 1,309 trades: 6 on silver (3 on each chart), 1 on the DAX daily chart and 1 on the Nasdaq 100 daily chart. 2 crosses were skipped, because even the smallest size would have risked more than 2%: on the DAX daily chart in March 2020, and on the Nasdaq 100 daily chart in April 2025.
Price data
Our stock index prices (S&P 500, Nasdaq 100, DAX and FTSE 100) are CFD prices. Until spring 2018, about half of the night-time 1-minute index prices did not move at all; after that, far fewer did. To be safe, we split the index results at 1 July 2018. This mostly affects the 4-hour index results (see the first finding). Gold, silver and the currency pairs are not affected.
Friday evening candles
Skipped (see the last rule). Each chart had the same number: 176 on the S&P 500, 163 on the Nasdaq 100, 81 on the FTSE 100, 52 on the DAX and 2 on silver. On the S&P 500 and the Nasdaq 100, most of them are from 2014 to 2018. Gold and the currency pairs have none. Without the skip, a few minutes of prices would count as a whole candle in the SMAs: the S&P 500 daily death cross of late 2018 would have come on 23 November instead of 5 December.
Overnight (swap) fees
Not included. Brokers charge (or sometimes pay) a fee for each night a trade stays open. Golden cross trades stay open for a long time: half of the trades stayed open longer than about 9 days on 4-hour charts and about 2 months on daily charts, and 1 daily trade in 4 stayed open longer than 6 months. So with a real broker, the results could be higher or lower, most of all for the trades that stayed open for months.

The rules we tested

  1. Use the 50 SMA and the 200 SMA of the closing prices. We check for a cross when each candle closes, and the trade opens at the next candle's open. The 200 SMA needs 200 candles, so on daily charts no cross could come before September 2014. The first daily trades opened between December 2014 (DAX) and March 2016 (AUD/USD).
  2. Buy at a golden cross: the 50 SMA crosses above the 200 SMA.
  3. Sell short at a death cross: the 50 SMA crosses below the 200 SMA. Selling short means you sell first and buy back later, so the trade makes money if the price falls.
  4. When the SMAs cross the other way, close the trade and open a new trade in the new direction. In our test, the old trade closes at the open of the next candle, and the new trade is placed at the close of that candle, once the old trade has closed. So the new trade opens one candle after the old trade closes.
  5. ATR (average true range) is an indicator of how far price moves in an average candle, measured over the last 14 candles. Put the stop-loss 3 times the ATR away from the close of the candle before the trade opens. The stop-loss does not move. After a stop-loss, do not trade until the next cross. That cross is always the other way: after a buy hits its stop-loss, the next trade is a sell, at the next death cross.
  6. Size every trade so that, if the stop-loss is hit, the trade loses 1% of the account. If that trade is smaller than the smallest trade size the market allows, use the smallest size, but only if it loses no more than 2% of the account at the stop-loss. Otherwise, skip the trade.
  7. Our data for some Fridays has a few minutes of prices after the market has closed for the weekend, and these make a tiny extra candle. Skip any candle that opens on a Friday at 17:00 New York time or later: it does not count in the SMAs or the ATR, and the rules are not checked on it.

The method

How we tested it

The test

Markets
S&P 500, Nasdaq 100, DAX, FTSE 100, Gold, Silver, EUR/USD, GBP/USD, USD/JPY and AUD/USD
Charts
4-hour and daily candles
Dates
January 2014 to December 2025
Account
$10,000, risking 1% of the account on each trade
Trading costs
Included. Every trade pays that market's normal trading cost: the spread, which is the gap between the buy price and the sell price.

How a test passes

We call a test passed only if it meets all four checks. A strategy can make money in one backtest and still fail one of these checks.

  • At least 100 trades. With fewer trades, a good result could be luck.
  • It made money from 2014 to 2021 and again from 2022 to 2025. This shows whether the strategy kept working in the newer years, not only in the older ones.
  • A profit factor (the money won divided by the money lost) of at least 1.2 from 2022 to 2025, after trading costs.
  • In 95% of 1,000 random shuffles of the trades, the account must not fall more than 30% from its highest point.

Improvements

Can the 50/200 SMA cross be improved?

Golden cross traders argue about how to close a trade: at a fixed stop-loss, only at the next cross, or with a stop-loss that follows the price. We tested the two other exits on the same 10 markets and 2 charts, 20 backtests each. (Buying only, with no short trades, is in the 'Buying only' table further up.) If you pick the best version and judge it on the same years, it will almost always look good. So we picked the better of the two new exits using 2014–2021 only, by the number of tests that made money. Then we checked it on 2022–2025, the years we did not use to pick it.

Version Made money 2014–2021years used to pick the best version Made money 2022–2025years not used to pick it Made money in both periods Passed all four checks
Standard rules: a fixed 3 × ATR stop-loss The rules under 'The rules we tested', with nothing changed. 8 of 20middle test −3.1% 14 of 20middle test +4.2% 3 2
No stop-loss: hold until the next cross This version has no stop-loss. Every trade stays open until the 50 SMA and the 200 SMA cross the other way. The trade size is the same as with the 3 × ATR stop-loss, so one trade can lose more than 1% of the account. 7 of 20middle test −6.2% 16 of 20middle test +8.8% 3 1
With a trailing stop-lossBest on 2014–2021 A trailing stop-loss follows the price. It starts 3 times the ATR away, as in the standard rules. For a buy, it then stays 3 times the ATR below the highest price since the trade opened: it moves up when price makes a new high, and it never moves down. For a sell, it stays 3 times the ATR above the lowest price since the trade opened. A cross the other way still closes the trade. After a stop-loss, wait for the next cross. 10 of 20middle test +0.1% 11 of 20middle test +0.2% 2 1

No exit clearly beat the standard rules. The trailing stop-loss was the better new exit in 2014–2021, the years we used to pick it: it made money in 10 of 20 tests, compared with 8 with the standard rules, and its middle test (half of the 20 did better, half did worse) made +0.1%, compared with −3.1%. But in 2022–2025, the years we kept for the check, it made money in only 11 of 20 tests, compared with 14 with the standard rules. So the trailing stop-loss looked better only in the years we used to pick it, and those years include the index prices before July 2018 that often did not move outside stock exchange hours. The trailing stop-loss closed trades quickly: half of the 4-hour trades closed within 3.5 days, and half of the daily trades within 23 days. After each stop-loss, the test waited for the next cross with no trade open, so the results stayed small: from −10.6% to +17.7% on 4-hour charts. Without a stop-loss, 7 of 20 tests made money in 2014–2021 and 16 of 20 in 2022–2025, and 3 of the 4-hour tests made money in both periods, the same number as with the standard rules. Tests with fewer than 100 trades (all the daily tests and the S&P 500 4-hour test) are not counted in 'both periods'. No stop-loss did better on daily charts and worse on 4-hour charts (see the findings above).

Passed all four checks with a trailing stop-loss

  • Gold, 4-hour

Questions

Questions traders ask

Does the golden cross work on the S&P 500?

Not clearly, in our test. Buying at every golden cross and selling short at every death cross lost 13.2% on the S&P 500 4-hour chart and 1.0% on the daily chart, from 2014 to 2025, after trading costs. The 4-hour loss came before July 2018, when our index prices often did not move outside stock exchange hours: from July 2018 to 2025, the 4-hour test made 4.4%. On the daily chart, there were only 12 crosses, and 9 of the 12 trades hit the stop-loss. Holding each trade until the next cross, with no stop-loss, did better there: the 12 trades made 14.6R in total instead of losing 0.8R (R is the money one trade risks: 1% of the account). Buying only, with no short trades, made 15.4% on the 4-hour chart. All of these S&P 500 results come from few trades: 97 on the 4-hour chart, 12 on the daily chart and 49 for buying only on the 4-hour chart, fewer than the 100 we need to judge one test.

Is the death cross a sell signal?

As a signal to sell short, no: not on stock indices, gold or silver, in our test. On the S&P 500, the Nasdaq 100, the DAX, the FTSE 100, gold and silver, the death cross sells lost money in total on each market, on both 4-hour and daily charts. Using the death cross only to close a buy did better: buying at the golden cross and closing at the next death cross or at the stop-loss, with no short trades, gave a better result than the standard rules on all 6 of these markets. On currency pairs, the results were mixed: on EUR/USD and GBP/USD, the death cross sells made more money than the golden cross buys, but on USD/JPY, buying only did better.

Should you use a stop-loss with the golden cross?

In our test, it depended on the chart. With a stop-loss 3 times the ATR away, about two thirds of the trades ended at the stop-loss, and after a stop-loss the rules wait for the next cross. On daily charts, that wait often lasted months or years, so the test often missed long trends: without the stop-loss, 6 of the 10 daily tests did better, but each daily test had few trades. On 4-hour charts, the next cross came sooner, and the stop-loss did better. Leaving out the index trades before July 2018, when our index prices often did not move outside stock exchange hours, the 4-hour trades made 79.2R with the stop-loss and 58.8R without it. With all trades, they made 28.3R with the stop-loss and lost 65.8R without it (R is the money one trade risks: 1% of the account). Without a stop-loss, one trade can lose several times what you planned: the worst 4-hour trade lost 7.9R.

What is the best timeframe for the golden cross?

Neither of the 2 charts we tested gave a clear yes. The daily chart is the classic one, but it gives very few trades: the rules made only 10 to 23 trades on each market from 2014 to 2025, too few to judge one market, and 5 of the 6 daily tests that made money would have lost money without their single best trade. On 4-hour charts, the rules made 97 to 131 trades on each market, enough to judge on 9 of the 10 markets, but they made money on only 4 of the 10 markets. Our index prices before July 2018 often did not move outside stock exchange hours, which affects the 4-hour index results most. From July 2018 to 2025, 3 of the 4 indices made money on 4-hour charts. We did not test other timeframes.

Keep exploring

Related strategies we tested

Moving averages 9/21 EMA crossover backtest: from 5-minute to daily charts Made money in 10 of 40 tests, 5 of them in both periods. Best: USD/JPY, 1-hour, +539%
The strategy code we ran

This is the exact code from the BacktestingMax strategy engine. Paste it into the strategy editor in the app to run it on any market.

class GoldenCrossDeathCross(Strategy):
    """The golden cross and the death cross (50 and 200 SMA), as most traders learn them,
    plus three changes traders often make.
    Standard (all switches off): buy when the 50 SMA crosses above the 200 SMA (the golden
    cross), sell short when it crosses below (the death cross). The opposite cross closes the
    trade and opens a new one the other way (the exit fills at the next candle's open, the new
    trade one candle later). A stop-loss 3 x ATR(14) away caps each trade; size so that the
    stop costs 1% of the account. After a stop-loss, wait for the next cross.
    Trade size: when 1% of the account is less than the smallest trade size the market allows
    (0.1 of an index contract, 1 ounce of gold, 50 ounces of silver, 1,000 currency units), the
    trade uses that smallest size if it risks no more than 2% of the account. Otherwise it is
    skipped.
    Skipped candles: a candle that opens on a Friday at 17:00 New York time or later. The
    markets in this test are closed then, but some index data (the S&P 500 and the Nasdaq 100,
    mostly from 2014 to 2018, some DAX and FTSE 100 Fridays, and 2 silver Fridays) has a few
    minutes of prices after the close, which make a tiny extra candle. The strategy ignores it:
    it does not go into the SMAs or the ATR, and no cross, exit or trade size is worked out on
    it. That is why the SMAs and the ATR are worked out here instead of with the built-in
    indicators. On a market that trades at the weekend (crypto), remove the skip.
    The changes, one at a time:
      no_stop    = 1   no stop-loss: only the next cross closes the trade. The trade size
                       stays the same as with the 3 x ATR stop, so a loss can be more than 1%
      trail_stop = 1   the 3 x ATR stop-loss trails: it follows the best price since the
                       trade opened (the highest high for a buy, the lowest low for a sell)
      long_only  = 1   buy at the golden cross only; the death cross closes the trade and no
                       short trade opens
    """
    params = {"fast": Param(type=int, default=50, min=2, max=400),
              "slow": Param(type=int, default=200, min=3, max=500),
              "atr_period": Param(type=int, default=14, min=2, max=100),
              "atr_mult": Param(type=float, default=3.0, min=0.5, max=10.0),
              "no_stop": Param(type=int, default=0, min=0, max=1),
              "trail_stop": Param(type=int, default=0, min=0, max=1),
              "long_only": Param(type=int, default=0, min=0, max=1)}
    lookback = 2
    def init(self, ctx):
        self.ny = ctx.clock("America/New_York")
        self.closes = []         # closes of the candles the strategy uses, newest last
        self.prev_close = None
        self.atr = None          # Wilder's average of the true range, as the built-in ATR
        self.atr_count = 0
        self.prev_fast = None    # the SMAs on the previous candle used
        self.prev_slow = None
        self.reverse_to = None   # "long" / "short": open this once the closing trade is gone
    def on_bar(self, ctx):
        # A tiny candle after the Friday close (see above): ignore it completely.
        if self.ny.weekday == 4 and self.ny.hour >= 17:
            return
        high, low, close = ctx.high[0], ctx.low[0], ctx.close[0]
        if self.prev_close is None:
            true_range = high - low
        else:
            true_range = max(high - low, abs(high - self.prev_close), abs(low - self.prev_close))
        self.prev_close = close
        self.atr = true_range if self.atr is None else self.atr + (true_range - self.atr) / ctx.params.atr_period
        self.atr_count += 1
        slow_n, fast_n = ctx.params.slow, ctx.params.fast
        self.closes.append(close)
        del self.closes[:-slow_n]
        f1, s1 = self.prev_fast, self.prev_slow
        f0 = s0 = None
        if len(self.closes) == slow_n:
            f0 = sum(self.closes[-fast_n:]) / fast_n
            s0 = sum(self.closes) / slow_n
        self.prev_fast, self.prev_slow = f0, s0
        if f0 is None or f1 is None or s0 is None or s1 is None or self.atr_count < ctx.params.atr_period:
            return
        a = self.atr
        golden = f1 <= s1 and f0 > s0   # the 50 SMA crosses above the 200 SMA
        death = f1 >= s1 and f0 < s0    # the 50 SMA crosses below the 200 SMA
        long_only = ctx.params.long_only == 1
        pos = ctx.position
        if pos is not None:
            if pos.is_long and death:
                ctx.close_position()
                self.reverse_to = None if long_only else "short"
            elif pos.is_short and golden:
                ctx.close_position()
                self.reverse_to = "long"
            return
        # A reversal waits one candle for the close to fill. Drop it if the SMAs crossed back.
        pending, self.reverse_to = self.reverse_to, None
        go_long = golden or (pending == "long" and f0 > s0)
        go_short = (death or (pending == "short" and f0 < s0)) and not long_only
        if not ctx.gate("sma_cross", go_long or go_short):
            return
        entry = close
        dist = ctx.params.atr_mult * a
        stop = entry - dist if go_long else entry + dist
        size = ctx.size_by_risk_pct(0.01, stop=stop, entry=entry)
        if size <= 0:
            # 1% is less than the smallest trade size: take the smallest size if it risks
            # no more than 2% of the account (on these markets the 2% size rounds down to it).
            size = ctx.size_by_risk_pct(0.02, stop=stop, entry=entry)
        if size <= 0:
            return
        if ctx.params.trail_stop == 1:
            protect = {"sl_trail": dist}
        elif ctx.params.no_stop == 1:
            protect = {}
        else:
            protect = {"sl": stop}
        if go_long:
            ctx.buy(size=size, tag="golden_cross", **protect)
        else:
            ctx.sell(size=size, tag="death_cross", **protect)

Your turn

Test the 50/200 SMA cross yourself

Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest a golden cross strategy on gold, 4-hour chart, from 2014 to 2025: buy when the 50 SMA crosses above the 200 SMA, sell short when it crosses below, with a 3 × ATR(14) stop-loss and 1% risk per trade.

Try it free in BacktestingMax

Free account. No credit card needed.

See every strategy we tested Browse strategies shared by traders

Backtest on historical data with trading costs, run by BacktestingMax. Past results do not guarantee future results, and nothing here is financial advice. Updated 19 October 2026.