Moving Average and Envelope
This topic describes the Moving Average (Envelope) indicator used in financial charting.
For a 2D XY-series, whose SeriesBase.ArgumentScaleType is DateTime, you can show any number of Moving Averages (and/or Envelopes) of the following kinds.
- SMA (SimpleMovingAverage);
- EMA (ExponentialMovingAverage);
- WMA (WeightedMovingAverage);
- TMA (TriangularMovingAverage).
To show the series indicator, add the required MovingAverage class descendant to the series collection of indicators, accessible from the XYDiagram2DSeriesViewBase.Indicators property.
To select whether to show a Moving Average, Envelope or both, use the MovingAverage.Kind property.
Kind = MovingAverage | Kind = MovingAverageAndEnvelope | Kind = Envelope |
---|---|---|
For each Moving Average, you should specify the following two properties.
- the SingleLevelIndicator.ValueLevel property - the series value level, for which the indicator is calculated;
- the SubsetBasedIndicator.PointsCount property - the number of points utilized for calculation.
Note that all the chart’s indicators are painted, based on a palette defined with the WebChartControl.IndicatorsPaletteName property.
See Also