← All lessons

Breakouts

Build a channel breakout rule · 9 min

FreeGoal: Build a channel breakout ruleBefore this: Survivorship biasFurther reading: Clenow, Following the Trend
A generated market and its 20-day channel

Green: highest high of the previous 20 days. Red: lowest low of the previous 20 days.

Predict first

A rule buys every close above the 20-day high and sells every close below the 20-day low. On a market with no trend at all (a pure random walk), what does it earn before costs, on average?

A channel breakout is the oldest trend rule there is: buy when price closes above the highest high of the last N days, sell short when it closes below the lowest low. The channel uses the days before today, so the signal is known at the close and the trade is held from the next day.

channel top = highest high of the previous N days
enter long when close > channel top · exit when close < lowest low of M days

Most systems exit on a shorter channel than they enter (enter on 50 days, exit on 20). The entry demands a real move; the exit gives back less of a trend once it turns. The result has a typical shape: a low win rate, often 35–45%, with winners much larger than losers. The profit comes from the few long trends, the losses from many small false starts.

Position size should not depend on the market's price level. The figures here scale every position to the same volatility, which lesson D3-3 explains in detail. Switch the market type below: the same rule that earns on a trending market bleeds on a range market, where breakouts usually reverse.

Try it: a breakout system on three kinds of market

Green: 50-day high (entry for longs). Red: 20-day low (exit for longs). Arrows mark entries; green and red dots mark winning and losing exits over the last 220 days.

0.32×1.15×1.98×01451
  • Breakout system
  • Buy and hold
Sharpe ratio0.44
Return a year5.1%
Volatility13.2%
Max drawdown-34.7%
Trades20
Winners40%

Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.

Worked calculation

Entry, stop and size for one breakout

Highs of the last 5 days
101.20, 102.80, 102.10, 103.40, 102.90
Channel top (5-day high)
103.40
Today closes at 103.90
103.90 > 103.40: buy at 103.90
Stop 2 × ATR below, ATR = 1.60
103.90 − 3.20 = 100.70
Risk budget: 1% of $50,000
$500
Shares = $500 ÷ 3.20 per share
156.25 → 156 shares
Check yourself
4 questions

The highest high of the previous 20 days is 57.30. Today the high is 57.80 and the close is 57.10. Does a close-based 20-day breakout rule buy today?

A trend system wins only 38% of its trades yet makes money. How?

Why do many breakout systems exit on a shorter channel (20 days) than they enter (50 days)?

A breakout system earns +0.08% per trade before costs. Each round trip costs 0.10%. What is it worth after costs?

Missed questions come back for review after one day, then three, then a week.

Practice

The highs of the last 5 days were 43.23, 45.59, 46.82, 45.68, 47.08. A 5-day breakout rule buys when the close is above the highest of them. At what price level does it buy?

Hint: The channel top is the highest high of the previous days (today is not included).

More in Drills →

Closing round

Three years of a fresh generated market are on screen; the next two years do not exist yet. Tune the rule on what you can see, commit to two predictions, then generate the future.

0.99×1.10×1.21×0625
  • Your rule so far
Sharpe before split0.26
Return before split5.7%
Max drawdown before-17.7%
Dickey–Fuller t (log price)-1.96

Over the next two years, after costs, this rule will…

What kind of market is this?

Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.

Want to feel it candle by candle? Trade a breakout in the steady-uptrend market →