Join waitlist
Strategies / Mean reversion / Seven-Bar Close Extremes Long

Seven-Bar Close Extremes Long

The system buys when the close is above the 200-period SMA but below the lowest close of the previous 7 bars. It sells when the close rises above the highest close of the previous 7 bars.

Mean reversionLong onlySwingNasdaq 100Daily
1.96Profit factor
15,685Net profit EUR
70.21%Win rate
386Trades
-2,870Max drawdown
40.63Avg trade

Best run of 12. Nasdaq 100, Daily, spread 3, from run pf:2026-10-13-NAS100-D.tsv:5.

Entry rules, long

  1. The close is above the 200-period simple moving average.

Exit rules

  1. The close is above the highest close of the previous 7 bars.

Test conditions

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

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily1.96 38670.2115,685 EUR-2,870
Nasdaq 1004 hours1.50 95668.8313,157 EUR-2,855
Dow Jones4 hours1.46 31172.6715,472 EUR-3,687
S&P 5004 hours1.36 99670.182,901 EUR-641
EUR/USDDailyn/a 27866.1935,721 USD-26,980
Dow JonesDailyn/a 46471.9823,481 EUR-11,022
Nikkei 2254 hoursn/a 68665.3115,957 USD-7,432
DAX 40Dailyn/a 44568.766,277 EUR-5,397
S&P 500Dailyn/a 49871.894,033 EUR-1,156
FTSE 100Dailyn/a 34871.262,936 EUR-2,820
FTSE 1004 hoursn/a 83170.522,919 EUR-2,858
GoldDailyn/a 33364.561,582 EUR-792

Charts

Results by run

Top 10 of 12 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

// ==============================================================
// Seven-Bar Close Extremes Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

sma = Average[200](close)
lo = lowest[7](close)
hi = highest[7](close)

10 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

SMA
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 Seven-Bar Close Extremes Long 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 12 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 1.96 over 386 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,870 EUR at the tested position size, against a net result of 15,684 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

Overnight Dip

Also a mean reversion strategy.

1.95 PF · 219 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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