Goes long when the 14 period RSI falls below 20 and short when it rises above 80. Each position closes when the RSI moves back past its threshold or after more than 5 bars since the RSI crossed the level.
Best run of 10. Silver, 1 hour, spread 2, from run pf:2026-10-12-SILVER-1h.tsv:21.
| Period | Up to 2026-10-12 |
| Instrument | Silver, 1 hour |
| Spread | 2 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 |
|---|---|---|---|---|---|---|
| SilverBest run | 1 hour | 15.54 | 836 | 50.72 | 549,717 USD | -20,178 |
| EUR/USD | Daily | n/a | 54 | 74.07 | 37,872 USD | -4,072 |
| EUR/USD | 30 min | n/a | 1,006 | 61.23 | 14,930 USD | -10,007 |
| Silver | Daily | n/a | 71 | 63.38 | 13,079 USD | -8,976 |
| Nikkei 225 | Daily | n/a | 61 | 63.93 | 10,984 USD | -2,735 |
| US Crude Oil | Daily | n/a | 37 | 78.38 | 4,743 EUR | -406 |
| Brent Crude | 4 hours | n/a | 80 | 78.75 | 2,072 EUR | -770 |
| Nasdaq 100 | Daily | n/a | 55 | 50.91 | 1,661 EUR | -857 |
| FTSE 100 | Daily | n/a | 38 | 76.32 | 1,427 EUR | -338 |
| S&P 500 | Daily | n/a | 57 | 50.88 | 808 EUR | -86.67 |
Charts
The code
// ============================================================== // RSI 20 80 Time Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE bsdn = -1 ONCE bsup = -1 myRsi = RSI[14](close)
28 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 Silver, 1 hour, with a profit factor of 15.54 over 836 trades.
The best run had a maximum drawdown of 20,178 USD at the tested position size, against a net result of 549,716 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.