Modified Moving Average |
Modified Moving Average (Mma) is another way of calculating the average values for a series. It is applied in indicators, for example in Atr.
Modified moving average gives signals same way like any moving average – if price crosses from above, it is buy signal, if from below, it is a sell signal.
To initialize Mma use one of the following constructors:
Mma – sets default values: period = 14
Mma(Int32) – sets value for period
Use
MMA - property to get current value
1// Create new instance 2Mma mma = new Mma(28); 3 4// Number of stored values 5mma.HistoryCapacity = 2; 6 7// Add new data point 8mma.Add(CurrentPrice); 9 10// Get indicator value 11double IndicatorValue = mma.MMA; 12// Get previous value 13if (mma.HistoryCount == 2) 14{ 15 double IndicatorPrevValue = mma[1]; 16}