EMA 9/21 cross with a 60-minute SMA 20 filter
The 9/21 EMA cross with a 60-minute SMA 20 filter on five years of 15-minute Nasdaq 100, costs included. The filter cut the plain cross's loss from 42% to 16%, but tuned settings that made +247% on past data lost 20% on six held-back months.
From r/algotrading. The idea, in our words: On 15-minute bars, buy when EMA 9 crosses above EMA 21 and the last finished 60-minute close is above its 20 SMA; sell is the mirror. Compared with the plain crossover.
didn't hold upAs posted · the rules as described (see what we assumed below)
Optimized: best settings Quant Core found · last months held back as unseen data
Improved: only trade when the trend is strong (ADX above 20)
We then tried 7 changes a quant would test first (560 settings in all) and kept the best on past data only. The held-back months played no part in choosing it. It did not hold up on the unseen months.
What we had to assume
- Nasdaq 100 CFD instead of NIFTY stocks (no Indian data)
- Cash session only, 9:45 to 15:30 New York, flat at the close
- The post gives no stop or exit: a 1.5 ATR stop that trails 2 ATR behind the best price, which is close to riding the cross until it turns
A different reading of the rules could give a different result.
Backtested with the StratOS optimizer on historical data, with spread and costs charged, and the most recent months held back as unseen data. A backtest is not a forecast, and nothing here is investment advice.