FinAnalysis User Guide

## 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__.

Market Signals

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.

Calculation

Chart Example

Implementation and Usage

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

Example

C#

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}