RSI Class

Relative Strength Index (RSI).
[Serializable()] 
public class RSI : Indicator
This language is not supported or no code example is available.
[Serializable()] 
public ref class RSI : public Indicator^
This language is not supported or no code example is available.
public  
Serializable() 
class RSI 
extends Indicator
This language is not supported or no code example is available.
Name Description
Public constructor RSI(ISeries, int, BarData, IndicatorStyle) RSI normal constructor.
Top
Name Description
Public property AutoUpdate (inherited from Indicator).
Public property BarData The bar data of RSI.
Public property Count Gets the count. (inherited from Indicator).
Public property Description Gets the description. (inherited from TimeSeries).
Public property Fields (inherited from Indicator).
Public property First Gets the first. (inherited from Indicator).
Public property FirstDateTime Datetime of the first item in this time array (inherited from Indicator).
Public property Id Gets the id. (inherited from TimeSeries).
Public property Indicators Gets the indicators. (inherited from TimeSeries).
Public property IsMultiIndicator (inherited from Indicator).
Public property IsUseBarSlice (inherited from Indicator).
Public property Item(int, BarData) Gets the Double at the specified index and bar data. (inherited from Indicator).
Public property Item(int) Gets or sets the Double at the specified index. (inherited from Indicator).
Public property Last Gets the last. (inherited from Indicator).
Public property LastDateTime Datetime of the last item in this time array (inherited from Indicator).
Public property Length The length of RSI.
Public property MaxLength (inherited from TimeSeries).
Public property Name Gets the name. (inherited from TimeSeries).
Public property Style The style of RSI.
Top
Methods
 
