Join waitlist
Strategies / Pattern / Sequential Close Count Reversal

Sequential Close Count Reversal

Counts closes below the close 4 bars earlier for a buy setup and above it for a sell setup. Buys when the buy count exceeds 8 with a low-based flag, and sells when the sell count exceeds 8 or a high-based flag is set.

PatternLong onlyIntradayUSD/JPY5 min
n/aProfit factor
93,490Net profit USD
65.07%Win rate
1,423Trades
-87,670Max drawdown
65.70Avg trade

Best run of 22. USD/JPY, 5 min, spread 1, from run sweeps:2026-10-04-USDJPY-5m-opt.tsv:20.

Entry rules, long

  1. The exceed-low flag is set, meaning the low drops below a recent low at a count of 8 or more

Exit rules

  1. Or the exceed-high flag is set, meaning the high rises above a recent high at a count of 8 or more
  2. A stop loss sits 5% below the entry price

Test conditions

PeriodUp to 2026-10-04
InstrumentUSD/JPY, 5 minutes
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
USD/JPYBest run5 minn/a 1,42365.0793,490 USD-87,670
Nikkei 22530 minn/a 1,27361.5120,380 USD-9,595
SilverDailyn/a 12448.3917,331 USD-4,777
Nikkei 2251 hourn/a 66262.2414,928 USD-8,621
Dow Jones4 hoursn/a 8071.2511,620 EUR-6,877
Nikkei 2254 hoursn/a 22864.4711,218 USD-10,348
DAX 40Dailyn/a 17648.869,477 EUR-5,111
Nasdaq 1001 hourn/a 81963.498,595 EUR-3,653
Nasdaq 1004 hoursn/a 23262.938,171 EUR-4,323
Dow JonesDailyn/a 15253.297,454 EUR-7,364
Nasdaq 10015 minn/a 1,39364.256,194 EUR-5,652
Dow Jones30 minn/a 57663.025,722 EUR-5,665
Nasdaq 10030 minn/a 1,37264.505,663 EUR-5,567
FTSE 1001 hourn/a 79665.335,301 EUR-1,786
DAX 4030 minn/a 1,37162.654,507 EUR-4,417
FTSE 100Dailyn/a 11758.124,275 EUR-2,098
DAX 402 minn/a 1,41762.393,718 EUR-1,973
S&P 5004 hoursn/a 24067.502,029 EUR-973
Gold4 hoursn/a 25465.751,531 EUR-681
S&P 5001 hourn/a 83263.101,308 EUR-1,284
S&P 50030 minn/a 1,32762.701,007 EUR-984
GoldDailyn/a 13850.72952 EUR-828

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Sequential Close Count Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long only
// Timeframe tested: 5 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE seqb = 0
ONCE seqs = 0
ONCE eightl = 0
ONCE eighth = 0

58 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.
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 87,670 USD is large next to the net profit of 93,490 USD.

Questions

About this strategy

Can I run Sequential Close Count Reversal 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 22 market and timeframe combinations. The best run by trade count was USD/JPY, 5 minutes, with 1,423 trades.

How large was the drawdown?

The best run had a maximum drawdown of 87,670 USD at the tested position size, against a net result of 93,490 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 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