Return value of the Relative Strength Index indicator, also known as RSI, over the last N periods of the selected price.
Syntax:
1 |
RSI[N](price) |
Calculation :
RSI (on n period) = 100 * average of n days up / (average of n days up + average of n days down)
Interpretation :
RSI is an overbought/oversold indicator. Buy signals occur generally when crossing the 30 level and sell signals when crossing the 70 level.
RSI is always scaled between 0 and 100.
It also gives good divergence signals.
A bullish divergence occurs when the stock price makes new lows while the RSI fails to make new lows.
A bearish divergence occurs when the stock price makes new highs while the RSI fails to make new highs.
Example:
1 2 3 4 5 6 |
myRSI = RSI[14](close) //Smoothing the RSI value on 10 periods SmoothRSI = Average[10](myRSI) RETURN myRSI, SmoothRSI coloured(121,45,180) |
Very Happy to find here the average function for other value than close !!