Join waitlist
Strategies / Mean reversion / Outside Bar Mean Reversion

Outside Bar Mean Reversion

The strategy trades outside bars, buying when one closes below the prior low and selling short when one closes above the prior high. Each trade targets 1 times ATR(20) from the fill and exits at market after 3 bars.

Mean reversionLong & shortSwingNasdaq 100Daily
n/aProfit factor
5,164Net profit EUR
50.47%Win rate
1,070Trades
-4,401Max drawdown
4.83Avg trade

Best run of 3. Nasdaq 100, Daily, spread 3, from run sweeps:2026-10-10-NAS100-D-opt.tsv:32.

Entry rules, long

  1. When flat, an outside bar (higher high and lower low than the prior bar) closes below the prior low, and buys one contract.

Entry rules, short

  1. When flat, an outside bar closes above the prior high and the strategy sells short one contract.

Exit rules

  1. A position still open after 3 bars is closed at market.

Test conditions

PeriodUp to 2026-10-10
InstrumentNasdaq 100, Daily
Spread3 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
Nasdaq 100Best runDailyn/a 1,07050.475,164 EUR-4,401
Dow Jones4 hoursn/a 93458.8912,525 EUR-3,294
Nikkei 225Dailyn/a 90256.6511,010 USD-10,561

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Outside Bar Mean Reversion
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE bars = 0

myAtr = AverageTrueRange[20](close)

28 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

ATR
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 4,401 EUR is large next to the net profit of 5,164 EUR.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Outside Bar 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 3 market and timeframe combinations. The best run by trade count was Nasdaq 100, Daily, with 1,070 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,401 EUR at the tested position size, against a net result of 5,164 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 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.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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