Join waitlist
Strategies / Trend / EMA Stack StochRSI Trend Long

EMA Stack StochRSI Trend Long

It buys when the 7, 30, 50, 100, 121 and 200-period EMAs are stacked from fastest to slowest and the Stochastic RSI is below 0.82. It exits when the 200-period EMA is above the 7-period EMA and the Stochastic RSI is above 0.2.

TrendLong onlyIntradayGold30 min
1.71Profit factor
3,231Net profit EUR
33.22%Win rate
614Trades
-715Max drawdown
5.26Avg trade

Best run of 51. Gold, 30 min, spread 0.6, from run pf:2026-10-05-GOLD-30m.tsv:1.

Entry rules, long

  1. The unsmoothed Stochastic RSI over 14 periods is below 0.82
  2. No long position is currently open

Exit rules

  1. The long closes at market when both conditions hold

Test conditions

PeriodUp to 2026-10-05
InstrumentGold, 30 minutes
Spread0.6 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-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run30 min1.71 61433.223,231 EUR-715
USD/JPYDailyn/a 3141.941,105,360 USD-402,400
USD/JPY30 minn/a 62033.39555,150 USD-206,750
USD/JPY10 minn/a 62636.26351,440 USD-183,080
USD/JPY15 minn/a 62232.80349,930 USD-205,680
USD/JPY1 hourn/a 46430.82303,650 USD-200,220
EUR/USDDailyn/a 3348.4878,382 USD-27,892
Nikkei 225Dailyn/a 3548.5748,906 USD-12,132
Dow JonesDailyn/a 5337.7428,821 EUR-4,407
Nikkei 2254 hoursn/a 9428.7228,205 USD-11,462
EUR/USD5 minn/a 61430.4627,763 USD-27,455
Silver30 minn/a 63429.9725,535 USD-15,038
Nasdaq 100Dailyn/a 3666.6722,703 EUR-3,269
Silver2 minn/a 66131.9220,855 USD-7,570
Nikkei 2251 hourn/a 34935.2420,091 USD-9,214
Nikkei 22510 minn/a 61533.5019,683 USD-10,734
Silver3 minn/a 67930.3418,996 USD-9,804
Silver15 minn/a 67727.9217,612 USD-9,423
Nikkei 22515 minn/a 66130.7117,518 USD-11,134
DAX 40Dailyn/a 5046.0015,169 EUR-3,929
Nikkei 22530 minn/a 66131.1614,366 USD-11,509
Silver10 minn/a 65328.0214,279 USD-12,730
Dow Jones15 minn/a 50633.9913,884 EUR-4,963
Nasdaq 1004 hoursn/a 11838.9812,898 EUR-4,959
Nikkei 2253 minn/a 62631.6312,551 USD-9,888
Nikkei 2252 minn/a 63032.5412,452 USD-6,913
Nasdaq 10015 minn/a 59638.2611,953 EUR-3,535
Nikkei 2255 minn/a 67429.8211,528 USD-10,754
Dow Jones1 hourn/a 13737.9610,949 EUR-5,176
Nasdaq 1001 hourn/a 43736.389,283 EUR-3,626
Nasdaq 10030 minn/a 64635.768,147 EUR-4,723
Nikkei 2251 minn/a 63331.127,497 USD-6,724
Dow Jones4 hoursn/a 3946.157,413 EUR-6,043
Nasdaq 1005 minn/a 65233.136,021 EUR-3,702
DAX 4015 minn/a 67530.965,513 EUR-3,495
DAX 4030 minn/a 67433.535,391 EUR-3,816
S&P 500Dailyn/a 5154.905,248 EUR-573
GoldDailyn/a 3737.843,797 EUR-1,466
Brent Crude2 minn/a 62631.153,595 EUR-1,734
DAX 405 minn/a 67330.163,446 EUR-2,642
Gold4 hoursn/a 10336.893,401 EUR-962
Gold1 hourn/a 36035.003,186 EUR-873
Gold15 minn/a 62730.782,533 EUR-881
S&P 5001 hourn/a 43539.542,221 EUR-734
S&P 5004 hoursn/a 11439.472,096 EUR-911
Gold10 minn/a 63630.191,969 EUR-651
S&P 50030 minn/a 67836.581,817 EUR-1,101
Gold5 minn/a 68129.521,739 EUR-482
S&P 50015 minn/a 62433.811,663 EUR-1,364
Gold3 minn/a 65428.901,654 EUR-570
Gold2 minn/a 65029.69850 EUR-561

Charts

Results by run

Top 10 of 51 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Stack StochRSI Trend Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

emaa = ExponentialAverage[7](close)
emab = ExponentialAverage[30](close)
emac = ExponentialAverage[50](close)
emad = ExponentialAverage[100](close)
emae = ExponentialAverage[121](close)
emaf = ExponentialAverage[200](close)
myRsi = RSI[14](close)
rsihi = highest[14](myRsi)
rsilo = lowest[14](myRsi)
myRange = rsihi - rsilo

15 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
Longer historyRe-run on up to 1,000,000 barsGold · 30 min · older data 245.50 EUR

On the long run with 245,000 bars the net result was 3,476 EUR, against 3,230 EUR on the standard 200,000-bar run. The older data alone gave 246 EUR.

Gold · 30 min

Bars available245,000
Net, standard 200,000-bar run3,230.50 EUR
Net, long run3,476.00 EUR
Net on the older data alone245.50 EUR
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 StochRSI Trend Long 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 51 market and timeframe combinations. The best run was Gold, 30 minutes, with a profit factor of 1.71 over 614 trades.

How large was the drawdown?

The best run had a maximum drawdown of 715 EUR at the tested position size, against a net result of 3,230 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

SuperTrend CCI

Also a trend strategy.

1.72 PF · 561 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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