Name Description
Public method Add(DateTime, double) Adds the specified date time. (inherited from TimeSeries).
Public method Ago(int) Agoes the specified n. (inherited from TimeSeries).
Public method Attach() (inherited from Indicator).
Public method Calculate(int) Calculate RSI at the specific index.
Public method Clear() (inherited from Indicator).
Public method Clone(ISeries)
Public method Contains(DateTime) Determines whether [contains] [the specified date time]. (inherited from TimeSeries).
Public method Crosses(TimeSeries, DateTime) Crosseses the specified series. (inherited from TimeSeries).
Public method Crosses(double, int) Crosseses the specified level. (inherited from TimeSeries).
Public method Detach() (inherited from Indicator).
Public method Exp() Exps this instance. The type of this instance must have a parameterless constructor. (inherited from TimeSeries).
Public method GetAsymmetry(int, int, int) Gets the asymmetry. (inherited from TimeSeries).
Public method GetAutoCorrelation(int) Calculate autocorrelation (inherited from TimeSeries).
Public method GetAutoCovariance(int) Calculate autocovariance (inherited from TimeSeries).
Public method GetByDateTime(DateTime, SearchOption) Gets the by date time. (inherited from TimeSeries).
Public method GetByIndex(Instrument, int) (inherited from Indicator).
Public method GetByIndex(int, int) (inherited from Indicator).
Public method GetCorrelation(TimeSeries) Gets the correlation. (inherited from TimeSeries).
Public method GetCorrelation(TimeSeries, int, int) Gets the correlation. (inherited from TimeSeries).
Public method GetCorrelation(int, int, int, int) Gets the correlation. (inherited from TimeSeries).
Public method GetCovariance(TimeSeries) Gets the covariance. (inherited from TimeSeries).
Public method GetCovariance(TimeSeries, int, int) Gets the covariance. (inherited from TimeSeries).
Public method GetCovariance(int, int, int, int) Gets the covariance. (inherited from TimeSeries).
Public method GetDateTime(int) Gets the date time. (inherited from Indicator).
Public method GetExcess(int, int, int) Gets the excess. (inherited from TimeSeries).
Public method GetFirst(Instrument) (inherited from Indicator).
Public method GetFirst(int) (inherited from Indicator).
Public method GetIndex(DateTime, IndexOption) Gets the index. (inherited from Indicator).
Public method GetIntersection(TimeSeries) (inherited from TimeSeries).
Public method GetItem(int) Gets the item. (inherited from TimeSeries).
Public method GetLast(Instrument) (inherited from Indicator).
Public method GetLast(int) (inherited from Indicator).
Public method GetMax(DateTime, DateTime) Gets the maximum. (inherited from Indicator).
Public method GetMaxItem() Gets the maximum item. (inherited from TimeSeries).
Public method GetMean() Calculate mean (inherited from TimeSeries).
Public method GetMean(DateTime, DateTime, int) Calculate mean (inherited from TimeSeries).
Public method GetMean(int, int, int) Calculates mean (inherited from TimeSeries).
Public method GetMean(DateTime, DateTime) Calculate mean (inherited from TimeSeries).
Public method GetMean(int, int) Calculate mean (inherited from TimeSeries).
Public method GetMean(int) Calculate mean (inherited from TimeSeries).
Public method GetMedian() Calculates median (inherited from TimeSeries).
Public method GetMedian(DateTime, DateTime, int) Calculate median (inherited from TimeSeries).
Public method GetMedian(int, int, int) Calculates medain (inherited from TimeSeries).
Public method GetMedian(DateTime, DateTime) Calculate median (inherited from TimeSeries).
Public method GetMedian(int, int) Calculate median (inherited from TimeSeries).
Public method GetMedian(int) Calculate median (inherited from TimeSeries).
Public method GetMin(DateTime, DateTime) Gets the minimum. (inherited from Indicator).
Public method GetMinItem() Gets the minimum item. (inherited from TimeSeries).
Public method GetMoment(int, int, int, int) Gets the moment. (inherited from TimeSeries).
Public method GetNegativeSeries() Returns new double series with negative data entries from this array (inherited from TimeSeries).
Public method GetNegativeStdDev() Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeStdDev(DateTime, DateTime) Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeStdDev(DateTime, DateTime, int) Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeStdDev(int, int) Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeStdDev(int, int, int) Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeStdDev(int) Calculate standard deviation of negative data entries (inherited from TimeSeries).
Public method GetNegativeVariance(int, int, int) Calculate variance of negative data entries (inherited from TimeSeries).
Public method GetNegativeVariance() Calculate variance of negative data entries (inherited from TimeSeries).
Public method GetNegativeVariance(DateTime, DateTime) Calculate variance of negative data entries (inherited from TimeSeries).
Public method GetNegativeVariance(DateTime, DateTime, int) Gets the negative variance. (inherited from TimeSeries).
Public method GetNegativeVariance(int, int) Calculate variance of negative data entries (inherited from TimeSeries).
Public method GetNegativeVariance(int) Calculate variance of negative data entries (inherited from TimeSeries).
Public method GetPercentReturnSeries() Gets the percent return series. (inherited from TimeSeries).
Public method GetPositiveSeries() Returns new double series with positive data entries from this array (inherited from TimeSeries).
Public method GetPositiveStdDev() Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveStdDev(DateTime, DateTime) Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveStdDev(DateTime, DateTime, int) Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveStdDev(int, int) Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveStdDev(int, int, int) Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveStdDev(int) Calculate standard deviation of positive data entries (inherited from TimeSeries).
Public method GetPositiveVariance(int, int, int) Calculate variance of positive data entries (inherited from TimeSeries).
Public method GetPositiveVariance() Calculate variance of positive data entries (inherited from TimeSeries).
Public method GetPositiveVariance(DateTime, DateTime) Calculate variance of positive data entries (inherited from TimeSeries).
Public method GetPositiveVariance(DateTime, DateTime, int) Gets the positive variance. (inherited from TimeSeries).
Public method GetPositiveVariance(int, int) Calculate variance of positive data entries (inherited from TimeSeries).
Public method GetPositiveVariance(int) Calculate variance of positive data entries (inherited from TimeSeries).
Public method GetReturnSeries() Gets the return series. (inherited from TimeSeries).
Public method GetStdDev() Calculate standard deviation (inherited from TimeSeries).
Public method GetStdDev(DateTime, DateTime) Calculate standard deviation (inherited from TimeSeries).
Public method GetStdDev(DateTime, DateTime, int) Calculate standard deviation (inherited from TimeSeries).
Public method GetStdDev(int, int) Calculate standard deviation (inherited from TimeSeries).
Public method GetStdDev(int, int, int) Calculate standard deviation (inherited from TimeSeries).
Public method GetStdDev(int) Calculate standard deviation (inherited from TimeSeries).
Public method GetSum() Calculate sum (inherited from TimeSeries).
Public method GetSum(int, int, int) Calculate sum (inherited from TimeSeries).
Public method GetTimeSeriesItem(int) (inherited from TimeSeries).
Public method GetValue(int) Gets the value. (inherited from TimeSeries).
Public method GetVariance() Calculate variance (inherited from TimeSeries).
Public method GetVariance(int, int, int) Calculate variance (inherited from TimeSeries).
Public method GetVariance(DateTime, DateTime) Calculate variance (inherited from TimeSeries).
Public method GetVariance(DateTime, DateTime, int) Gets the variance. (inherited from TimeSeries).
Public method GetVariance(int, int) Calculate variance (inherited from TimeSeries).
Public method GetVariance(int) Calculate variance (inherited from TimeSeries).
Public method IndexOf(DateTime, SearchOption) Indexes the of. (inherited from TimeSeries).
Protected method Init() Init RSI indicator.
Public method Log() Logs this instance. The type of this instance must have a parameterless constructor. (inherited from TimeSeries).
Public method Log10() Log10s this instance. The type of this instance must have a parameterless constructor. (inherited from TimeSeries).
Public method Pow(double) Pows the specified pow. The type of this instance must have a parameterless constructor. (inherited from TimeSeries).
Public method Remove(int) Removes the specified index. (inherited from TimeSeries).
Public method Shift(int) Shifts the specified offset. (inherited from TimeSeries).
Public method Sqrt() SQRTs this instance. The type of this instance must have a parameterless constructor. (inherited from TimeSeries).
Public method Static Value(ISeries, int, int, BarData, IndicatorStyle) Calculate RSI for the specific instance of ISeries, index, length, bar data and style.
Top
Name Description
Operator Static Addition Implements the +. (inherited from TimeSeries).
Operator Static Addition Implements the +. (inherited from TimeSeries).
Operator Static Addition Implements the +. (inherited from TimeSeries).
Operator Static Division Implements the /. (inherited from TimeSeries).
Operator Static Division Implements the /. (inherited from TimeSeries).
Operator Static Division Implements the /. (inherited from TimeSeries).
Operator Static Multiply Implements the *. (inherited from TimeSeries).
Operator Static Multiply Implements the *. (inherited from TimeSeries).
Operator Static Multiply Implements the *. (inherited from TimeSeries).
Operator Static Subtraction Implements the -. (inherited from TimeSeries).
Operator Static Subtraction Implements the -. (inherited from TimeSeries).
Operator Static Subtraction Implements the -. (inherited from TimeSeries).
Top
Fields
 
