Verdict
Moving-average trend following
By Thomas Jamais (Backtestd) · Published · Updated
Does moving-average trend following work?
No, not in our test. We coded the rule, tested 1249 versions of it on 24 markets from 2022 to 2025, fees, slippage and funding included. 14% of the versions lost money. The best version did not survive older data it had never seen (2020–2022).
Key facts
| Versions tested | 1249 |
|---|---|
| Markets | 24 |
| Period | 2022-11-10 → 2025-07-09 |
| Candles | 1h |
| Costs | fees, slippage and funding on every trade |
| Versions that lost money | 14% |
| Verdict | No edge after costs |
In short
We coded the rule, tested 1249 versions of it on 24 markets from 2022 to 2025, fees, slippage and funding included. 14% of the versions lost money. The best version did not survive older data it had never seen (2020–2022).
The rule people share
As it is usually explained:
Explained: the terms
- This is Bitcoin. One candle = one day. — This is Bitcoin. One candle is one day.
- The fast average — The fast average: the mean price of the last 20 days.
- The slow average — The slow average: the last 50 days. It moves more slowly.
- Fast crosses above slow: buy — When the fast one crosses above the slow one, traders buy. That's a golden cross.
- Crosses back below: sell — When it crosses back below, they sell. That's a death cross.
How we tested it
Data
1h candles of 24 markets (APR, ARB, BAT, BTC, BZ, DOGE, ETH, FIL, HYPE, NEAR, PEPE, PUMP, QQQ, SOL, SPY, STRK, SUI, TIA, UNI, WLD, XAG, XAU, XRP, ZEC), from 2022-11-10 to 2025-07-09. Crypto prices come from OKX perpetual futures; the 2020–2022 check uses Binance's public archive (median price gap to OKX: 0.06%). US index data comes from HistData.
Costs
Every trade pays a 0.05% taker fee per side, 2–5 basis points of slippage per side, and funding every 8 hours at each market's measured average rate. Results are in R: 1 R is the amount risked on one trade (entry to stop), so strategies with different stops compare fairly.
Versions
A rule shared online is never fully specified (which stop? which holding time? which timeframe?). So we test every reasonable reading: each combination of the settings below is one version.
Two halves
The data is split in two halves (a rising market, then a flatter one). A real edge should work in both.
Against the market
A long trade in a rising market makes money without any skill. We subtract what simply holding the crypto market (an equal-weight basket) on the same side over the same days would have made: what remains is what the rule adds.
Older data, never seen
The best version is then run, unchanged, on 2020–2022 data that played no part in choosing it (a crash, a bull market and a bear market).
Results
All 1249 versions
Each bar counts versions by their average result per trade after costs (clipped to ±1 R). Green: made money; red: lost money.
The best of 1249 versions
40 trades, 25% winners, +2.743 R per trade on average, +109.7 R in total, worst drawdown −6.4 R.
Cumulative result after costs, trade after trade (dashed line: start of the second half).
- First half: +2.209 R per trade. Second half: +3.138 R per trade.
- Against holding the market over the same days: +1.934 R per trade (week-clustered t = 1.3).
- Same settings on 2020–2022: 31 trades, +0.377 R per trade, −0.147 R per trade against the market.
Why “the best version” misleads
With 1249 versions, some look good by luck alone. The typical version made +0.204 R per trade; the best made +2.743. If the rule had no edge at all, the spread of results would look like this anyway: the best of many random tries always looks impressive. That is why we never trust the best version until it works on data it was not chosen on.
Verify it yourself
- Write the rule exactly (below: our specification and every setting we tried).
- Get free data: Binance's public archive (data.binance.vision) has years of candles; OKX and most exchanges offer an API.
- Include costs: fees on both sides, slippage, and funding for perpetual futures.
- Count results in R (risk per trade), not in %, and look at the typical version, not the best one.
- Split your data in two and keep a part you never look at until the end.
- Compare with simply holding the market over the same days.
Our exact specification (the lab's own words, in English)
Strategy D: slow moving-average trend following (multi-week holds). Enter in the direction of a fresh cross of a 20-day EMA over a 50-day EMA. Protective stop at stop_mult × the average daily range (14 days); no target; exit after hold_bars (20 days). Costs are a small fraction of 1R at this distance. Values fixed a priori; not tuned on results.
Settings tried
| Setting | Values |
|---|---|
fast | 1920, 2880, 480, 960 |
slow | 14400, 19200, 2880, 4800, 9600 |
stop_mult | 1, 2, 3, 5 |
hold_bars | 1920, 4800, 960, 9600 |
timeframe | 1d, 1h, 4h |
gate_long | any, bull, not_bear, off |
gate_short | any, flat, off |
entry_mode | at_stop, market, pullback |
entry_stop | 0.25, 0.5, 1 |
entry_wait | 3 |
exit_scale | —, 1:0.33,2:0.33, 1:0.5 |
exit_scale_be | 0, 1 |
entry_pull | 0.25, 0.5 |
avg_down | 0, 2 |
avg_stop | 0.5, 1, 2 |
avg_exit | breakeven, strategy |
gate_basis | market, risk |
sent_weight | 0, 0.5, 1 |
sent_mode | contrarian, follow |
sent_block | 0, 0.5 |
session | any, asia, london, london_ny, ny, outside |
Settings of the version shown
fast | 960 |
slow | 9600 |
stop_mult | 1 |
hold_bars | 4800 |
session | ny |
timeframe | 1h |
Download every trade of the version shown (CSV, 40 rows)
Limitations
- A backtest is not live trading: fills, outages and your own discipline differ.
- We test the rule as written; a trader's discretion is not testable.
- Markets change. A rule that failed here could work elsewhere, and the reverse.
- Costs depend on your exchange and size; ours are typical retail perpetual-futures costs.
Questions
Did you include fees?
Yes: fees, slippage and funding on every trade, from real exchange schedules.
Maybe it works on another timeframe?
We tested several timeframes and holding times: see “Settings tried”. The result does not depend on one choice.
Maybe it works with better risk management?
We tried stops of different widths, targets, trailing stops and partial exits. Risk management changes the shape of the results, not the sign of the edge.
Why should I trust you?
You should not: verify. The rule, every setting and every trade are on this page.
Does this mean nobody makes money with it?
Some traders will, by skill elsewhere or by luck. This test only says the rule itself does not give an edge after costs.
Disclaimer
Educational content based on historical backtests. Not financial advice. Past results do not predict future results. Trading leveraged products can lose more than you invest.