Playbooks

SNDK Donchian Breakout: Long or Short With a 3×ATR Trailing Stop

Published

Some stocks do not drift; they lurch. They run hard for weeks, then reverse just as hard. This strategy is built for that kind of market. It trades a single SNDK perpetual on daily bars with one of the oldest rules in trend following: go long when the close breaks above its recent range, go short when it breaks below, and let a volatility-based trailing stop decide when the move is over.

It holds one position at a time, long or short, at 1x leverage. The backtest runs from June 2025 to August 2026.

How it works

1. Define the range and trade the break

Each day the strategy builds a Donchian channel from the previous 20 daily bars. The upper band is their highest high; the lower band is their lowest low. Today's bar is left out, so a signal needs the close to clear the whole range that existed before today.

Uppert=max⁡(Ht−20,…,Ht−1),Lowert=min⁡(Lt−20,…,Lt−1)\text{Upper}_t = \max(H_{t-20}, \dots, H_{t-1}), \qquad \text{Lower}_t = \min(L_{t-20}, \dots, L_{t-1})

A close above the upper band opens a long position. A close below the lower band opens a short. If the strategy already holds the opposite side, it closes that position and reverses. Each entry uses 60% of available buying power, so 40% of the account stays in reserve.

Close20-bar high / low (prior bars)Long entryShort entryStop exit
Illustrative price path with the rules applied exactly: 20-bar channel, 3 × ATR(14) trailing stop. Closes above the band go long, closes below go short; hollow circles are stop exits.

2. Let a volatility stop end the trade

Once in a trade, the strategy tracks the best price reached: the highest high since entry for a long, the lowest low for a short. The stop sits three ATRs behind that extreme:

Stoplong=max⁡since entryH−3 ATR14,Stopshort=min⁡since entryL+3 ATR14\text{Stop}_{\text{long}} = \max_{\text{since entry}} H - 3\,\text{ATR}_{14}, \qquad \text{Stop}_{\text{short}} = \min_{\text{since entry}} L + 3\,\text{ATR}_{14}

ATR(14) is the average true range of the last 14 bars: the typical daily move, including gaps. It is recalculated every day, so the stop widens when the stock becomes more volatile and tightens when it calms down. A close beyond the stop ends the trade. Because the stop follows the best price rather than the entry price, a trade that has run far in the right direction keeps most of that move.

Breakout entryClose < stopstop 3 × ATR(14) below the highHighest highsince entryStop = highesthigh − 3 × ATRClose
Illustrative long trade from the same path. The stop follows the highest high since entry at a distance of three ATRs, so it rises with the trend and the trade ends on the first close below it.

3. Wait, re-enter or reverse

After a stop exit the strategy is flat. It does not jump back in just because price recovers; it waits for a new close beyond the 20-bar range. If the old trend resumes and sets a new 20-bar high, it goes long again. If price breaks the 20-bar low instead, it goes short. One rule can therefore ride a rally, step aside during the turn and then ride the decline.

Short60% sizeFlatLong60% sizeclose > 20-bar highclose < peak − 3 ATRclose < 20-bar lowclose > trough + 3 ATROpposite breakout: close the position and reverse
The strategy is always in one of three states. Breakouts move it into a position, the trailing stop moves it back to flat, and an opposite breakout reverses it directly.

Results

+365.32%

Annual return

+557.48%

2.56

Max drawdown

39.71%

A $10,000 account grew to $46,532 between June 2025 and August 2026: a total return of 365.3% and an annualized return of 557.5%. The Sharpe ratio was 2.56. The maximum drawdown was 39.7%, and the longest drawdown lasted 52 days. Annual return divided by maximum drawdown (the Calmar ratio) was 14.04.

Trade statisticValue
Fills15
Closed trades7 (3 winners, 4 losers)
Win rate42.9%
Average winning trade$15,692
Average losing trade$3,337
Profit factor (gross profit ÷ gross loss)3.53
Profitable vs losing days132 vs 109

The sample is small. The whole result rests on 7 closed trades, and 3 winners produced all $47,075 of gross profit. The annualized figure projects about fourteen months of one stock onto a full year. Read it as evidence of how the rule behaves in a strongly trending, volatile market, not as a forecast.

Costs also matter. Live trading adds fees, slippage and funding, and the backtest books no funding payments. Stops act on the daily close, so a large one-day move can exit well beyond the stop level. Even with only 60% of capital in each trade, the account fell 39.7% from its peak at the worst point.

Why it works

A breakout marks a change in control. Inside a range, buyers and sellers are roughly balanced. A close beyond the 20-bar extreme means one side has pushed price past every level of the last 20 bars. In a stock that swings widely, that push can be the start of a move many times larger than the stop distance.

The stop is sized to the noise. A fixed-percentage stop is too tight for a volatile stock and too loose for a calm one. Three ATRs give each trade room to survive ordinary swings, and trailing the extreme keeps most of a large move once it happens.

It trades both directions. A long-only trend system sits idle during a collapse. This one goes short on a downside breakout, so a sharp reversal becomes a second opportunity instead of only a loss.

The payoff is lopsided by design. A losing trade ends as soon as price closes three ATRs away from its best level, often soon after entry. A winning trade runs until the trend breaks. In this test the 3 winners averaged $15,692 and the 4 losers averaged $3,337, a ratio of about 4.7 to 1. At that ratio the break-even win rate is about 17.5%. The strategy won 42.9% of its trades.

3 winning tradesaverage $15,692total $47,075Average win ≈ 4.7× average lossBreak-even win rate ≈ 17.5%Actual win rate 42.9%4 losing trades, average $3,337, total $13,350Width = number of closed trades. Height = average result. Area = total profit or loss.
Drawn to scale from the backtest's 7 closed trades. The green block is 3.53 times the area of the red block.

The weakness is the mirror image. In a sideways market, price can close just above the range, fail, and stop out, then do the same on the downside. Each false breakout costs up to three ATRs from the best price. On a single instrument, whipsaw like this is the main risk of the approach.

Ideas to test next

Size by risk, not by a fixed share

Every trade now uses 60% of buying power whatever the volatility, so a stop-out in a wild market costs much more than one in a calm market. Sizing each entry so that the distance to the stop equals a fixed share of equity keeps every loss about the same size and may cut the 39.7% drawdown.

Exit sooner on a reversal

A three-ATR stop can give back a large part of a move after a sharp peak. Adding a classic 10-bar exit channel, which closes a long on a close below the prior 10-bar low, may keep more of each trend at the cost of more re-entries.

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