Name Description
Protected field barData
Protected field calculate (inherited from Indicator).
Internal protected (Protected Friend) field description (inherited from TimeSeries).
Protected field downTS
Protected field input (inherited from Indicator).
Protected field length
Protected field name (inherited from TimeSeries).
Protected field style
Protected field upTS
Top
Remarks
 
The Relative Strength Index, developed by Welles Wilder is a special form of the Momentum and probably the most widely used contra-trend-oscillator. Contrary to the implications of its name, the indicator does not show the instrument's strength in comparison to other instruments, but rather the instrument's internal strength compared to its former prices.  
The RSI is calculated in several steps: within a given period, the individual differences between the upward closing prices (Close today > Close yesterday) and downward closing prices (Close today less than Close yesterday) are added up and afterwards divided by the number of observations minus one. The result is the day's mean value of the upward and downward strength of the underlying instrument. Thereafter, the relative strength is calculated by dividing the average upward strength by the average downward strength. Finally, you arrive at the RSI by subtracting from 100 the quotient of 100 divided by 1 plus relative strength.  
 
This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".  
 
Note, that there are two styles of indicator RSI. Some trading systems use the formula (which is a little bit distinguished from classical) for calculation of this indicator. Therefore Old gives an opportunity to use two styles RSI - classical (Old style) and little bit changed (New style.)  
 
RSI has Old style by Default.  
 
Formula for Old (classical) style:  

In this article

Definition