The idea buys when the close moves above the upper Bollinger Band and sells short when it moves below the lower band. A close beyond the opposite band reverses the position, with a 0.5 percent stop and no target.
Best run of 6. USD/JPY, 30 min, spread 1, from run sweeps:2026-10-04-USDJPY-30m-opt.tsv:82.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 30 minutes |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 30 min | n/a | 4,768 | 35.84 | 489,900 USD | -227,640 |
| USD/JPY | Daily | n/a | 608 | 11.68 | 1,481,160 USD | -716,830 |
| USD/JPY | 1 hour | n/a | 3,526 | 34.80 | 635,090 USD | -315,870 |
| Silver | 4 hours | n/a | 1,666 | 9.54 | 35,333 USD | -12,501 |
| Nikkei 225 | Daily | n/a | 633 | 7.90 | 33,074 USD | -12,670 |
| Gold | Daily | n/a | 923 | 5.53 | 1,094 EUR | -990 |
Charts
The code
// ============================================================== // Bollinger Band Breakout Reversal // 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
14 more lines: the entry and exit rules.
Setup
Questions
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.
It was tested on 6 market and timeframe combinations. The best run by trade count was USD/JPY, 30 minutes, with 4,768 trades.
The best run had a maximum drawdown of 227,640 USD at the tested position size, against a net result of 489,900 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.