ExponentialMovingAverage


Summary

The Exponential Moving Average smoothes the price data producing a trend indicator.

Syntax

public ExponentialMovingAverage ExponentialMovingAverage(DataSeries source, int periods)

Parameters

NameDescription

Example 1

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