Join waitlist
Strategies / Mean reversion / Bollinger Band Reversal Long Short

Bollinger Band Reversal Long Short

The strategy buys when the close moves back above the lower 20-period Bollinger Band and sells short when it moves back below the upper band. Positions close at the middle band, and an opposite signal reverses the trade.

Mean reversionLong & shortSwingEUR/USD4 hours
n/aProfit factor
50,695Net profit USD
64.91%Win rate
1,687Trades
-27,600Max drawdown
30.05Avg trade

Best run of 7. EUR/USD, 4 hours, spread 1, from run sweeps:2026-10-04-EURUSD-4h-opt.tsv:17.

Entry rules, long

  1. No long position is currently open

Entry rules, short

  1. No short position is currently open

Exit rules

  1. The long closes when the close rises above the 20-period average, which is the middle band
  2. An opposite band-cross entry closes the trade and reverses it

Test conditions

PeriodUp to 2026-10-04
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run4 hoursn/a 1,68764.9150,695 USD-27,600
USD/JPY4 hoursn/a 1,31765.07296,940 USD-291,390
Dow JonesDailyn/a 54467.2811,777 EUR-8,615
Nasdaq 1004 hoursn/a 1,20364.6710,988 EUR-4,346
FTSE 100Dailyn/a 42867.067,037 EUR-2,009
S&P 500Dailyn/a 56568.502,639 EUR-1,087
S&P 5004 hoursn/a 1,22665.332,574 EUR-965

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Bollinger Band Reversal Long Short
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

mid = Average[20](close)
sd = STD[20](close)
upper = mid + 2 * sd
lower = mid - 2 * sd

13 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

Bollinger BandsSMAStandard Deviation
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 27,600 USD is large next to the net profit of 50,695 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 Bollinger Band Reversal Long Short 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 7 market and timeframe combinations. The best run by trade count was EUR/USD, 4 hours, with 1,687 trades.

How large was the drawdown?

The best run had a maximum drawdown of 27,600 USD at the tested position size, against a net result of 50,695 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

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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