Join waitlist
Strategies / Breakout / Upper Band Breakout with ATR Filter

Upper Band Breakout with ATR Filter

The system buys when price closes above the upper Bollinger Band while ATR is above its longer-term average. It closes the long when price falls below the 40-period average, with a 2 percent stop loss.

BreakoutLong onlyIntradayGold30 min
1.24Profit factor
1,796Net profit EUR
39.76%Win rate
1,670Trades
-455Max drawdown
1.08Avg trade

Best run of 26. Gold, 30 min, spread 0.6, from run pf:2026-10-12-GOLD-30m.tsv:2.

Entry rules, long

  1. ATR (14) is above its 100-period exponential average and above 0.0135 percent of the close.

Exit rules

  1. A stop loss is set 2 percent below the fill.

Test conditions

PeriodUp to 2026-10-12
InstrumentGold, 30 minutes
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 run30 min1.24 1,67039.761,796 EUR-455
USD/JPY30 minn/a 1,41340.34374,430 USD-112,970
USD/JPY15 minn/a 1,41638.84275,400 USD-79,220
USD/JPY1 hourn/a 96540.62252,380 USD-174,270
EUR/USDDailyn/a 8043.7531,229 USD-29,134
Nikkei 225Dailyn/a 5731.5825,441 USD-7,096
Nikkei 2254 hoursn/a 14141.1324,738 USD-5,924
Silver4 hoursn/a 23533.1915,013 USD-14,716
Nikkei 2251 hourn/a 64038.2812,579 USD-5,840
Nikkei 2253 minn/a 1,19135.779,362 USD-6,186
Nikkei 2255 minn/a 1,31936.929,279 USD-8,203
Dow Jones30 minn/a 77343.348,579 EUR-6,888
Nasdaq 10030 minn/a 2,00041.356,290 EUR-3,027
Nasdaq 1001 hourn/a 1,00537.516,211 EUR-2,411
Brent CrudeDailyn/a 4017.505,662 EUR-4,479
DAX 401 hourn/a 85939.234,091 EUR-2,875
Nasdaq 1004 hoursn/a 21639.814,064 EUR-2,317
DAX 40Dailyn/a 9137.363,787 EUR-1,733
Dow Jones3 minn/a 1,26835.093,751 EUR-3,324
Nasdaq 1005 minn/a 1,29035.433,694 EUR-2,513
Gold4 hoursn/a 23242.241,989 EUR-621
Gold1 hourn/a 93440.901,388 EUR-844
Gold10 minn/a 1,42734.411,075 EUR-480
Gold5 minn/a 1,34835.981,026 EUR-293
S&P 500Dailyn/a 10532.38898 EUR-419
S&P 5004 hoursn/a 20540.98826 EUR-812

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Upper Band Breakout with ATR Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

basis = Average[40](close)
dev = STD[40](close)
upper = basis + dev * 2

myAtr = AverageTrueRange[14](close)
atrsm = ExponentialAverage[100](myAtr)

14 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

Bollinger BandsSMAStandard DeviationATREMA
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 Upper Band Breakout with ATR 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 26 market and timeframe combinations. The best run was Gold, 30 minutes, with a profit factor of 1.24 over 1,670 trades.

How large was the drawdown?

The best run had a maximum drawdown of 455 EUR at the tested position size, against a net result of 1,796 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Pathfinder

Also a breakout strategy.

1.24 PF · 430 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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