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
-
IPersistableICloneable<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
ExponentialMovingAverageLong moving average.
shortMa
ExponentialMovingAverageShort 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
Measure
public override IndicatorMeasures Measure { get; }
Property Value
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
ShortMa
Short moving average.
[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ShortMa", Description = "ShortMaDesc", GroupName = "General")]
public ExponentialMovingAverage ShortMa { get; }
Property Value
Methods
CalcIsFormed()
Calc IsFormed.
protected override bool CalcIsFormed()
Returns
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnProcess(IIndicatorValue)
To handle the input value.
protected override IIndicatorValue OnProcess(IIndicatorValue input)
Parameters
input
IIndicatorValueThe input value.
Returns
- IIndicatorValue
The resulting value.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.