Mass Index Formula (Chart Controls)
The mass index formula predicts trend reversals by calculating the range between high and low prices for each period. A bulge in the index line signals a possible trend reversal. You can use a 9-day Exponential Moving Average Formula to determine whether the bulge is a buy or sell signal.
Formula Details
Syntax
Chart.DataManipulator.FinancialFormula(
FinancialFormula.MassIndex,
"PeriodA,PeriodEMA",
"High,Low",
"MI")
Parameters
This formula takes two optional parameters.
- PeriodA
Period of accumulation. The default value is 25.
- PeriodEMA
Period for calculating the exponential moving average for the mass index. The default value is 9.
Input Values
This formula takes two input Y values.
- High
Daily high price.
- Low
Daily low price.
Output Value
This formula outputs one Y value.
- MI
Mass 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 Y value for the high and low prices, respectively, (Series1:Y,Series1:Y2), and outputs the mass index on Series3 (Series3:Y). It uses an accumulation period of 30 days and a moving average period of 12 days.
Chart1.DataManipulator.FinancialFormula (FinancialFormula.MassIndex, "30,12", "Series1:Y,Series1:Y2", "Series3:Y")
Chart1.DataManipulator.FinancialFormula (FinancialFormula.MassIndex, "30,12", "Series1:Y,Series1:Y2", "Series3:Y");
See Also
Reference
System.Windows.Forms.DataVisualization.Charting
System.Web.UI.DataVisualization.Charting