MovingAverage


Summary

Moving Average indicators are used to smooth data producing trend indicators.

Syntax

public MovingAverage MovingAverage(DataSeries source, int periods, MovingAverageType maType)

Parameters

NameDescription

Example 1

private MovingAverage ma;
protected override void Initialize()
{
    ma = Indicators.MovingAverage(MarketSeries.Close, 50, MovingAverageType.Simple);
}
public override void Calculate(int index)
{
    // Display the ma result on the chart
    Result[index] = ma.Result[index]; 
}