Buys on RSI divergence at 5 bar pivot lows when the close is above a 200 period EMA. Shorts mirror this at pivot highs below the EMA, with ATR based stops and targets.
Best run of 8. US Crude Oil, 10 min, spread 3, from run sweeps:2026-10-03-CRUDE-10m-opt.tsv:3.
| Period | Up to 2026-10-03 |
| Instrument | US Crude Oil, 10 minutes |
| 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | 10 min | n/a | 732 | 51.64 | 1,507 EUR | -1,482 |
| Dow Jones | 4 hours | n/a | 47 | 68.09 | 7,978 EUR | -3,573 |
| US Crude Oil | 1 hour | n/a | 282 | 58.87 | 6,216 EUR | -1,859 |
| Dow Jones | 1 hour | n/a | 157 | 56.69 | 5,092 EUR | -2,706 |
| Nasdaq 100 | 4 hours | n/a | 123 | 64.23 | 4,017 EUR | -1,770 |
| Nasdaq 100 | 10 min | n/a | 708 | 54.66 | 3,394 EUR | -2,193 |
| Nasdaq 100 | Daily | n/a | 33 | 54.55 | 1,970 EUR | -712 |
| S&P 500 | 4 hours | n/a | 123 | 55.28 | 550 EUR | -515 |
Charts
The code
// ============================================================== // RSI Divergence EMA Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE lastrsihi = 0 ONCE lasthighhi = 0 ONCE counthi = 0 ONCE lastrsilo = 0 ONCE lastlowlo = 0 ONCE countlo = 0 rsival = RSI[14](close) emaval = ExponentialAverage[200](close) atrval = AverageTrueRange[14](close) beardiv = 0 bulldiv = 0
36 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 8 market and timeframe combinations. The best run by trade count was US Crude Oil, 10 minutes, with 732 trades.
The best run had a maximum drawdown of 1,482 EUR at the tested position size, against a net result of 1,507 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.