Buys one contract when the 2-period RSI falls below 5 while the close is above the 200-period SMA. Sells when the close rises above the 5-period SMA, with no stop or target.
Best run of 10. USD/JPY, 30 min, spread 1, from run sweeps:2026-10-12-USDJPY-30m-opt.tsv:14.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, 30 minutes |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 30 min | n/a | 2,413 | 67.43 | 181,270 USD | -71,900 |
| Nikkei 225 | Daily | n/a | 140 | 72.14 | 20,838 USD | -4,579 |
| EUR/USD | 4 hours | n/a | 555 | 64.68 | 15,184 USD | -10,065 |
| Dow Jones | Daily | n/a | 252 | 67.46 | 9,699 EUR | -3,577 |
| Nasdaq 100 | Daily | n/a | 180 | 65.00 | 4,680 EUR | -2,311 |
| GBP/USD | 4 hours | n/a | 558 | 64.52 | 1,526 USD | -976 |
| Brent Crude | 4 hours | n/a | 202 | 68.32 | 1,270 EUR | -1,261 |
| S&P 500 | Daily | n/a | 262 | 69.85 | 1,270 EUR | -618 |
| FTSE 100 | Daily | n/a | 176 | 67.05 | 990 EUR | -988 |
| S&P 500 | 4 hours | n/a | 525 | 66.10 | 298 EUR | -293 |
Charts
The code
// ============================================================== // RSI Two Pullback Above Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false myRsi = RSI[2](close) mafive = Average[5](close) malong = Average[200](close)
9 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 10 market and timeframe combinations. The best run by trade count was USD/JPY, 30 minutes, with 2,413 trades.
The best run had a maximum drawdown of 71,900 USD at the tested position size, against a net result of 181,270 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.