Click or drag to resize

Mass Index

The MassIndex endeavors to locate turns in trends. It is based on changes between maximum and minimum prices. If the amplitude gets wider, the mass index grows; if it gets narrower, the index gets smaller.

Market Signals

The most important mass index signal is a special model formed by the indicator.  It is called "reversal bulge". It is formed when a 25-period mass index first rises above 27 and then falls below 26.5. In this case a turn of prices can take place, independently of the general trend - the prices may move up or down or fluctuate within a trade range.  When a reversal bulge appears, you should buy if the moving average falls and sell if it rises.

Calculation

Mass Index 001

Where

Mass Index 002

Chart Example

Mass Index 003

Implementation and Usage

To initialize MassIndex use one of the following constructors:

MassIndex – sets default values: smoothigPeriod = 9, sumPeriod = 3

MassIndex(Int32, Int32) – sets values for periods

Use

MI - properties to get current value

Example
C#
 1// Create new instance
 2MassIndex massIndex = new MassIndex(18, 6);
 3
 4// Number of stored values
 5massIndex.HistoryCapacity = 2;
 6
 7// Add new data point
 8massIndex.Add(Bars.Current.Open, Bars.Current.High, Bars.Current.Low, Bars.Current.Close, Bars.Current.Volume);
 9
10// Get indicator value
11double IndicatorValue = massIndex.MI;
12// Get previous value
13if (massIndex.HistoryCount == 2)
14{
15    double IndicatorPrevValue = massIndex[1];
16}