|Visual Basic (Declaration)|
Public Overloads Shared Function RelativeStrengthIndex( _ ByVal seriesName As String, _ ByVal s As Series, _ ByVal lengthOfPeriod As Integer _ ) As Series
|Visual Basic (Usage)||Copy Code|
- The name of the series which will be displayed on the chart, i.e. its label.
- An series where the first element is the high in the last trading period, the second term is the high in the previous period and so on.
- An integer which represents the length of the period over which the indicator will be iteratively evaluated.
The RSI indicator is calculated by the following formula:
RSI = 100 - 100/(1+RS),
RS = (Average of noOfPeriods days up closes) / (Average of noOfPeriods days' down closes),
An RSI above 70 is considered overbought and below 30 is considered oversold.