Join waitlist
Strategies / Trend / Trend Band Breakout Long

Trend Band Breakout Long

The strategy buys when a band around a double-smoothed average of price flips to a bullish state, and sells when it flips back. The band width adapts to recent distance of price from the average.

TrendLong onlyIntradayGold30 min
1.33Profit factor
3,107Net profit EUR
39.14%Win rate
1,344Trades
-757Max drawdown
2.31Avg trade

Best run of 39. Gold, 30 min, spread 0.6, from run pf:2026-10-13-GOLD-30m.tsv:1.

Entry rules, long

  1. The basis is a 12-period SMA of a 12-period EMA of close.

Exit rules

  1. The close moves below the lower band, which is the basis minus the same 2 times 36-period EMA deviation, and the long is closed.

Test conditions

PeriodUp to 2026-10-13
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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run30 min1.33 1,34439.143,107 EUR-757
Gold10 min1.26 1,36135.272,321 EUR-536
USD/JPY30 min1.22 1,33239.04724,250 USD-170,490
Nasdaq 10030 min1.22 1,43641.3614,040 EUR-3,528
USD/JPY15 min1.21 1,35238.61491,370 USD-98,820
USD/JPY1 hourn/a 90440.60505,860 USD-367,550
USD/JPY10 minn/a 1,33837.74396,600 USD-156,900
EUR/USDDailyn/a 6547.6982,061 USD-33,840
Nikkei 225Dailyn/a 5952.5457,531 USD-11,480
Nikkei 2254 hoursn/a 16346.0137,845 USD-7,644
Nikkei 22530 minn/a 1,25438.1233,434 USD-10,415
Nikkei 2251 hourn/a 60942.6932,664 USD-7,101
Silver4 hoursn/a 20239.6030,087 USD-14,275
Silver30 minn/a 1,36035.4424,182 USD-15,714
Nikkei 2252 minn/a 1,32137.0217,986 USD-7,928
Nikkei 22510 minn/a 1,31837.7817,914 USD-12,695
Nasdaq 1001 hourn/a 85839.8614,310 EUR-4,161
Nikkei 2253 minn/a 1,33235.6611,965 USD-8,726
Silver15 minn/a 1,39533.8411,669 USD-10,035
Nasdaq 1004 hoursn/a 19946.7311,395 EUR-5,288
Nasdaq 1005 minn/a 1,27938.6210,559 EUR-3,329
DAX 4030 minn/a 1,39338.339,317 EUR-3,888
Nasdaq 10015 minn/a 1,40139.409,313 EUR-3,892
Dow Jones4 hoursn/a 6650.009,038 EUR-6,313
DAX 404 hoursn/a 19942.218,216 EUR-3,763
US Crude OilDailyn/a 7139.448,049 EUR-5,450
Brent Crude4 hoursn/a 10243.147,434 EUR-7,293
Nasdaq 10010 minn/a 1,38935.137,171 EUR-5,243
Nasdaq 1003 minn/a 1,26438.926,436 EUR-3,097
Nasdaq 100Dailyn/a 6350.796,001 EUR-4,585
Gold4 hoursn/a 18843.093,308 EUR-951
GoldDailyn/a 8339.762,968 EUR-809
Gold1 hourn/a 81141.182,779 EUR-1,064
DAX 405 minn/a 1,36334.192,741 EUR-2,679
S&P 5004 hoursn/a 18943.922,460 EUR-941
Gold15 minn/a 1,36335.952,203 EUR-652
Gold5 minn/a 1,33037.821,648 EUR-848
Gold3 minn/a 1,32535.32845 EUR-772
S&P 5005 minn/a 1,33835.28786 EUR-681

Charts

Results by run

Top 10 of 39 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

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

DEFPARAM CumulateOrders = false

ONCE trend = 0

myE = ExponentialAverage[12](close)
basis = Average[12](myE)
ad = ABS(close - basis)
dev = ExponentialAverage[36](ad) * 2
upper = basis + dev
lower = basis - dev

18 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

SMAEMA
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Trend Band Breakout Long 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 39 market and timeframe combinations. The best run was Gold, 30 minutes, with a profit factor of 1.33 over 1,344 trades.

How large was the drawdown?

The best run had a maximum drawdown of 757 EUR at the tested position size, against a net result of 3,107 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

Asymmetric EMA Cross

Also a trend strategy.

1.33 PF · 1,019 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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