Join waitlist
Strategies / Breakout / Bollinger Breakout With Trend Slope

Bollinger Breakout With Trend Slope

The idea buys when the close moves above the upper Bollinger Band while the 200-period SMA is not falling, and sells short below the lower band while it is falling. Trades exit on a slope turn and carry a 0.5 percent stop.

BreakoutLong & shortIntradayGold30 min
n/aProfit factor
1,330Net profit EUR
29.68%Win rate
3,878Trades
-1,188Max drawdown
0.34Avg trade

Best run of 9. Gold, 30 min, spread 0.6, from run sweeps:2026-10-04-GOLD-30m-opt.tsv:66.

Entry rules, long

  1. The 200-bar SMA is not falling (at or above its prior value)
  2. Buys 1 contract at market when no long position is open, with a 0.5 percent stop loss

Entry rules, short

  1. The 200-bar SMA is falling (below its prior value)
  2. Sells 1 contract short at market when no short position is open, with a 0.5 percent stop loss

Exit rules

  1. The close rises above the upper band, or the 200-bar SMA turns up, closing the short at market
  2. A qualifying opposite signal reverses the position
  3. The 0.5 percent stop loss closes the trade

Test conditions

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

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run30 minn/a 3,87829.681,330 EUR-1,188
USD/JPYDailyn/a 38913.88682,830 USD-466,710
USD/JPY30 minn/a 3,65733.66437,130 USD-191,120
USD/JPY1 hourn/a 2,69134.34431,290 USD-263,130
EUR/USD4 hoursn/a 91327.2733,446 USD-32,054
Nikkei 225Dailyn/a 4179.3530,987 USD-12,045
Silver4 hoursn/a 1,07611.4328,448 USD-10,512
GoldDailyn/a 6237.541,878 EUR-809
Gold4 hoursn/a 79721.461,715 EUR-1,031

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Bollinger Breakout With Trend Slope
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

basis = Average[20](close)
dev = 2.0 * STD[20](close)
upper = basis + dev
lower = basis - dev
sma = Average[200](close)

28 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 BandsSMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 1,188 EUR is large next to the net profit of 1,330 EUR.

Questions

About this strategy

Can I run Bollinger Breakout With Trend 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 9 market and timeframe combinations. The best run by trade count was Gold, 30 minutes, with 3,878 trades.

How large was the drawdown?

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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 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