After a run of green candles, has a price “risen too much”? The RSI (Relative Strength Index) tries to answer by comparing, over the last candles, the average size of gains with that of losses. It gives a number between 0 and 100: the higher it is, the more gains have dominated. It measures recent momentum, not a forecast.
How it is calculated
For each candle, Algo Signals measures the change in the close: a rise counts as a “gain”, a fall as a “loss”. It averages them with smoothing over 14 candles (Wilder’s average, where each new value weighs 1/14). Then RS = average gain ÷ average loss and RSI = 100 − 100 ÷ (1 + RS). With no loss at all, the RSI is 100.
- Average gain equal to average loss: RS = 1, RSI = 50.
- Average gain twice the average loss: RS = 2, RSI ≈ 66.7.
- Average loss twice the average gain: RS = 0.5, RSI ≈ 33.3.

Reading the signal in Algo Signals
The “Signal” setting (sigMode) has two values. Mode 1 (default): bias. Bullish if the RSI is above 50, bearish below; the signal appears when it crosses 50. Mode 2: reversal from the extremes. Buy when the RSI comes back above 30 (it leaves oversold), sell when it falls back below 70 (it leaves overbought); the state is kept until the opposite event.

The settings
- Period (period): 14 by default (2 to 100). Shorter, the RSI is jumpy and hits the extremes; longer, it is calm.
- Signal (sigMode): 1 = bias around 50 (default), 2 = reversal from the extremes.
- Oversold (osLvl): 30 by default (1 to 49). Overbought (obLvl): 70 by default (51 to 99). They only serve mode 2.
- Wider levels (20 / 80) give fewer, more extreme signals; close levels (40 / 60) give many.
The pitfalls
“Oversold” does not mean “will rise”. In a strong downtrend the RSI can stay below 30 for a very long time, and each small bounce that takes it back above 30 triggers a buy against the trend. The same flaw in reverse in an uptrend. In mode 1, a flat market makes the RSI oscillate around 50 and multiplies signals. On spike indices (Boom/Crash), a sudden spike upsets the average of gains or losses.

Key takeaways
- RSI = 100 − 100 ÷ (1 + average gain ÷ average loss) over 14 candles by default; 50 = balance.
- Mode 1: bullish / bearish bias around 50. Mode 2: buy on the return above 30, sell on the return below 70.
- An extreme RSI is not a guaranteed reversal, especially in a strong trend.
- Combine it with a trend filter (MA 200, ADX) or with the short RSI to require several confirmations.
📝 Lesson test
Log in to take this lesson’s test. Once you have passed all the tests, you will receive a certificate in your name.
Log inThese lessons are for understanding and are not investment advice. No method guarantees winning.