Join waitlist
Strategies / Breakout / Bollinger Breakout Slope Filter

Bollinger Breakout Slope Filter

Buys when the close crosses above the upper Bollinger Band while the 20-period midline and 200-period average both rise. Sells short when the close crosses below the lower band while both fall, and each position closes when the close crosses back through the midline.

BreakoutLong & shortSwingUSD/JPYDaily
1.50Profit factor
1,632,810Net profit USD
35.96%Win rate
381Trades
-314,350Max drawdown
4,286Avg trade

Best run of 15. USD/JPY, Daily, spread 1, from run pf:2026-10-11-USDJPY-D.tsv:1.

Entry rules, long

  1. The 20-period midline is higher than on the previous bar.
  2. The 200-period average is higher than on the previous bar.

Entry rules, short

  1. The 20-period midline is lower than on the previous bar.
  2. The 200-period average is lower than on the previous bar.

Exit rules

  1. A short closes when the close crosses over the 20-period midline.

Test conditions

PeriodUp to 2026-10-11
InstrumentUSD/JPY, Daily
Spread1 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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.50 38135.961,632,810 USD-314,350
EUR/USDDaily1.44 41038.54120,320 USD-28,040
USD/JPY1 hour1.13 4,21333.16824,440 USD-158,580
USD/JPY4 hoursn/a 1,03933.59235,350 USD-224,940
Nikkei 225Dailyn/a 34236.8435,423 USD-9,597
SilverDailyn/a 36729.9727,555 USD-21,196
GBP/USDDailyn/a 43234.9514,696 USD-5,580
US Crude OilDailyn/a 36136.579,199 EUR-6,333
Brent CrudeDailyn/a 14836.498,914 EUR-6,036
Nasdaq 100Dailyn/a 36035.006,502 EUR-3,753
DAX 40Dailyn/a 45535.826,262 EUR-4,436
Brent Crude4 hoursn/a 50933.795,130 EUR-4,527
Gold1 hourn/a 3,66830.891,934 EUR-878
GoldDailyn/a 38536.621,849 EUR-1,037
Gold4 hoursn/a 88734.051,695 EUR-1,072

Charts

Results by run

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

// ==============================================================
// Bollinger Breakout Slope Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

mid = Average[20](close)
sd = STD[20](close)
up = mid + 1.0 * sd
dn = mid - 1.0 * sd
ma = Average[200](close)
bbslope = mid - mid[1]
tfslope = ma - ma[1]

17 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 Deviation
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run1,632,810.00 USD
Net, long run1,632,810.00 USD
Net on the older data alone0.00 USD
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 Bollinger Breakout Slope 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 15 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.50 over 381 trades.

How large was the drawdown?

The best run had a maximum drawdown of 314,350 USD at the tested position size, against a net result of 1,632,810 USD.

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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

Reversal With Fractal Chaos Bands

Also a breakout strategy.

1.49 PF · 536 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