Dundas Chart for SharePoint Send comments on this topic.
Relative Strength Index Formula

Glossary Item Box

Overview

The Relative Strength Index is a momentum oscillator that compares upward movements of the Close price with downward movements, and results in values that range from 0 to 100. The Relative Strength index was developed by J. Welles Wilder.

 

Note
We recommend that you read Using Financial Formulas before proceeding any further. Using Financial Formulas provides a detailed explanation on how to use formulas, and also explains the various options available to you when applying a formula.

 

Figure 1: The Relative Strength Index of the Close price in the lower chart area. The High, Low and Close prices are plotted in the upper chart area as a stock chart.

 

Applying a Relative Strength Index

All formulas are calculated using the FormulaFinancial method, which accepts the following types of arguments: a formula name; input value(s); output value(s), and parameter(s) that are specific to the type of formula being applied.

Also, before applying the FormulaFinancial method, make sure that all data points have their XValue property set, and that their series' XValueIndexedproperty has been set to false.

The following table indicates what sort of FormulaFinancial method arguments to use when calculating a Relative Strength Index, and also supplies a description of what these parameters mean:

 

Parameter

Value/Description

Example

Formula Name:

RelativeStrengthIndex

 

FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15","Series1:Y4","Series3:Y")

Input Value:

Value which represents the Close price. By default this is the fourth Y value in the stock chart.

FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15"," Series1:Y4","Series3:Y")

Output Value:
(optional)

The Relative Strength Index. If not specified output is stored in the input value.

FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15","Series1:Y4"," Series3:Y")

Parameters:
(optional)

Period, which is a time period used in the Relative Strength Index (Default value is 10).

FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15","Series1:Y4","Series3:Y")

 

A line chart is a good choice when displaying a Relative Strength Index series.

Financial Interpretation: The Relative Strength Index is useful for detecting Movement which is not readily apparent, and also as a Reversal signal using Divergence between the RSI and price (an RSI above 70 or below 30 warns of coming reversals). The Relative Strength Index is smoother than the Rate of Change.

Calculation: The Relative Strength index is calculated using following algorithm:

1. Average Upward Price Move = EMA( Sum of all upward movements in Closing price )

2. Average Downward Price Move = EMA( Sum of all downward movements in Closing price )

3. Calculate Relative Strength (RS):

RS = Average Upward Price Move / Average Downward Price Move

 

4. Calculate the Relative Strength Index (RSI):

RSI = 100 - 100 / ( 1 + RS )

Example

This example demonstrates how to calculate the Relative Strength Index.

Visual Basic Copy Code

With chartObj.DataManipulator
' Calculates Relative Strength Index. Input Series1 contains Close price.
.FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15","Series1:Y4","Series3:Y")
End With
C# Copy Code
// Calculates Relative Strength Index. Input Series1 contains Close price.
chartObj.DataManipulator.FormulaFinancial(FinancialFormula.RelativeStrengthIndex,"15",
"Series1:Y4","Series3:Y");