Join waitlist
Strategies / Mean reversion / Band Mean Reversion

Band Mean Reversion

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.

Mean reversionLong & shortSwingEUR/USD4 hours
n/aProfit factor
47,283Net profit USD
56.18%Win rate
4,384Trades
-36,695Max drawdown
10.79Avg trade

Best run of 6. EUR/USD, 4 hours, spread 1, from run sweeps:2026-10-11-EURUSD-4h-opt.tsv:16.

Entry rules, long

  1. The close crosses above the lower band: the 5-period average minus 1.67 standard deviations.

Entry rules, short

  1. The close crosses below the upper band: the 5-period average plus 1.67 standard deviations.

Exit rules

  1. A short closes once 7 or more bars have passed since the last short signal.
  2. An opposite entry signal reverses the position.

Test conditions

PeriodUp to 2026-10-11
InstrumentEUR/USD, 4 hours
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run4 hoursn/a 4,38456.1847,283 USD-36,695
Nikkei 225Dailyn/a 1,03554.5932,431 USD-15,498
Dow JonesDailyn/a 1,29955.3517,418 EUR-15,770
DAX 404 hoursn/a 2,91656.388,725 EUR-7,268
Nasdaq 100Dailyn/a 1,02552.787,682 EUR-5,635
S&P 5004 hoursn/a 3,06855.382,907 EUR-2,155

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SMAStandard Deviation
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 36,695 USD is large next to the net profit of 47,283 USD.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Band Mean Reversion in ProOrder?

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.

Which markets was it tested on?

It was tested on 6 market and timeframe combinations. The best run by trade count was EUR/USD, 4 hours, with 4,384 trades.

How large was the drawdown?

The best run had a maximum drawdown of 36,695 USD at the tested position size, against a net result of 47,283 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

ATR Band

Also a mean reversion strategy.

10.31 PF · 53 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs