Relative Strength Index (RSI)

To calculate the RSI, the average gains and losses of a security over a specified period of time are first calculated. The RSI is then calculated by dividing the average gain by the average loss and expressing the result as a percentage.

The formula for calculating the RSI is:

RSI = 100 - (100 / (1 + RS))

Where:

RS = Average Gain / Average Loss

The period of time over which the RSI is calculated can vary depending on the preferences of the trader, but a common period is 14 days. A shorter time period may provide more sensitive signals but may also result in more false signals, while a longer time period may provide more reliable signals but may be less responsive to short-term changes in the price trend.