The strategy buys when close falls below the lower 20-bar Bollinger Band and sells short when it rises above the upper band. Longs close when price returns to the 20-bar average or higher, and shorts close when it returns to or below it.
Best run of 7. Silver, 1 hour, spread 2, from run pf:2026-10-10-SILVER-1h.tsv:3.
| Period | Up to 2026-10-10 |
| Instrument | Silver, 1 hour |
| Spread | 2 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| SilverBest run | 1 hour | 2.33 | 4,691 | 60.75 | 480,118 USD | -92,409 |
| Dow Jones | Daily | n/a | 544 | 64.89 | 13,318 EUR | -9,762 |
| Nasdaq 100 | 4 hours | n/a | 1,209 | 62.70 | 9,203 EUR | -4,134 |
| FTSE 100 | Daily | n/a | 429 | 65.97 | 6,624 EUR | -2,521 |
| S&P 500 | Daily | n/a | 566 | 65.19 | 3,233 EUR | -1,082 |
| FTSE 100 | 4 hours | n/a | 1,136 | 65.93 | 3,084 EUR | -2,184 |
| S&P 500 | 4 hours | n/a | 1,229 | 63.79 | 1,620 EUR | -1,304 |
Charts
The code
// ============================================================== // Bollinger Band Reversion To Basis // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // 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
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 7 market and timeframe combinations. The best run was Silver, 1 hour, with a profit factor of 2.33 over 4,691 trades.
The best run had a maximum drawdown of 92,408 USD at the tested position size, against a net result of 480,118 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.