Moving Average and Envelope
This document 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).
- TEMA (TripleExponentialMovingAverageTema).
To show the indicator for a series, add the required MovingAverage class descendant to the series’ collection of indicators, accessible via the XYDiagram2DSeriesViewBase.Indicators property.
To select whether to show a Moving Average, Envelope or both, use the MovingAverage.Kind property.
The property value | The resulting image |
---|---|
MovingAverage.Kind = MovingAverage | |
MovingAverage.Kind = MovingAverageAndEnvelope | |
MovingAverage.Kind = Envelope |
For each Moving Average, you should specify the following two properties.
- the series value level, for which the indicator is calculated (via the SingleLevelIndicator.ValueLevel property);
- the number of points utilized for calculation (via the SubsetBasedIndicator.PointsCount property).
Note that all the chart’s indicators are painted, based on a palette defined via the ChartControl.IndicatorsPaletteName property.
See Also