Join waitlist
Strategies / Pattern / Candle Close Extreme Count

Candle Close Extreme Count

Buys when this bar and at least 2 of the last 5 closed in the top 10% of their range, with fewer than 3 dojis among them. Shorts mirror this. Stops sit at the signal bar extreme, with targets 2 times that risk.

PatternLong & shortSwingUS Crude OilDaily
n/aProfit factor
5,875Net profit EUR
36.23%Win rate
737Trades
-5,117Max drawdown
7.97Avg trade

Best run of 2. US Crude Oil, Daily, spread 3, from run sweeps:2026-10-11-CRUDE-D-opt.tsv:55.

Entry rules, long

  1. Fewer than 3 of the last 5 bars are dojis, where the body is 10% or less of the range.
  2. More than 2 bars have passed since the last signal.
  3. Signals are only checked after bar 10.

Entry rules, short

  1. Fewer than 3 of the last 5 bars are dojis, where the body is 10% or less of the range.
  2. More than 2 bars have passed since the last signal.

Exit rules

  1. A target sits 2 times the stop distance from the entry.
  2. An opposite signal reverses the position.

Test conditions

PeriodUp to 2026-10-11
InstrumentUS Crude Oil, 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
US Crude OilBest runDailyn/a 73736.235,875 EUR-5,117
Brent CrudeDailyn/a 35039.146,470 EUR-4,984

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Candle Close Extreme Count
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lasttrade = -999

hicount = 0
locount = 0
dojicount = 0
FOR myI = 0 TO 4 DO
    rng = high[myI] - low[myI]

61 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 5,117 EUR is large next to the net profit of 5,875 EUR.

Questions

About this strategy

Can I run Candle Close Extreme Count 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 2 market and timeframe combinations. The best run by trade count was US Crude Oil, Daily, with 737 trades.

How large was the drawdown?

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

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Short Term RSI Pullback Long Short

Best run on the same market, US Crude Oil.

1.33 PF · 493 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