Goes long when the 6 period RSI crosses under 13 and short when it crosses over 82. Each open position closes once it has been held for 3 bars, and the count restarts after each flat bar.
Best run of 2. Silver, 1 hour, spread 2, from run pf:2026-10-12-SILVER-1h.tsv:23.
| 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 | 5.20 | 2,741 | 43.49 | 520,657 USD | -46,705 |
| Nasdaq 100 | Daily | n/a | 283 | 38.87 | 4,334 EUR | -1,635 |
Charts
The code
// ============================================================== // RSI Six Bar Time Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE bars = 0 myRsi = RSI[6](close) IF OnMarket THEN bars = bars + 1 ELSE bars = 0 ENDIF
19 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 2 market and timeframe combinations. The best run was Silver, 1 hour, with a profit factor of 5.20 over 2,741 trades.
The best run had a maximum drawdown of 46,704 USD at the tested position size, against a net result of 520,657 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.