Table of Contents

Class MovingAverageConvergenceDivergence

Namespace
StockSharp.Algo.Indicators
Assembly
StockSharp.Algo.dll

Convergence/divergence of moving averages.

[Display(ResourceType = typeof(LocalizedStrings), Name = "MACD", Description = "MACDDesc")]
public class MovingAverageConvergenceDivergence : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
Inheritance
MovingAverageConvergenceDivergence
Implements
IPersistable
ICloneable<IIndicator>
Derived
Inherited Members
Extension Methods

Remarks

Constructors

MovingAverageConvergenceDivergence()

Initializes a new instance of the MovingAverageConvergenceDivergence.

public MovingAverageConvergenceDivergence()

MovingAverageConvergenceDivergence(ExponentialMovingAverage, ExponentialMovingAverage)

Initializes a new instance of the MovingAverageConvergenceDivergence.

public MovingAverageConvergenceDivergence(ExponentialMovingAverage longMa, ExponentialMovingAverage shortMa)

Parameters

longMa ExponentialMovingAverage

Long moving average.

shortMa ExponentialMovingAverage

Short moving average.

Properties

LongMa

Long moving average.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LongMa", Description = "LongMaDesc", GroupName = "General")]
public ExponentialMovingAverage LongMa { get; }

Property Value

ExponentialMovingAverage

Measure

public override IndicatorMeasures Measure { get; }

Property Value

IndicatorMeasures

NumValuesToInitialize

Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals true). null if undefined.

public override int NumValuesToInitialize { get; }

Property Value

int

ShortMa

Short moving average.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ShortMa", Description = "ShortMaDesc", GroupName = "General")]
public ExponentialMovingAverage ShortMa { get; }

Property Value

ExponentialMovingAverage

Methods

CalcIsFormed()

Calc IsFormed.

protected override bool CalcIsFormed()

Returns

bool

IsFormed

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnProcess(IIndicatorValue)

To handle the input value.

protected override IIndicatorValue OnProcess(IIndicatorValue input)

Parameters

input IIndicatorValue

The input value.

Returns

IIndicatorValue

The resulting value.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.