Donchian Channel Breakout Backtest in Crypto: Fees, Slippage and Break-Even Costs
Donchian breakouts buy new N-bar highs. They are among the oldest trend rules, and their crypto backtests are very sensitive to how the breakout is filled.
Short answer
A Donchian channel breakout enters when price exceeds the highest high of the last N bars (and exits on an M-bar low). The key backtest choice is the fill: a stop order at the channel level fills at or above that level, but in fast markets the actual fill can be far beyond it; filling at the bar's close instead assumes you waited. Break-even cost depends on that choice. Use stop-entry fills with slippage scaled by bar range, and compare results across several N values to avoid choosing a lucky one.
Fill choices
| Fill model | Effect |
|---|---|
| At channel level exactly | Optimistic; ignores gaps |
| At level + range-based slippage | Realistic |
| At breakout bar close | Later; different strategy |
| Next bar open | Conservative |
| Item | Value (illustrative) |
|---|---|
| Trades | 110 |
| Gross avg per trade | +0.65% |
| Fees (2 × 0.05%) | −0.10% |
| Slippage (2 × 0.08%) | −0.16% |
| Net avg per trade | +0.39% |
| Break-even round-trip cost | 0.65% |
Review Donchian Channel Breakout Backtest in Crypto with bar replay before using it live.
Open ChartsPod replaySensitivity to N
Conclusion
Related: Parameter Optimization: Report All Trials, Not Just the Winning Curve, Bollinger Squeeze Breakout Backtest in Crypto: Fees, Slippage and Break-Even Costs.
Model Donchian entries as stop orders with range-based slippage and report results across channel lengths.
Put Donchian Channel Breakout Backtest in Crypto next to price, flow and positioning in one workspace.
Open a ChartsPod workspaceQuestions readers ask
How should Donchian breakouts be filled?
As stop orders at the level plus slippage.
Which N is best?
Test several; choose a stable region.
Do breakouts work in crypto?
Results vary by period; test with realistic fills.
Sources and methodology
Backtest cost logic follows TradingView's Pine Script strategy documentation; indicator definitions are standard. All performance numbers are illustrative examples of the method, not results of real tests.
- TradingView Pine Script: Strategies — simulated fills and assumptions.
- TradingView Pine Script: Repainting — live vs historical calculation.
- ChartsPod documentation — guides for order flow, derivatives, alerts, backtests, journal and workspaces.
This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.
CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.