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.
Best run of 22. USD/JPY, 5 min, spread 1, from run sweeps:2026-10-04-USDJPY-5m-opt.tsv:20.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 5 minutes |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 5 min | n/a | 1,423 | 65.07 | 93,490 USD | -87,670 |
| Nikkei 225 | 30 min | n/a | 1,273 | 61.51 | 20,380 USD | -9,595 |
| Silver | Daily | n/a | 124 | 48.39 | 17,331 USD | -4,777 |
| Nikkei 225 | 1 hour | n/a | 662 | 62.24 | 14,928 USD | -8,621 |
| Dow Jones | 4 hours | n/a | 80 | 71.25 | 11,620 EUR | -6,877 |
| Nikkei 225 | 4 hours | n/a | 228 | 64.47 | 11,218 USD | -10,348 |
| DAX 40 | Daily | n/a | 176 | 48.86 | 9,477 EUR | -5,111 |
| Nasdaq 100 | 1 hour | n/a | 819 | 63.49 | 8,595 EUR | -3,653 |
| Nasdaq 100 | 4 hours | n/a | 232 | 62.93 | 8,171 EUR | -4,323 |
| Dow Jones | Daily | n/a | 152 | 53.29 | 7,454 EUR | -7,364 |
| Nasdaq 100 | 15 min | n/a | 1,393 | 64.25 | 6,194 EUR | -5,652 |
| Dow Jones | 30 min | n/a | 576 | 63.02 | 5,722 EUR | -5,665 |
| Nasdaq 100 | 30 min | n/a | 1,372 | 64.50 | 5,663 EUR | -5,567 |
| FTSE 100 | 1 hour | n/a | 796 | 65.33 | 5,301 EUR | -1,786 |
| DAX 40 | 30 min | n/a | 1,371 | 62.65 | 4,507 EUR | -4,417 |
| FTSE 100 | Daily | n/a | 117 | 58.12 | 4,275 EUR | -2,098 |
| DAX 40 | 2 min | n/a | 1,417 | 62.39 | 3,718 EUR | -1,973 |
| S&P 500 | 4 hours | n/a | 240 | 67.50 | 2,029 EUR | -973 |
| Gold | 4 hours | n/a | 254 | 65.75 | 1,531 EUR | -681 |
| S&P 500 | 1 hour | n/a | 832 | 63.10 | 1,308 EUR | -1,284 |
| S&P 500 | 30 min | n/a | 1,327 | 62.70 | 1,007 EUR | -984 |
| Gold | Daily | n/a | 138 | 50.72 | 952 EUR | -828 |
Charts
Top 10 of 22 runs. The full list is in the table above.
The code
// ============================================================== // 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
Questions
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.
It was tested on 22 market and timeframe combinations. The best run by trade count was USD/JPY, 5 minutes, with 1,423 trades.
The best run had a maximum drawdown of 87,670 USD at the tested position size, against a net result of 93,490 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.