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.
Best run of 2. US Crude Oil, Daily, spread 3, from run sweeps:2026-10-11-CRUDE-D-opt.tsv:55.
| Period | Up to 2026-10-11 |
| Instrument | US Crude Oil, Daily |
| Spread | 3 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | Daily | n/a | 737 | 36.23 | 5,875 EUR | -5,117 |
| Brent Crude | Daily | n/a | 350 | 39.14 | 6,470 EUR | -4,984 |
Charts
The code
// ============================================================== // 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
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 2 market and timeframe combinations. The best run by trade count was US Crude Oil, Daily, with 737 trades.
The best run had a maximum drawdown of 5,117 EUR at the tested position size, against a net result of 5,875 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.