Table of Contents

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")]
public decimal Deviation { get; set; }

Property Value

decimal

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

int

Methods

CalcIsFormed()

Calc IsFormed.

protected override bool CalcIsFormed()

Returns

bool

IsFormed

CalcZigZag(IIndicatorValue, decimal)

protected ZigZagIndicatorValue CalcZigZag(IIndicatorValue input, decimal price)

Parameters

input IIndicatorValue
price decimal

Returns

ZigZagIndicatorValue

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.

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

storage SettingsStorage

Settings storage.