Skip to content

momentum indicator

RSI backtesting — Relative Strength Index

The Relative Strength Index (RSI) is a momentum oscillator that measures how fast and how far price has moved recently, on a scale from 0 to 100. Traders read low values as oversold and high values as overbought — but whether those levels actually predict anything on your market and timeframe is exactly what a backtest is for.

Try RSI on BTC/USDT ETH/USDT SOL/USDT

How RSI works

RSI compares the average size of recent up-moves to the average size of recent down-moves over a lookback window. When gains dominate, RSI rises toward 100; when losses dominate, it falls toward 0. The averages use Wilder’s smoothing (an EMA variant), which is why RSI reacts quickly but not instantly to reversals. CandleTest computes RSI with TradingView-parity math, so a value you see here matches the value you’d see on a TradingView chart for the same candle and settings. Classic readings: below 30 as oversold, above 70 as overbought, and the 50 line as a trend filter — all three are testable as no-code rules.

RSI settings

Lengthdefault 14

The lookback window. Shorter lengths make RSI whip between extremes more often (more signals, more noise); longer lengths smooth it out and fire rarely.

Example RSI strategies to backtest

Mean-reversion long

Enter long when RSI crosses above 30 (leaving oversold). Exit when RSI crosses above 70.

Trend filter

Enter long when RSI crosses above 50 and exit when it crosses back below 50 — a simple momentum-following rule that avoids calling tops and bottoms.

Overbought exit

Exit an open long when RSI crosses below 70 (leaving overbought) — a way to trim a trend-following long before momentum fully rolls over.

Every rule above is buildable in the no-code strategy builder — pick conditions, press run, and get win rate, drawdown and equity curve on real exchange data with fees and leverage modeled.

RSI FAQ

What is a good RSI setting for crypto?

There is no universally good setting — it depends on the pair, the timeframe, and the rule you attach to it. The standard length works as a starting point, but the honest answer is to backtest a few lengths on the exact market you trade and compare the results, which takes about a minute per run in CandleTest.

Does buying oversold RSI actually work?

Sometimes — mean reversion tends to work in ranging markets and fail badly in strong downtrends, where RSI can stay oversold while price keeps falling. Backtesting the rule over a period that includes both regimes shows you the trade-off in real numbers rather than folklore.

Is CandleTest’s RSI the same as TradingView’s?

Yes — the implementation follows TradingView conventions, including Wilder’s smoothing, and is unit-tested for parity. The same candle with the same settings produces the same RSI value on both.

Can I combine RSI with other indicators?

Yes. The strategy builder lets you AND conditions together — for example, only take RSI oversold entries when price is above a long moving average, so you buy dips in uptrends instead of catching falling knives.

Related indicators