Playbooks

BTC 40-Day Breakout with a 3×ATR Trailing Stop

Published

This is a classic breakout system with two additions: a trend filter that decides when breakouts count, and a volatility-based trailing stop that decides when to leave. It trades a BTC perpetual on daily bars, long only, with one position at a time and the full account in each trade.

From 2023-11-05 to 2026-07-19, about 2.7 years, it turned $10,000 into $36,419, a total return of 264.2%. It did that with only 8 round trips.

How the strategy works

Entry: a new high inside an uptrend

When the account is flat, the strategy buys at the daily close if two conditions hold together:

  • The close is above the highest high of the previous 40 days, not counting today. Price has broken out of its recent range.
  • The close is above the 100-day simple moving average. The breakout happens inside a longer uptrend, not as a spike in a falling market.
Ct>max⁡(Ht−40,…,Ht−1)andCt>1100∑i=099Ct−iC_t \gt \max\left(H_{t-40}, \dots, H_{t-1}\right) \quad\text{and}\quad C_t \gt \frac{1}{100}\sum_{i=0}^{99} C_{t-i}

The trade uses 100% of equity with no leverage.

Buy at the closeclose above both linesdaily closehighest high of the prior 40 days100-day averageIllustrative path, not BTC data
Figure 1. The entry trigger. The stepped line is the prior 40-day high; it only resets when old highs drop out of the window. A buy needs the close above that line and above the 100-day average on the same day.

Exit: a 3×ATR stop that only moves up

Average true range (ATR) measures how far BTC typically moves in a day. Here it is the simple average of the true range over the last 14 days, where the true range is the largest of high minus low, high minus the previous close, and the previous close minus low.

At entry, the stop is set 3 ATR below the entry close. On every later close the strategy computes a new candidate stop the same way and keeps the higher of the old and new values. The position is sold at the close on the first day the close falls below the stop.

St=max⁡(St−1, Ct−3 ATR14,t),exit when Ct<St−1S_t = \max\left(S_{t-1},\ C_t - 3\,\mathrm{ATR}_{14,t}\right), \qquad \text{exit when } C_t \lt S_{t-1}

That is the only exit. There is no profit target, and the strategy does not sell when price drops back below the 100-day average. A trade ends only when the trailing stop is hit.

give-back:peak close to exitentryclose below stop: exitstop = close − 3 × ATR, raised onlydaily closetrailing stopin positionIllustrative path, not BTC data
Figure 2. The life of one trade. As the close rises, the stop follows it 3 ATR below; when the close falls, the stop stays where it is. The distance from the peak close to the exit is the profit given back to confirm that the trend has ended.

Backtest results

+264.19%

Annual return

+61.20%

1.03

Max drawdown

59.42%

The strategy compounded at 61.2% per year with a Sharpe ratio of 1.03. The cost was a 59.4% maximum drawdown, with a maximum drawdown duration of 211 days. The Calmar ratio, annual return divided by maximum drawdown, is 1.03.

MeasureValue
Instrument and barBTC perpetual, daily
Period2023-11-05 to 2026-07-19
Sizing100% of equity, long or flat
Capital$10,000 to $36,419
Total return264.2%
Annual return61.2%
Sharpe ratio1.03
Max drawdown59.4%
Max drawdown duration211 days
Trades (entries plus exits)16
Win rate62.5%
Gross profit ÷ gross loss2.80
Average win / average loss$8,282 / $4,931
Funding return0.0%

The 16 trades are 8 entries and 8 exits. 5 round trips made money and 3 lost, a 62.5% win rate. The winners earned $41,411 in total and the losers gave up $14,792.

5 winning trades$41,411 gross profitaverage $8,2823 losing trades$14,792 gross lossaverage $4,931Gross profit ÷ gross loss = 2.80. Average win ÷ average loss = 1.68.
Figure 3. Trade ledger from the backtest. Winners were both more frequent and larger than losers.

The account was also out of the market most of the time. Equity changed on only 382 of 988 days (196 up, 186 down). On the other days the strategy held cash and waited for the next breakout.

Why it works

Breakouts mark the start of trends. A close above a 40-day high means buyers have pushed price past every level of the last two months. Any sustained advance has to pass through new 40-day highs, so the entry is in place whenever a trend begins.

The trend filter removes weak breakouts. A 40-day high can also appear as a short rally inside a downtrend. Requiring the close to be above the 100-day average keeps the strategy out of those, and reserves the full position for breakouts that agree with the longer trend.

The stop adapts to volatility. A fixed percentage stop is too tight in volatile markets and too loose in calm ones. A 3 ATR stop stays the same multiple of the typical daily range away from price in either regime, so ordinary noise does not end a trade but a real reversal does.

The ratchet locks in gains. Because the stop never moves down, a winning trade's worst outcome improves every time price makes progress. Losing trades are capped by the stop, while winning trades run until the trend breaks. That is why the average win is 1.68 times the average loss.

What it costs

  • Deep drawdowns. Each trade puts the whole account in one asset. A trailing stop gives back 3 ATR or more from the peak close before it exits, and the stop is only checked on daily closes, so a sharp drop can carry price well past it. That is how a strategy with a stop can still show a 59.4% maximum drawdown.
  • Few trades. 8 round trips in 2.7 years is a small sample. A single trade more or less could change the result a lot.
  • Funding is not included. A long perpetual position pays or receives funding while it is open. This backtest records a funding return of 0, so live results will differ by the funding paid during holding periods.
  • Long only. The strategy earns nothing in falling markets. It only avoids them.

Ideas to improve it

Size each trade by its stop distance

The 59.4% drawdown comes from always holding 100% of equity. Classic breakout systems size each trade so that hitting the initial stop costs a fixed share of equity. When ATR is large, the position becomes smaller. This version risks 3% of equity per trade, capped at 1x.

Run the same rules on BTC and ETH

Eight round trips is a thin record. Running the identical rules on an ETH perpetual next to BTC, with half the equity each, roughly doubles the number of trades and spreads the risk of any single breakout failing.

Built by an AlphaPilot user. Historical backtest results do not predict future returns. Not investment advice.