Strategies / S28
Breakout With ATR Trail
A 20-bar high, then a 3 ATR trailing stop rides the move.
Results
| Market class | Return | Holding | Sharpe | Max DD | Win rate | Trades |
|---|---|---|---|---|---|---|
| Crypto, 4h | -48.7% | +518% | -0.09 | -77.0% | 32.5% | 4,147 |
| Stocks, 1d | +1,421% | +28K% | 0.98 | -24.9% | 45.6% | 986 |
| Forex, 1d | +4.1% | +3.1% | 0.06 | -17.0% | 38.9% | 429 |
| Commodities, 1d | +367% | +1,833% | 0.56 | -23.7% | 43.3% | 582 |
| Indices, 1d | +209% | +878% | 0.58 | -20.1% | 45.1% | 577 |
The exact rule
- Go long when close is above the 20-bar high.
- Stop: 3 ATR(14) from entry.
- The stop trails 3 ATR(14) behind the last close.
- Declared timeframe: 4h.
Explain it with Ask AI (Premium, on a desktop)
Watch it trade
This runs the same engine in your browser on the latest candles, with your own costs. Press Replay to watch every entry and exit arrive bar by bar.
Download
Pine ScriptFor TradingView
Paper botRuns on the Bot API, no real money
Python backtestOne file, no dependencies
READMEThe rule in plain words
Want it to run by itself? Read the automate guide, and use paper money first.
Related strategies
Donchian Breakout 20Buy a new 20-bar high, sell a new 10-bar low.Donchian 55 (Turtle)The Turtle system: a 55-day high in, a 20-day low out.Donchian Long & ShortGoes with whichever side breaks a 20-bar range.
Research, not advice. Past results do not predict future ones. Results run to 2026-10-31.