Join waitlist
Strategies / Mean reversion / RSI Six Bar Time Exit

RSI Six Bar Time Exit

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.

Mean reversionLong & shortSwingSilver1 hour
5.20Profit factor
520,657Net profit USD
43.49%Win rate
2,741Trades
-46,705Max drawdown
190Avg trade

Best run of 2. Silver, 1 hour, spread 2, from run pf:2026-10-12-SILVER-1h.tsv:23.

Entry rules, long

  1. The 6 period RSI crosses under 13 and no long is open

Entry rules, short

  1. The 6 period RSI crosses over 82 and no short is open

Exit rules

  1. No new entry is placed on a bar where the 3 bar exit is due

Test conditions

PeriodUp to 2026-10-12
InstrumentSilver, 1 hour
Spread2 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
SilverBest run1 hour5.20 2,74143.49520,657 USD-46,705
Nasdaq 100Dailyn/a 28338.874,334 EUR-1,635

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

RSI
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run RSI Six Bar Time Exit in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 46,704 USD at the tested position size, against a net result of 520,657 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

SMA Crossover With RSI Exit

Best run on the same market, Silver.

2.13 PF · 8,999 trades

Bollinger Band Dip RSI Filter

Also a mean reversion strategy.

5.08 PF · 108 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs