It buys when SMA(11) crosses above SMA(82) with RSI(14) below 75, and sells short on the mirror cross with RSI(14) above 25. It takes profit at RSI(14) above 80 for longs and below 20 for shorts, then re-enters on a later RSI reading.
Best run of 10. EUR/USD, Daily, spread 1, from run pf:2026-10-12-EURUSD-D.tsv:8.
| Period | Up to 2026-10-12 |
| Instrument | EUR/USD, 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 |
|---|---|---|---|---|---|---|
| EUR/USDBest run | Daily | 1.56 | 279 | 36.56 | 195,450 USD | -37,371 |
| USD/JPY | Daily | 1.49 | 277 | 36.82 | 2,263,100 USD | -500,080 |
| USD/JPY | 1 hour | n/a | 3,127 | 34.47 | 422,820 USD | -337,980 |
| USD/JPY | 4 hours | n/a | 816 | 34.68 | 385,040 USD | -343,060 |
| Nikkei 225 | Daily | n/a | 228 | 35.09 | 33,857 USD | -20,825 |
| US Crude Oil | Daily | n/a | 231 | 37.66 | 25,360 EUR | -7,749 |
| US Crude Oil | 4 hours | n/a | 520 | 34.81 | 13,970 EUR | -9,439 |
| Brent Crude | Daily | n/a | 119 | 36.13 | 11,022 EUR | -8,995 |
| S&P 500 | Daily | n/a | 310 | 32.58 | 2,482 EUR | -2,024 |
| Gold | Daily | n/a | 331 | 34.44 | 1,839 EUR | -1,323 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // SMA Cross With RSI Re-entry // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE longf = 0 ONCE shortf = 0 ONCE longpend = 0 ONCE shortpend = 0 ONCE longob = 0 ONCE shortos = 0 smafast = Average[11](close) smaslow = Average[82](close) myRsi = RSI[14](close) waslong = LongOnMarket wasshort = ShortOnMarket flat = NOT LongOnMarket AND NOT ShortOnMarket
54 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 was EUR/USD, Daily, with a profit factor of 1.56 over 279 trades.
The best run had a maximum drawdown of 37,371 USD at the tested position size, against a net result of 195,450 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.