Class ZigZag
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.Algo.dll
Zig Zag.
[Display(ResourceType = typeof(LocalizedStrings), Name = "ZigZag", Description = "ZigZagDesc")]
[IndicatorIn(typeof(CandleIndicatorValue))]
[IndicatorOut(typeof(ZigZagIndicatorValue))]
[Doc("topics/api/indicators/list_of_indicators/zigzag.html")]
public class ZigZag : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
- Inheritance
-
ZigZag
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Constructors
ZigZag()
Initializes a new instance of the ZigZag.
public ZigZag()
Properties
Deviation
Percentage change.
[Display(ResourceType = typeof(LocalizedStrings), Name = "PercentageChange", Description = "PercentageChangeDesc", GroupName = "General")]
[Range(1E-06, 0.999999)]
public decimal Deviation { get; set; }
Property Value
Remarks
It is specified in the range from 0 to 1.
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
Methods
CalcIsFormed()
Calc IsFormed.
protected override bool CalcIsFormed()
Returns
CalcZigZag(IIndicatorValue, decimal)
protected ZigZagIndicatorValue CalcZigZag(IIndicatorValue input, decimal price)
Parameters
inputIIndicatorValuepricedecimal
Returns
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
OnProcess(IIndicatorValue)
To handle the input value.
protected override IIndicatorValue OnProcess(IIndicatorValue input)
Parameters
inputIIndicatorValueThe input value.
Returns
- IIndicatorValue
The resulting value.
Reset()
To reset the indicator status to initial. The method is called each time when initial settings are changed (for example, the length of period).
public override void Reset()
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
ToString()
public override string ToString()