The system buys after three down closes push price under the lower Bollinger Band, and sells short after an up close above the upper band. It holds until price reverts through the 90-period SMA. An opposite signal can flip the position before that happens.
Best run of 3. FTSE 100, 4 hours, spread 2, from run sweeps:2026-09-16-FTSE100-4h-opt.tsv:2.
| Period | Up to 2026-09-16 |
| Instrument | FTSE 100, 4 hours |
| Spread | 2 points |
| Contracts | 2 |
| 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-09-16 |
| positionSize Contracts per trade, as published | 2 |
| upBars Up bars in a row needed before a short | 1 |
| downBars Down bars in a row needed before a long | 3 |
| bandPeriod Bollinger Band length | 20 |
| daysBack Daily bar whose low / high must be exceeded | 2 |
| exitPeriod SMA that price must revert through to exit | 90 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| FTSE 100Best run | 4 hours | n/a | 845 | 66.15 | 7,173 EUR | -5,217 |
| Dow Jones | Daily | n/a | 372 | 66.13 | 21,090 EUR | -20,669 |
| FTSE 100 | Daily | n/a | 290 | 73.10 | 16,131 EUR | -6,658 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Bollinger Band Fade // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 4 hours // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 10000 // --- Parameters --- positionSize = 2 // contracts per trade, as published upBars = 1 // up bars in a row needed before a short downBars = 3 // down bars in a row needed before a long bandPeriod = 20 // Bollinger Band length daysBack = 2 // daily bar whose low / high must be exceeded exitPeriod = 90 // SMA that price must revert through to exit // --- Indicators --- exitMA = Average[exitPeriod](close)
25 more lines: the entry and exit rules.
Read this first
Questions
Yes, the code is written for ProRealTime automated trading. The published version trades 2 contracts per signal, so check that size against your own account before going live.
FTSE 100 on the 4 hour chart gave the headline run with EUR 7,172.80 net profit over 845 trades. FTSE 100 daily (EUR 16,130.60) and Dow Jones daily (EUR 21,090.00) were also positive, though the Dow run had a much deeper drawdown.
At 2 contracts the best run had a max drawdown of EUR 5,217.40. Plan capital around that figure, and remember there is no stop loss to limit a single trade.
It gives enough bars for the band and the three-bar down sequence to set up often while filtering out intraday noise. The daily chart showed fewer trades but a higher win rate of 73.1% on FTSE 100.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.