How to backtest Bitcoin with a 9/21 moving average crossover

Reviewed by the Backtest Editorial Team · Updated November 15, 2026 · Editorial policy

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

  1. Check that the form shows the BTCUSDT perpetual contract, hourly candles, MA Cross and long-only entries.
  2. 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.
  3. 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.
  4. 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.
Bitcoin backtest result with candles, simulated fills and exit levels
Select a trade marker to inspect its simulated entry and exit. The dates and costs you choose determine the figures for your run.

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.

More guides

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.