Join waitlist
Strategies / Trend / EMA Stack With RSI And Stochastic

EMA Stack With RSI And Stochastic

This idea buys when five EMAs rise in order with RSI and stochastic in a middle range, and sells short when they fall in order. Positions close when the 13-period EMA moves past the 55-period EMA or RSI or stochastic reaches an extreme.

TrendLong & shortSwingUSD/JPYDaily
1.27Profit factor
1,959,610Net profit USD
68.05%Win rate
676Trades
-401,450Max drawdown
2,899Avg trade

Best run of 9. USD/JPY, Daily, spread 1, from run pf:2026-10-13-USDJPY-D.tsv:5.

Entry rules, long

  1. RSI(14) is between 40 and 70.
  2. The raw stochastic %K(14) is below 80.

Entry rules, short

  1. RSI(14) is between 30 and 60.
  2. The raw stochastic %K(14) is above 20.

Exit rules

  1. A short closes when the 13-period EMA rises above the 55-period EMA, RSI(14) falls below 30, or %K falls below 5.

Test conditions

PeriodUp to 2026-10-13
InstrumentUSD/JPY, Daily
Spread1 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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.27 67668.051,959,610 USD-401,450
EUR/USDDailyn/a 65666.31117,551 USD-44,968
Nikkei 225Dailyn/a 62267.3652,481 USD-20,735
Dow JonesDailyn/a 78567.1321,989 EUR-6,613
US Crude OilDailyn/a 61566.5013,520 EUR-7,262
GBP/USDDailyn/a 67965.1012,490 USD-11,189
Nasdaq 100Dailyn/a 64066.567,652 EUR-5,730
US Crude Oil4 hoursn/a 1,12064.387,278 EUR-5,294
S&P 500Dailyn/a 83967.943,418 EUR-944

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Stack With RSI And Stochastic
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE myK = 50

ea = ExponentialAverage[8](close)
eb = ExponentialAverage[13](close)
ec = ExponentialAverage[21](close)
ed = ExponentialAverage[34](close)
ee = ExponentialAverage[55](close)
myRsi = RSI[14](close)
hh = highest[14](high)
ll = lowest[14](low)

26 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

EMARSIStochastic
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run EMA Stack With RSI And Stochastic 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 9 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.27 over 676 trades.

How large was the drawdown?

The best run had a maximum drawdown of 401,450 USD at the tested position size, against a net result of 1,959,610 USD.

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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

SMA Crossover Reversal Stop

Also a trend strategy.

1.27 PF · 1,365 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