Buys when the close crosses back above the lower Bollinger Band (20 periods, 2 standard deviations) and sells short when it crosses back below the upper band. Each trade has a 0.58% stop loss and a 0.96% take profit.
Best run of 3. EUR/USD, 1 hour, spread 1, from run sweeps:2026-10-07-EURUSD-1h-opt.tsv:3.
| Period | Up to 2026-10-07 |
| Instrument | EUR/USD, 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 1 hour | n/a | 7,039 | 54.82 | 45,873 USD | -30,685 |
| DAX 40 | 4 hours | n/a | 1,748 | 40.56 | 9,120 EUR | -2,415 |
| Nasdaq 100 | Daily | n/a | 678 | 27.73 | 2,269 EUR | -1,194 |
Charts
The code
// ============================================================== // Bollinger Band Reentry // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false basis = Average[20](close) dev = 2 * STD[20](close) upper = basis + dev lower = basis - dev
17 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 3 market and timeframe combinations. The best run by trade count was EUR/USD, 1 hour, with 7,039 trades.
The best run had a maximum drawdown of 30,685 USD at the tested position size, against a net result of 45,873 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.