Join waitlist
Strategies / Pattern / RSI Divergence EMA Filter

RSI Divergence EMA Filter

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.

PatternLong & shortIntradayUS Crude Oil10 min
n/aProfit factor
1,507Net profit EUR
51.64%Win rate
732Trades
-1,482Max drawdown
2.06Avg trade

Best run of 8. US Crude Oil, 10 min, spread 3, from run sweeps:2026-10-03-CRUDE-10m-opt.tsv:3.

Entry rules, long

  1. The 14 period RSI is higher than at the previous pivot low
  2. The close is above the 200 period exponential average

Entry rules, short

  1. The 14 period RSI is lower than at the previous pivot high
  2. The close is below the 200 period exponential average

Exit rules

  1. A target sits 3 ATR from the signal close

Test conditions

PeriodUp to 2026-10-03
InstrumentUS Crude Oil, 10 minutes
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-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run10 minn/a 73251.641,507 EUR-1,482
Dow Jones4 hoursn/a 4768.097,978 EUR-3,573
US Crude Oil1 hourn/a 28258.876,216 EUR-1,859
Dow Jones1 hourn/a 15756.695,092 EUR-2,706
Nasdaq 1004 hoursn/a 12364.234,017 EUR-1,770
Nasdaq 10010 minn/a 70854.663,394 EUR-2,193
Nasdaq 100Dailyn/a 3354.551,970 EUR-712
S&P 5004 hoursn/a 12355.28550 EUR-515

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

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.

Indicators used

ATRRSIEMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 1,482 EUR is large next to the net profit of 1,507 EUR.

Questions

About this strategy

Can I run RSI Divergence EMA Filter 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 8 market and timeframe combinations. The best run by trade count was US Crude Oil, 10 minutes, with 732 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,482 EUR at the tested position size, against a net result of 1,507 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

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

See how ProRealAlgos combines strategies like this into one automated portfolio.

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