Relative Strength would be zero divided by something positive, which gives us zero. The average decline (AvgD), on the other hand, would be some positive number (as you take absolute values when calculating the RSI). AvgU would be zero (for SMA method immediately after N bars, for EMA and Wilder's methods it would gradually approach zero with each bar if there had been non-zero U's before). There would be no up days (all the U's in the last N bars would be zero). Imagine that every single day the market closed lower than the day before. What situation in the market would give us the lowest possible RSI value? A totally bearish market, of course. RSI = 100 – 100 / ( 1 + RS) Lowest Possible RSI Value RS = AvgU / AvgD Step 4: Calculating the Relative Strength Index (RSI)įinally, we know the Relative Strength and we can apply the whole RSI formula: Now as you have the average up move (AvgU) and average down move (AvgD) in the last 14 price bars, the next step is to calculate Relative Strength, which is defined as the ratio of average up moves and average down moves.
You will find the logic of these calculations is very similar to the calculation of Average True Range (ATR), another indicator invented by J.
Welles Wilder, the inventor of RSI, calculated the indicator using a smoothing method with the same logic as an exponential moving average, only the smoothing factor is different:įor example, for RSI 14 the formula for average up move is: The EMA period is the RSI period. The formula is: Here AvgU and AvgD are calculated from up moves and down moves using an exponential moving average in the same way as you would calculate an EMA of price. N = RSI period Exponential Moving Average Under this method, which is the most straightforward, AvgU and AvgD are calculated as simple moving averages:ĪvgU = sum of all up moves (U) in the last N bars divided by NĪvgD = sum of all down moves (D) in the last N bars divided by N They differ in the way how average up and down moves are calculated: Three different approaches are commonly used. Step 2: Averaging the Advances and Declines Now you have the first important input for the RSI formula, the increases and declines in the last N days (with N being the RSI period). These up and down moves are calculated in columns C and D in the RSI Calculator.
Calculate the Relative Strength Index (get RSI).Average the up moves and down moves (get AvgU and AvgD).Calculate up moves and down moves (get U and D).There are 3 different commonly used methods for the exact calculation of AvgU and AvgD (see details below).AvgD = average of all down moves in the last N price bars.