The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and magnitude of recent price changes. Developed by J. Welles Wilder in 1978, it remains one of the most widely used indicators in algorithmic trading — and for good reason.
What Is RSI and How Is It Calculated?
RSI is plotted on a scale from 0 to 100. It compares the average gains to average losses over a specified period (typically 14 periods). The formula: RSI = 100 - (100 / (1 + RS)), where RS = Average Gain / Average Loss.
Key Levels
RSI above 70 = overbought (potential sell signal). RSI below 30 = oversold (potential buy signal). RSI at 50 = neutral momentum.
Basic RSI Trading Strategy
The classic RSI strategy is simple: buy when RSI crosses below 30 (oversold), sell when RSI crosses above 70 (overbought). This works well in ranging markets but can produce false signals in strong trends.
Advanced RSI Configurations for Algo Trading
RSI Period Adjustment
The default 14-period RSI is a good starting point, but shorter periods (7-9) make it more sensitive and generate more signals. Longer periods (21-25) produce fewer but more reliable signals.
RSI Divergence
Divergence occurs when price makes a new high/low but RSI doesn't confirm it. Bullish divergence (price lower low, RSI higher low) is a strong buy signal. Bearish divergence is the opposite.
RSI + Moving Average Filter
Combine RSI with a 200-period moving average to filter trades. Only take RSI buy signals when price is above the 200 MA (uptrend), and only take sell signals when price is below it (downtrend).
Avoiding False Signals
- In strong uptrends, RSI can stay above 70 for extended periods — don't short just because it's overbought
- Add a volume filter: only take signals when volume is above the 20-period average
- Use RSI on multiple timeframes — a signal on both 1H and 4H is stronger than on 1H alone
- Combine with support/resistance levels for higher-probability entries
Backtesting Your RSI Strategy
Before going live, backtest your RSI configuration on at least 2 years of historical data across different market conditions (bull, bear, sideways). Look for a win rate above 50% and a profit factor above 1.5.
Pro Tip
CAJDA Bot's backtesting engine lets you test RSI strategies on historical data with one click. Adjust parameters and see results instantly before risking real capital.
Configure your RSI strategy in CAJDA Bot and backtest it against years of market data — free for 15 days.
Start Free Trial