All TermsIndicator

RSI (Relative Strength Index)

The Relative Strength Index is a momentum oscillator that measures the magnitude of recent price changes on a 0–100 scale. Readings above 70 suggest overbought conditions; below 30 suggest oversold.

How RSI works

RSI compares the average gain over N bars to the average loss. When gains dominate, RSI rises toward 100; when losses dominate, it falls toward 0. The default length is 14 bars.

Formula

RSI = 100 − (100 / (1 + RS)), where RS = average gain / average loss over N bars.

Mean reversion vs trend confirmation

RSI is typically used two ways:

  1. Mean reversion — buy below 30, exit above 70. See RSI Mean Reversion.
  2. Trend confirmation — long-only when RSI > 50, short-only when RSI < 50. Cuts trades against the prevailing trend.

RSI in Pine Script

pinescript
rsi = ta.rsi(close, 14)
if rsi < 30
    strategy.entry("Long", strategy.long)

Strategies that use RSI (Relative Strength Index)

Related Terms

Stop Reading. Start Trading.

PineForge backtests every concept on this site against real market data.

Try It Free

We use cookies for analytics and ads measurement. See our privacy policy.