Compartilhar via


Relative Strength Index Formula (Chart Controls)

The relative strength index formula is a momentum oscillator formula that compares upward movements of the close price with downward movements, and outputs values from 0 to 100. A value close to 100 indicates that the price is about to move downward, and a value close to 0 indicates that the price is about to move upward.

Sample plot of the relative strength index

Formula Details

Syntax

Chart.DataManipulator.FinancialFormula(
    FinancialFormula.RelativeStrengthIndex,
    "Period,StdDev",
    "Price",
    "UpperBand,LowerBand")

Parameters

This formula takes one optional parameter.

  • Period
    Period for calculating the relative strength index. The default value is 10.

Input Values

This formula takes one input Y value.

  • Price
    The closing price for which the relative strength index is calculated.

Output Value

This formula outputs one Y value.

  • RSI
    Relative strength index.

Remarks

The Line chart type is a convenient chart type to display the formula output.

Example

The following example takes input from Series1's fourth Y value (Series1:Y4) and outputs the relative strength indicator on Series2 (Series2:Y). It also specifies a period of 15 days.

Chart1.DataManipulator.FinancialFormula (FinancialFormula.RelativeStrengthIndex, "15", "Series1:Y4", "Series2:Y")
Chart1.DataManipulator.FinancialFormula (FinancialFormula.RelativeStrengthIndex, "15", "Series1:Y4", "Series2:Y");

See Also

Reference

System.Windows.Forms.DataVisualization.Charting
System.Web.UI.DataVisualization.Charting

Concepts

Financial Formulas
Applying Formulas