Buys when the 8-period EMA crosses over the 21-period EMA with RSI(14) below 70, and sells short on the opposite cross with RSI(14) above 30. Each trade has a 1% stop loss and a 1% profit target measured from the fill price.
Best run of 4. USD/JPY, 1 hour, spread 1, from run pf:2026-10-13-USDJPY-1h.tsv:1.
| Period | Up to 2026-10-13 |
| Instrument | USD/JPY, 1 hour |
| 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 | 1 hour | 1.09 | 6,194 | 29.92 | 1,051,760 USD | -201,760 |
| EUR/USD | Daily | n/a | 587 | 49.57 | 32,076 USD | -14,272 |
| Dow Jones | 4 hours | n/a | 464 | 45.91 | 11,738 EUR | -5,404 |
| Dow Jones | Daily | n/a | 681 | 46.11 | 6,785 EUR | -4,741 |
Charts
The code
// ============================================================== // EMA 8 21 RSI Filtered Bracket // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false emaf = ExponentialAverage[8](close) emas = ExponentialAverage[21](close) myRsi = RSI[14](close)
13 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 4 market and timeframe combinations. The best run was USD/JPY, 1 hour, with a profit factor of 1.09 over 6,194 trades.
The best run had a maximum drawdown of 201,760 USD at the tested position size, against a net result of 1,051,760 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.