Buys when the close crosses above the upper 20-period Bollinger Band while the 200-period SMA is not falling, and sells short on the mirror cross below the lower band while it is falling. Each trade has a 0.5% stop and a 1.0% target.
Best run of 10. EUR/USD, Daily, spread 1, from run pf:2026-10-05-EURUSD-D.tsv:2.
| Period | Up to 2026-10-05 |
| Instrument | EUR/USD, Daily |
| 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | Daily | 1.20 | 481 | 37.63 | 34,467 USD | -8,200 |
| USD/JPY | 1 hour | n/a | 2,597 | 33.54 | 504,800 USD | -256,350 |
| USD/JPY | 30 min | n/a | 2,831 | 31.61 | 405,000 USD | -248,380 |
| USD/JPY | Daily | n/a | 457 | 34.79 | 196,060 USD | -160,790 |
| EUR/USD | 4 hours | n/a | 1,192 | 35.49 | 47,599 USD | -18,982 |
| GBP/USD | 4 hours | n/a | 1,178 | 34.47 | 4,686 USD | -2,545 |
| DAX 40 | 1 hour | n/a | 3,035 | 34.14 | 4,557 EUR | -3,209 |
| DAX 40 | 4 hours | n/a | 980 | 34.80 | 2,511 EUR | -2,311 |
| Gold | 5 min | n/a | 2,818 | 29.95 | 1,186 EUR | -591 |
| Gold | 4 hours | n/a | 1,082 | 34.38 | 858 EUR | -237 |
Charts
The code
// ============================================================== // Bollinger Band Trend Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false sma = Average[200](close)
30 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 10 market and timeframe combinations. The best run was EUR/USD, Daily, with a profit factor of 1.20 over 481 trades.
The best run had a maximum drawdown of 8,200 USD at the tested position size, against a net result of 34,467 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.