MovingAverageType
Summary
An enumeration of the different MovingAverage weighting (smoothing) methods.
Signature
| public enum MovingAverageType
|
Namespace
cAlgo.API
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo
{
// A sample indicator that shows how to use different types of moving average
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class MovingAverageTypeSample : Indicator
{
private MovingAverage _ma;
[Parameter("Type", DefaultValue = MovingAverageType.Simple)]
public MovingAverageType MovingAverageType { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
protected override void Initialize()
{
_ma = Indicators.MovingAverage(Bars.ClosePrices, 14, MovingAverageType);
}
public override void Calculate(int index)
{
Result[index] = _ma.Result[index];
}
}
}
|
Fields
Simple
Summary
Use uniform weighting. Represents indicator oftype.
Signature
| public static MovingAverageType Simple;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.Simple)]
public MovingAverageType MaType { get; set; }
|
Exponential
Summary
Use exponential weighting. Represents indicator oftype.
Signature
| public static MovingAverageType Exponential;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.Exponential)]
public MovingAverageType MaType { get; set; }
|
TimeSeries
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType TimeSeries;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.TimeSeries)]
public MovingAverageType MaType { get; set; }
|
Triangular
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType Triangular;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.Triangular)]
public MovingAverageType MaType { get; set; }
|
VIDYA
Summary
VIDYA (Variable Index Dynamic Average) variable length weighting. Represents indicator oftype.
Signature
| public static MovingAverageType VIDYA;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.VIDYA)]
public MovingAverageType MaType { get; set; }
|
Weighted
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType Weighted;
|
Return Value
MovingAverageType
Examples
| [Parameter("MAType", DefaultValue = MovingAverageType.Weighted)]
public MovingAverageType MaType { get; set; }
|
WilderSmoothing
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType WilderSmoothing;
|
Return Value
MovingAverageType
Examples
Hull
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType Hull;
|
Return Value
MovingAverageType
Examples
DoubleExponential
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType DoubleExponential;
|
Return Value
MovingAverageType
Examples
TripleExponential
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType TripleExponential;
|
Return Value
MovingAverageType
Examples
KaufmanAdaptive
Summary
Represents indicator oftype.
Signature
| public static MovingAverageType KaufmanAdaptive;
|
Return Value
MovingAverageType
Examples