RSI
Overview of the Relative Strength Index calculation.
The relative strength index (RSI) is a technical indicator of momentum that measures the speed and change of price on a scale of 0 to 100, typically over the past 14 periods. Readings over 70 are considered overbought while readings below 30 are considered oversold.
The source code for the RSI function is available here.
/* Often documentation present the RSI calculation as follow:
* RSI = 100 - (100 / 1 + (prevGain/prevLoss))
*
* The following is equivalent:
* RSI = 100 * (prevGain/(prevGain+prevLoss))
*
* The second equation is used here for speed optimization.
*/
Last updated
Was this helpful?