Join waitlist
Strategies / Breakout / Channel Breakout With Trend Filter

Channel Breakout With Trend Filter

The strategy buys when the close breaks above the highest high of the prior 20 bars and is at or above the 200-period EMA. Each trade has a stop at 2 times the 20-period ATR and a target at 2 times that distance.

BreakoutLong onlySwingGoldDaily
1.62Profit factor
2,546Net profit EUR
43.68%Win rate
261Trades
-501Max drawdown
9.75Avg trade

Best run of 18. Gold, Daily, spread 0.6, from run pf:2026-10-12-GOLD-D.tsv:9.

Entry rules, long

  1. The previous close was at or below the highest high of the 20 bars ending 2 bars earlier
  2. The close is at or above the 200-period EMA
  3. No position is currently open

Exit rules

  1. The profit target is 2 times the stop distance from the entry price
  2. No other exit applies, so the trade ends only at the stop or the target

Test conditions

PeriodUp to 2026-10-12
InstrumentGold, Daily
Spread0.6 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest runDaily1.62 26143.682,546 EUR-501
DAX 40Daily1.49 36237.8512,977 EUR-2,741
USD/JPYDaily1.42 52039.0426,920 USD-4,270
Gold4 hours1.41 58639.252,730 EUR-531
Dow Jones1 hour1.24 72336.9317,897 EUR-3,967
S&P 5004 hours1.23 56734.042,095 EUR-479
Nikkei 22530 minn/a 3,32332.4716,648 USD-9,276
Nikkei 2254 hoursn/a 45936.8215,500 USD-7,219
Silver4 hoursn/a 50637.7513,969 USD-10,267
Nikkei 2251 hourn/a 1,67733.5713,632 USD-10,121
Dow JonesDailyn/a 27740.7911,453 EUR-8,336
DAX 404 hoursn/a 53936.557,986 EUR-2,452
Nasdaq 1004 hoursn/a 62935.937,552 EUR-3,762
Nasdaq 10030 minn/a 3,63832.447,359 EUR-3,093
Nasdaq 100Dailyn/a 28536.847,319 EUR-3,398
US Crude OilDailyn/a 21539.077,029 EUR-4,518
Dow Jones4 hoursn/a 17536.006,244 EUR-4,447
S&P 500Dailyn/a 33136.251,821 EUR-768

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Channel Breakout With Trend Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

up = highest[20](high)[1]
upprev = highest[20](high)[2]
ema = ExponentialAverage[200](close)
myAtr = Average[20](TR(close))
dist = 2.0 * myAtr

9 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 ChannelEMAATRTrue Range
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Channel Breakout With Trend Filter 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 18 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 1.62 over 261 trades.

How large was the drawdown?

The best run had a maximum drawdown of 501 EUR at the tested position size, against a net result of 2,546 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Range Breakout Pending

Also a breakout strategy.

1.64 PF · 808 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