SimpleMovingAverage


Summary

The simple moving average smoothes the price data producing a trend indicator

Syntax

public SimpleMovingAverage SimpleMovingAverage(DataSeries source, int periods)

Parameters

NameDescription

Example 1

private SimpleMovingAverage sma;
protected override void Initialize()
{
    sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 14);
}
public override void Calculate(int index)
{
    Result[index] = sma.Result[index]; 
}