The ZigZag indicator identifies significant turning points in price movements, filtering out noise using a sensitivity threshold and a minimum trend length. It alternates between high and low pivots to determine market trends.
More...
|
| ZigZag (string name, decimal sensitivity=0.05m, int minTrendLength=1) |
| Initializes a new instance of the ZigZag class with the specified parameters. More...
|
|
| ZigZag (decimal sensitivity=0.05m, int minTrendLength=1) |
| Initializes a new instance of the ZigZag class using default parameters. More...
|
|
override void | Reset () |
| Resets this indicator to its initial state More...
|
|
|
override bool | IsReady => Samples > _minTrendLength |
| Indicates whether the indicator has enough data to produce meaningful output. The indicator is considered "ready" when the number of samples exceeds the minimum trend length. More...
|
|
int | WarmUpPeriod => _minTrendLength + 1 |
| Gets the number of periods required for the indicator to warm up. This is equal to the minimum trend length plus one additional bar for initialization. More...
|
|
|
override decimal | ComputeNextValue (IBaseDataBar input) |
| Computes the next value of the ZigZag indicator based on the input bar. Determines whether the input bar forms a new pivot or updates the current trend. More...
|
|
| BarIndicator (string name) |
| Creates a new TradeBarIndicator with the specified name More...
|
|
The ZigZag indicator identifies significant turning points in price movements, filtering out noise using a sensitivity threshold and a minimum trend length. It alternates between high and low pivots to determine market trends.
Definition at line 27 of file ZigZag.cs.
◆ ZigZag() [1/2]
QuantConnect.Indicators.ZigZag.ZigZag |
( |
string |
name, |
|
|
decimal |
sensitivity = 0.05m , |
|
|
int |
minTrendLength = 1 |
|
) |
| |
Initializes a new instance of the ZigZag class with the specified parameters.
- Parameters
-
name | The name of the indicator. |
sensitivity | The sensitivity threshold as a decimal value between 0 and 1. |
minTrendLength | The minimum number of bars required to form a valid trend. |
Definition at line 84 of file ZigZag.cs.
◆ ZigZag() [2/2]
QuantConnect.Indicators.ZigZag.ZigZag |
( |
decimal |
sensitivity = 0.05m , |
|
|
int |
minTrendLength = 1 |
|
) |
| |
Initializes a new instance of the ZigZag class using default parameters.
- Parameters
-
sensitivity | The sensitivity threshold as a decimal value between 0 and 1. |
minTrendLength | The minimum number of bars required to form a valid trend. |
Definition at line 107 of file ZigZag.cs.
◆ ComputeNextValue()
override decimal QuantConnect.Indicators.ZigZag.ComputeNextValue |
( |
IBaseDataBar |
input | ) |
|
|
protected |
Computes the next value of the ZigZag indicator based on the input bar. Determines whether the input bar forms a new pivot or updates the current trend.
- Parameters
-
input | The current bar of market data used for the calculation. |
- Returns
- The value of the most recent pivot, either a high or low, depending on the current trend.
Definition at line 132 of file ZigZag.cs.
◆ Reset()
override void QuantConnect.Indicators.ZigZag.Reset |
( |
| ) |
|
Resets this indicator to its initial state
Definition at line 199 of file ZigZag.cs.
◆ IsReady
override bool QuantConnect.Indicators.ZigZag.IsReady => Samples > _minTrendLength |
Indicates whether the indicator has enough data to produce meaningful output. The indicator is considered "ready" when the number of samples exceeds the minimum trend length.
Definition at line 116 of file ZigZag.cs.
◆ WarmUpPeriod
int QuantConnect.Indicators.ZigZag.WarmUpPeriod => _minTrendLength + 1 |
Gets the number of periods required for the indicator to warm up. This is equal to the minimum trend length plus one additional bar for initialization.
Definition at line 122 of file ZigZag.cs.
◆ HighPivot
Stores the most recent high pivot value in the ZigZag calculation. Updated whenever a valid high pivot is identified.
Definition at line 64 of file ZigZag.cs.
◆ LowPivot
Stores the most recent low pivot value in the ZigZag calculation. Updated whenever a valid low pivot is identified.
Definition at line 70 of file ZigZag.cs.
◆ PivotType
Represents the current type of pivot (High or Low) in the ZigZag calculation. The value is updated based on the most recent pivot identified:
Definition at line 76 of file ZigZag.cs.
The documentation for this class was generated from the following file: