Relative Strength Index (RSI)
RSI measures the speed and size of recent price moves on a scale of 0 to 100. It's calculated from the average size of up-moves versus down-moves over a lookback period, most commonly 14 candles: RSI = 100 − 100 / (1 + RS), where RS is the average gain divided by the average loss over that window.
Readings above 70 are conventionally read as overbought and below 30 as oversold, but in a strong trend RSI can sit in those zones for a long time without the price reversing — the more common use is spotting divergence, where price makes a new high or low that RSI doesn't confirm.
In an automated strategy, RSI is usually combined with a trend filter rather than used as a standalone signal, since raw overbought/oversold crossings produce a lot of false entries in trending markets.