Buys when the close crosses above a lower band and sells short when it crosses below an upper band, both set 1.67 standard deviations from a 5-period average. Each position closes after 7 or more bars since its last signal.
Best run of 6. EUR/USD, 4 hours, spread 1, from run sweeps:2026-10-11-EURUSD-4h-opt.tsv:16.
| Period | Up to 2026-10-11 |
| Instrument | EUR/USD, 4 hours |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 4 hours | n/a | 4,384 | 56.18 | 47,283 USD | -36,695 |
| Nikkei 225 | Daily | n/a | 1,035 | 54.59 | 32,431 USD | -15,498 |
| Dow Jones | Daily | n/a | 1,299 | 55.35 | 17,418 EUR | -15,770 |
| DAX 40 | 4 hours | n/a | 2,916 | 56.38 | 8,725 EUR | -7,268 |
| Nasdaq 100 | Daily | n/a | 1,025 | 52.78 | 7,682 EUR | -5,635 |
| S&P 500 | 4 hours | n/a | 3,068 | 55.38 | 2,907 EUR | -2,155 |
Charts
The code
// ============================================================== // Band Mean Reversion // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE lastlong = -1 ONCE lastshort = -1 basis = Average[5](close) vola = STD[5](close) upper = basis + 1.67 * vola lower = basis - 1.67 * vola
29 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 6 market and timeframe combinations. The best run by trade count was EUR/USD, 4 hours, with 4,384 trades.
The best run had a maximum drawdown of 36,695 USD at the tested position size, against a net result of 47,283 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.