Momentum indicator
RSI (Relative Strength Index)
A momentum oscillator that measures the speed and size of recent price moves.
What is RSI (Relative Strength Index)?
The Relative Strength Index (RSI) is a momentum oscillator developed by J. Welles Wilder. It moves between 0 and 100 and measures how fast and how far price has moved recently, helping traders judge whether an instrument is overbought or oversold.
How it works
RSI compares the average size of recent up-closes to recent down-closes over a lookback period (classically 14 bars) and normalises the ratio to a 0–100 scale. Readings above 70 are traditionally considered overbought and below 30 oversold. Crucially, RSI also reveals divergence: when price makes a new high but RSI does not, momentum is weakening.
How traders use it
- ▸Overbought/oversold: fade or take profit as RSI crosses back below 70 or above 30.
- ▸Divergence: spot weakening trends when price and RSI disagree.
- ▸Trend filter: in strong trends, use the 40–60 band as support/resistance for momentum.
- ▸Confirmation: combine RSI with structure or volume rather than trading it alone.
Build RSI (Relative Strength Index) without code in Algovex
In Algovex, RSI is a node you drop onto the canvas, no coding. Connect it to a comparison or threshold node to trigger entries when it crosses your overbought/oversold levels, backtest the rule on a real bar-by-bar engine, and export the logic to Python, Pine Script or JavaScript/TypeScript. You can also set the same rule up in the Simple Editor as a when / and / then rule; both editors stay in sync.
Works well with
Common mistakes
- ✕Fading every oversold reading in a downtrend, RSI can stay below 30 for a long time. Add a trend filter.
- ✕Treating overbought as an automatic sell; in strong trends RSI stays stretched.
- ✕Using the default 14/70/30 on every market and timeframe without backtesting.
- ✕Ignoring divergence, which is often a higher-quality signal than a raw threshold.
Key parameters
| Parameter | What it does |
|---|---|
| length | Lookback period for the average gains/losses (classic default 14). |
| overbought | Upper threshold, traditionally 70. |
| oversold | Lower threshold, traditionally 30. |
| source | Price input, usually close. |
Frequently asked questions
What is a good RSI setting?
The classic setting is a 14-period RSI with 70/30 overbought/oversold levels. Shorter lengths (e.g. 7) react faster and suit lower timeframes; longer lengths smooth the signal. The best setting depends on the instrument and timeframe, backtest it rather than assuming.
What is RSI divergence?
RSI divergence is when price and RSI move in opposite directions, for example price makes a higher high while RSI makes a lower high. It signals weakening momentum and a possible reversal. Algovex has dedicated divergence detection you can add to a strategy.
Can I build an RSI strategy without coding?
Yes. In Algovex you build RSI rules by connecting nodes visually, backtest them, and export to code, no programming required.