Join waitlist
Strategies / Breakout / Donchian Breakout With SMA Slope

Donchian Breakout With SMA Slope

The system buys on a break above the prior 20-bar high while the 200-period SMA is flat or rising, and sells short on a break below the prior 20-bar low while it is falling. Each trade has a 0.5% stop and a 1.0% target.

BreakoutLong & shortSwingDAX 401 hour
n/aProfit factor
4,539Net profit EUR
33.49%Win rate
3,714Trades
-4,397Max drawdown
1.22Avg trade

Best run of 11. DAX 40, 1 hour, spread 3, from run sweeps:2026-10-03-DAX40-1h-opt.tsv:32.

Entry rules, long

  1. The 200-period simple moving average is flat or rising compared with the prior bar.

Entry rules, short

  1. The 200-period simple moving average is falling compared with the prior bar.

Exit rules

  1. The profit target is set 1.0% from the entry price.

Test conditions

PeriodUp to 2026-10-03
InstrumentDAX 40, 1 hour
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run1 hourn/a 3,71433.494,539 EUR-4,397
USD/JPYDailyn/a 85436.53847,040 USD-214,010
USD/JPY1 hourn/a 2,61934.02732,710 USD-317,150
USD/JPY10 minn/a 1,84831.06471,580 USD-190,810
USD/JPY15 minn/a 1,96131.36334,250 USD-226,650
USD/JPY30 minn/a 2,59333.05326,820 USD-268,560
EUR/USD1 hourn/a 3,23133.5533,180 USD-29,913
EUR/USDDailyn/a 84034.6419,861 USD-15,498
Nikkei 2253 minn/a 2,38432.4718,990 USD-8,244
GBP/USDDailyn/a 91234.433,615 USD-3,323
Gold4 hoursn/a 1,51933.25628 EUR-543

Charts

Results by run

Top 10 of 11 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Donchian Breakout With SMA Slope
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

sma = Average[200](close)

20 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

Donchian ChannelSMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 4,397 EUR is large next to the net profit of 4,539 EUR.

Questions

About this strategy

Can I run Donchian Breakout With SMA Slope in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 11 market and timeframe combinations. The best run by trade count was DAX 40, 1 hour, with 3,714 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,397 EUR at the tested position size, against a net result of 4,539 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs