The strategy buys when a green candle closes above the upper Bollinger Band while both bands are widening, and sells short on the mirror setup below the lower band. Positions are closed when the close moves back through the 20-period average.
Best run of 5. USD/JPY, 1 hour, spread 1, from run sweeps:2026-10-04-USDJPY-1h-opt.tsv:5.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 1 hour |
| 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 | 1 hour | n/a | 3,488 | 35.98 | 396,320 USD | -234,060 |
| USD/JPY | Daily | n/a | 284 | 40.14 | 2,231,250 USD | -616,030 |
| EUR/USD | Daily | n/a | 286 | 42.66 | 71,902 USD | -25,548 |
| Silver | 4 hours | n/a | 759 | 36.50 | 22,927 USD | -13,542 |
| GBP/USD | Daily | n/a | 325 | 37.54 | 6,979 USD | -6,336 |
Charts
The code
// ============================================================== // Bollinger Band Expansion Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false basis = Average[20](close) dev = 2.0 * STD[20](close) upper = basis + dev lower = basis - dev
24 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 5 market and timeframe combinations. The best run by trade count was USD/JPY, 1 hour, with 3,488 trades.
The best run had a maximum drawdown of 234,060 USD at the tested position size, against a net result of 396,320 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.