Class ZigZag
ZigZag.
Inherited Members
Namespace: StockSharp.Algo.Indicators
Assembly: StockSharp.Algo.dll
Syntax
[DescriptionLoc("Str826", false)]
[IndicatorIn]
public class ZigZag : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
Remarks
ZigZag traces and combines extreme points of the chart, distanced for not less than specified percentage by the price scale.
Constructors
ZigZag()
Initializes a new instance of the ZigZag.
Declaration
public ZigZag()
Properties
BackStep
Minimum number of bars between local maximums, minimums.
Declaration
[DisplayNameLoc("Str827")]
[DescriptionLoc("Str828", false)]
[CategoryLoc("General")]
public int BackStep { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
CurrentValue
The indicator current value.
Declaration
public Decimal CurrentValue { get; }
Property Value
Type | Description |
---|---|
Decimal |
CurrentValueFunc
The converter, returning from the candle a price for the current value.
Declaration
public Func<Candle, Decimal> CurrentValueFunc { get; set; }
Property Value
Type | Description |
---|---|
Func<Candle, Decimal> |
Depth
Bars minimum, on which Zigzag will not build a second maximum (or minimum), if it is smaller (or larger) by a deviation of the previous respectively.
Declaration
[DisplayNameLoc("Str829")]
[DescriptionLoc("Str830", false)]
[CategoryLoc("General")]
public int Depth { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Deviation
Minimum number of points between maximums (minimums) of two adjacent bars used by Zigzag indicator to form a local peak (local trough).
Declaration
[DisplayNameLoc("Str831")]
[DescriptionLoc("Str832", false)]
[CategoryLoc("General")]
public Unit Deviation { get; set; }
Property Value
Type | Description |
---|---|
Unit |
HighValueFunc
The converter, returning from the candle a price for search of maximum.
Declaration
public Func<Candle, Decimal> HighValueFunc { get; set; }
Property Value
Type | Description |
---|---|
Func<Candle, Decimal> |
LastValueShift
Shift for the last indicator value.
Declaration
public int LastValueShift { get; }
Property Value
Type | Description |
---|---|
Int32 |
LowValueFunc
The converter, returning from the candle a price for search of minimum.
Declaration
public Func<Candle, Decimal> LowValueFunc { get; set; }
Property Value
Type | Description |
---|---|
Func<Candle, Decimal> |
Methods
Load(SettingsStorage)
Load settings.
Declaration
public override void Load(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Settings storage. |
Overrides
OnProcess(IIndicatorValue)
To handle the input value.
Declaration
protected override IIndicatorValue OnProcess(IIndicatorValue input)
Parameters
Type | Name | Description |
---|---|---|
IIndicatorValue | input | The input value. |
Returns
Type | Description |
---|---|
IIndicatorValue | The resulting value. |
Overrides
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).
Declaration
public override void Reset()
Overrides
Save(SettingsStorage)
Save settings.
Declaration
public override void Save(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Settings storage. |