|
Lean
$LEAN_TAG$
|
This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2 More...
Public Member Functions | |
| DoubleExponentialMovingAverage (string name, int period, decimal volumeFactor=1m) | |
| Initializes a new instance of the DoubleExponentialMovingAverage class using the specified name and period. More... | |
| DoubleExponentialMovingAverage (int period, decimal volumeFactor=1m) | |
| Initializes a new instance of the DoubleExponentialMovingAverage class using the specified period. More... | |
| override void | Reset () |
| Resets this indicator to its initial state More... | |
Public Attributes | |
| override bool | IsReady => Samples > 2 * (_period - 1) |
| Gets a flag indicating when this indicator is ready and fully initialized More... | |
| int | WarmUpPeriod => 1 + 2 * (_period - 1) |
| Required period, in data points, for the indicator to be ready and fully initialized. More... | |
Protected Member Functions | |
| override decimal | ComputeNextValue (IndicatorDataPoint input) |
| Computes the next value of this indicator from the given state More... | |
Additional Inherited Members | |
Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider | |
| int | WarmUpPeriod [get] |
| Required period, in data points, for the indicator to be ready and fully initialized. More... | |
This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2
Definition at line 26 of file DoubleExponentialMovingAverage.cs.
| QuantConnect.Indicators.DoubleExponentialMovingAverage.DoubleExponentialMovingAverage | ( | string | name, |
| int | period, | ||
| decimal | volumeFactor = 1m |
||
| ) |
Initializes a new instance of the DoubleExponentialMovingAverage class using the specified name and period.
| name | The name of this indicator |
| period | The period of the DEMA |
| volumeFactor | The volume factor of the DEMA (value must be in the [0,1] range, set to 1 for standard DEMA) |
Definition at line 39 of file DoubleExponentialMovingAverage.cs.
| QuantConnect.Indicators.DoubleExponentialMovingAverage.DoubleExponentialMovingAverage | ( | int | period, |
| decimal | volumeFactor = 1m |
||
| ) |
Initializes a new instance of the DoubleExponentialMovingAverage class using the specified period.
| period | The period of the DEMA |
| volumeFactor | The volume factor of the DEMA (value must be in the [0,1] range, set to 1 for standard DEMA) |
Definition at line 53 of file DoubleExponentialMovingAverage.cs.
|
protected |
Computes the next value of this indicator from the given state
| input | The input given to the indicator |
Definition at line 73 of file DoubleExponentialMovingAverage.cs.
| override void QuantConnect.Indicators.DoubleExponentialMovingAverage.Reset | ( | ) |
Resets this indicator to its initial state
Definition at line 88 of file DoubleExponentialMovingAverage.cs.
| override bool QuantConnect.Indicators.DoubleExponentialMovingAverage.IsReady => Samples > 2 * (_period - 1) |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 61 of file DoubleExponentialMovingAverage.cs.
| int QuantConnect.Indicators.DoubleExponentialMovingAverage.WarmUpPeriod => 1 + 2 * (_period - 1) |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 66 of file DoubleExponentialMovingAverage.cs.