kestrelsign in

Bitcoin 50-day breakout / 20-day exit

Buy BTC on a close above the prior 50-day closing high; exit when it closes below its 20-day SMA.

BTC/USD, backtested 2021-06-01 to 2026-09-27 with $100,000

2026-09-27strategy +73.6%BTC/USD +130.2%
strategyBTC/USD
total return+73.6%+130.2%
annualised+10.9%+17.0%
sharpe0.540.56
max drawdown-39.7%-76.7%
volatility24.5%53.5%

Ended at $173,564. Decisions after each close, fills at the next open, 5 bps slippage, crypto fees 25 bps.

trades
29
win rate
45%
avg trade
+2.75%
profit factor
1.64
time invested
24%

Rules

  • Trades BTC/USD.
  • Sell the position when price < SMA(20).
  • Buy with 100% of cash when price > 50-day high yesterday.

By year

yearstrategyBTC/USDdifference
2021-4.3%+25.9%-30.3 pts
2022-22.7%-64.2%+41.5 pts
2023+62.1%+155.8%-93.7 pts
2024+37.6%+119.2%-81.6 pts
2025+0.1%-6.0%+6.1 pts
2026+5.1%-3.1%+8.2 pts

Held at the end of the backtest

BTC/USDsince 2026-09-22$173,564-2.5%

Latest trades (29 in total)

symbolboughtsolddaysentryexitreturnwhy it sold
BTC/USD2026-08-202026-09-102169358.3178239.61+12.3%rule 1
BTC/USD2026-04-172026-05-162975183.3179017.63+4.6%rule 1
BTC/USD2026-01-142026-01-21795454.7788323.72-8.0%rule 1
BTC/USD2025-10-042025-10-117122373.42112939.40-8.2%rule 1
BTC/USD2025-08-132025-08-196120186.91116142.90-3.9%rule 1
BTC/USD2025-07-112025-07-3019116072.61117836.38+1.0%rule 1
BTC/USD2025-04-232025-05-303793570.48105587.05+12.3%rule 1
BTC/USD2024-12-142024-12-206101546.9697422.10-4.6%rule 1
BTC/USD2024-11-072024-12-113475729.1696721.14+27.2%rule 1
BTC/USD2024-10-152024-11-052166143.4667744.53+1.9%rule 1
BTC/USD2024-09-272024-10-02565188.0260742.36-7.3%rule 1
BTC/USD2024-02-102024-03-173647198.9465269.08+37.7%rule 1
BTC/USD2024-01-092024-01-13447024.2842759.03-9.5%rule 1
BTC/USD2024-01-022024-01-04244214.1042838.31-3.6%rule 1
BTC/USD2023-12-022023-12-181638732.9441315.25+6.2%rule 1
BTC/USD2023-10-172023-11-223628546.1335729.80+24.6%rule 1
BTC/USD2023-07-142023-07-15131502.9830297.30-4.3%rule 1
BTC/USD2023-06-222023-07-101830013.8330161.23-0.0%rule 1
BTC/USD2023-04-112023-04-20929668.8428826.43-3.3%rule 1
BTC/USD2023-03-172023-04-082225045.2427914.78+10.9%rule 1
BTC/USD2023-02-162023-02-25924339.7623177.68-5.3%rule 1
BTC/USD2023-01-122023-02-072617945.4922756.52+26.2%rule 1
BTC/USD2022-11-052022-11-09421159.7218536.97-12.9%rule 1
BTC/USD2022-08-112022-08-18723976.4823326.99-3.2%rule 1
BTC/USD2022-03-282022-04-071046866.4843150.43-8.4%rule 1
BTC/USD2021-11-092021-11-17867603.3660072.49-11.6%rule 1
BTC/USD2021-10-072021-10-282155366.2458439.61+5.0%rule 1
BTC/USD2021-09-042021-09-08450051.6046847.78-6.9%rule 1
BTC/USD2021-07-312021-08-313142245.8046959.39+10.6%rule 1
Strategy document
{
  "name": "Bitcoin 50-day breakout / 20-day exit",
  "rules": [
    {
      "then": {
        "sell": {}
      },
      "when": {
        "lt": [
          {
            "price": {}
          },
          {
            "sma": {
              "period": 20
            }
          }
        ]
      }
    },
    {
      "then": {
        "buy": {
          "percent_of_cash": 100
        }
      },
      "when": {
        "gt": [
          {
            "price": {}
          },
          {
            "highest": {
              "offset": 1,
              "period": 50
            }
          }
        ]
      }
    }
  ],
  "universe": {
    "symbols": [
      "BTC/USD"
    ]
  },
  "description": "Buy BTC on a close above the prior 50-day closing high; exit when it closes below its 20-day SMA."
}