The strategy sells short when price closes above the upper Bollinger Band and an upper envelope while trend strength is low and the stochastic is above 50, and buys the mirror setup. Positions close when price moves back inside a band or stochastic crosses 50.
Best run of 14. Dow Jones, 30 min, spread 3, from run pf:2026-10-12-DOW30-30m.tsv:1.
| Period | Up to 2026-10-12 |
| Instrument | Dow Jones, 30 minutes |
| Spread | 3 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Dow JonesBest run | 30 min | 1.97 | 137 | 59.85 | 8,028 EUR | -1,931 |
| EUR/USD | 30 min | n/a | 23 | 69.57 | 28,730 USD | -2,478 |
| Silver | 3 min | n/a | 274 | 62.41 | 8,055 USD | -6,643 |
| Dow Jones | 1 hour | n/a | 154 | 60.39 | 5,174 EUR | -2,715 |
| Dow Jones | 15 min | n/a | 122 | 62.30 | 4,927 EUR | -2,610 |
| GBP/USD | 4 hours | n/a | 212 | 66.04 | 3,278 USD | -1,941 |
| EUR/USD | 10 min | n/a | 2 | 100.00 | 799 USD | -11.00 |
| FTSE 100 | 15 min | n/a | 99 | 55.56 | 768 EUR | -463 |
| GBP/USD | 30 min | n/a | 28 | 57.14 | 530 USD | -506 |
| DAX 40 | 1 min | n/a | 3 | 66.67 | 307 EUR | -102 |
| GBP/USD | 10 min | n/a | 4 | 75.00 | 216 USD | -122 |
| FTSE 100 | 10 min | n/a | 19 | 63.16 | 206 EUR | -149 |
| GBP/USD | 15 min | n/a | 7 | 57.14 | 188 USD | -167 |
| Dow Jones | 1 min | n/a | 1 | 100.00 | 29.90 EUR | -1.00 |
Charts
Top 10 of 14 runs. The full list is in the table above.
The code
// ============================================================== // Contrarian Band Envelope Reversion // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE raw = 50 basis = Average[20](close) dev = 2 * STD[20](close) upper = basis + dev lower = basis - dev upenv = basis * 1.01 loenv = basis * 0.99 myAdx = ADX[14] hh = Highest[50](high) ll = Lowest[50](low)
23 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 14 market and timeframe combinations. The best run was Dow Jones, 30 minutes, with a profit factor of 1.97 over 137 trades.
The best run had a maximum drawdown of 1,931 EUR at the tested position size, against a net result of 8,028 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.