Join waitlist
Strategies / Mean reversion / Range Regime Long With Time Exit

Range Regime Long With Time Exit

Buys one contract in range-bound conditions, with ADX(14) below 25, RSI(14) between 35 and 65, and a 20-period Bollinger band width below 8%. Exits after 21 bars, or earlier if the close falls more than 5% below the entry.

Mean reversionLong onlySwingNasdaq 100Daily
1.70Profit factor
16,086Net profit EUR
58.86%Win rate
316Trades
-3,477Max drawdown
50.91Avg trade

Best run of 15. Nasdaq 100, Daily, spread 3, from run pf:2026-10-05-NAS100-D.tsv:20.

Entry rules, long

  1. The 20-period Bollinger band width, 4 times the standard deviation divided by the average and expressed in percent, is below 8.
  2. A long is bought at market when no position is open. Entries are checked only after bar 40.

Exit rules

  1. The position is sold at market if the close falls more than 5% below the entry close.

Test conditions

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

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily1.70 31658.8616,086 EUR-3,477
S&P 5004 hours1.34 95358.244,814 EUR-726
Nasdaq 1004 hours1.31 91555.1917,512 EUR-4,269
Dow Jones4 hoursn/a 30455.9223,905 EUR-6,703
Nikkei 2254 hoursn/a 79051.0121,658 USD-12,781
Dow JonesDailyn/a 45056.0014,515 EUR-9,893
Nasdaq 1001 hourn/a 3,45051.3011,260 EUR-5,998
Dow Jones30 minn/a 2,37552.089,162 EUR-7,623
Dow Jones1 hourn/a 1,14952.658,850 EUR-7,903
DAX 40Dailyn/a 48653.507,771 EUR-4,506
DAX 401 hourn/a 3,27652.786,209 EUR-4,856
DAX 404 hoursn/a 92053.705,562 EUR-4,661
S&P 500Dailyn/a 48857.173,664 EUR-1,058
Gold4 hoursn/a 89452.571,954 EUR-990
GoldDailyn/a 42349.881,893 EUR-948

Charts

Results by run

Top 10 of 15 runs. The full list is in the table above.

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Range Regime Long With Time Exit
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE holdcount = 0
ONCE basis = 0

myAdx = ADX[14]
myRsi = RSI[14](close)
bmid = Average[20](close)
bdev = STD[20](close)
bwidth = (4 * bdev) / bmid * 100

26 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

ADXRSIBollinger BandsStandard Deviation
Longer historyRe-run on up to 1,000,000 barsNasdaq 100 · Daily · older data 271.20 EUR

Nasdaq 100 had no history beyond the standard run, so both runs used 10,000 bars.

Nasdaq 100 · Daily

Bars available10,000
Net, standard 200,000-bar run16,086.10 EUR
Net, long run16,357.30 EUR
Net on the older data alone271.20 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Range Regime Long With Time Exit 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 15 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 1.70 over 316 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,477 EUR at the tested position size, against a net result of 16,086 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Internal Bar Strength Reversion Long

Also a mean reversion strategy.

1.70 PF · 1,438 trades

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

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