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.
Best run of 9. USD/JPY, Daily, spread 1, from run pf:2026-10-13-USDJPY-D.tsv:5.
| Period | Up to 2026-10-13 |
| Instrument | USD/JPY, Daily |
| Spread | 1 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-13 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.27 | 676 | 68.05 | 1,959,610 USD | -401,450 |
| EUR/USD | Daily | n/a | 656 | 66.31 | 117,551 USD | -44,968 |
| Nikkei 225 | Daily | n/a | 622 | 67.36 | 52,481 USD | -20,735 |
| Dow Jones | Daily | n/a | 785 | 67.13 | 21,989 EUR | -6,613 |
| US Crude Oil | Daily | n/a | 615 | 66.50 | 13,520 EUR | -7,262 |
| GBP/USD | Daily | n/a | 679 | 65.10 | 12,490 USD | -11,189 |
| Nasdaq 100 | Daily | n/a | 640 | 66.56 | 7,652 EUR | -5,730 |
| US Crude Oil | 4 hours | n/a | 1,120 | 64.38 | 7,278 EUR | -5,294 |
| S&P 500 | Daily | n/a | 839 | 67.94 | 3,418 EUR | -944 |
Charts
The code
// ============================================================== // 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
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 9 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.27 over 676 trades.
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.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.