How to backtest Bitcoin with a 9/21 moving average crossover
What happened after Bitcoin’s 9-period moving average crossed above its 21-period average? Use a BTCUSDT backtest on hourly candles to inspect the entries, exits and drawdown that followed each crossover.
Set up the BTC backtest
Open the BTCUSDT moving average setup
- Check that the form shows the BTCUSDT perpetual contract, hourly candles, MA Cross and long-only entries.
- To repeat the same test later, switch the period from one month to Custom and enter September 1 to September 30, 2026. A rolling month will use different candles when you reopen it.
- For this example, set simulated capital to $10,000, isolated margin with 1× leverage, and margin allocation to 2%. Choose TP/SL-only exits, a 2% stop and a 4% target. Use a commission of 0.10%, slippage of 5 bps (0.05%) and a funding rate of 0% as test assumptions.
- Run the backtest. Open a trade on the chart and compare its entry with the crossover candle. Check its exit reason and fees before interpreting the net result.

Does the rule hold up on a different month?
Record the number of closed trades, net profit after costs and maximum drawdown. Rerun the same settings for October 1 to October 31, 2026. If one trade accounts for most of a month’s profit, inspect that trade before treating the result as typical. To isolate execution costs, return to the September dates and change only slippage from 5 to 10 bps.
Related Bitcoin strategy tests
Try the worked BTC RSI example for a different entry rule or use the crypto backtesting guide to plan comparisons. Historical simulations cannot establish future profitability.
Backtest Methodology: How Strategy Tests Are Calculated
Backtest Trading
Backtest Trading · iOS & Android
Run another setup, inspect every simulated trade, and keep your strategy research close at hand.