Represents the traditional exponential moving average indicator (EMA). When the indicator is ready, the first value of the EMA is equivalent to the simple moving average. After the first EMA value, the EMA value is a function of the previous EMA value. Therefore, depending on the number of samples you feed into the indicator, it can provide different EMA values for a single security and lookback period. To make the indicator values consistent across time, warm up the indicator with all the trailing security price history.
More...
|
| ExponentialMovingAverage (string name, int period) |
| Initializes a new instance of the ExponentialMovingAverage class with the specified name and period More...
|
|
| ExponentialMovingAverage (string name, int period, decimal smoothingFactor) |
| Initializes a new instance of the ExponentialMovingAverage class with the specified name and period More...
|
|
| ExponentialMovingAverage (int period) |
| Initializes a new instance of the ExponentialMovingAverage class with the default name and period More...
|
|
| ExponentialMovingAverage (int period, decimal smoothingFactor) |
| Initializes a new instance of the ExponentialMovingAverage class with the default name and period More...
|
|
override void | Reset () |
| Resets this indicator to its initial state More...
|
|
|
int | WarmUpPeriod => _period |
| Required period, in data points, for the indicator to be ready and fully initialized. More...
|
|
override bool | IsReady => Samples >= _period |
| Gets a flag indicating when this indicator is ready and fully initialized More...
|
|
|
static int | DefaultWindowSize = 2 [get] |
| The default size of the history window for the indicator More...
|
|
int | WarmUpPeriod [get] |
| Required period, in data points, for the indicator to be ready and fully initialized. More...
|
|
Represents the traditional exponential moving average indicator (EMA). When the indicator is ready, the first value of the EMA is equivalent to the simple moving average. After the first EMA value, the EMA value is a function of the previous EMA value. Therefore, depending on the number of samples you feed into the indicator, it can provide different EMA values for a single security and lookback period. To make the indicator values consistent across time, warm up the indicator with all the trailing security price history.
Definition at line 27 of file ExponentialMovingAverage.cs.
◆ ExponentialMovingAverage() [1/4]
QuantConnect.Indicators.ExponentialMovingAverage.ExponentialMovingAverage |
( |
string |
name, |
|
|
int |
period |
|
) |
| |
Initializes a new instance of the ExponentialMovingAverage class with the specified name and period
- Parameters
-
name | The name of this indicator |
period | The period of the EMA |
Definition at line 44 of file ExponentialMovingAverage.cs.
◆ ExponentialMovingAverage() [2/4]
QuantConnect.Indicators.ExponentialMovingAverage.ExponentialMovingAverage |
( |
string |
name, |
|
|
int |
period, |
|
|
decimal |
smoothingFactor |
|
) |
| |
Initializes a new instance of the ExponentialMovingAverage class with the specified name and period
- Parameters
-
name | The name of this indicator |
period | The period of the EMA |
smoothingFactor | The percentage of data from the previous value to be carried into the next value |
Definition at line 55 of file ExponentialMovingAverage.cs.
◆ ExponentialMovingAverage() [3/4]
QuantConnect.Indicators.ExponentialMovingAverage.ExponentialMovingAverage |
( |
int |
period | ) |
|
Initializes a new instance of the ExponentialMovingAverage class with the default name and period
- Parameters
-
period | The period of the EMA |
Definition at line 67 of file ExponentialMovingAverage.cs.
◆ ExponentialMovingAverage() [4/4]
QuantConnect.Indicators.ExponentialMovingAverage.ExponentialMovingAverage |
( |
int |
period, |
|
|
decimal |
smoothingFactor |
|
) |
| |
Initializes a new instance of the ExponentialMovingAverage class with the default name and period
- Parameters
-
period | The period of the EMA |
smoothingFactor | The percentage of data from the previous value to be carried into the next value |
Definition at line 77 of file ExponentialMovingAverage.cs.
◆ SmoothingFactorDefault()
static decimal QuantConnect.Indicators.ExponentialMovingAverage.SmoothingFactorDefault |
( |
int |
period | ) |
|
|
static |
Calculates the default smoothing factor for an ExponentialMovingAverage indicator
- Parameters
-
period | The period of the EMA |
- Returns
- The default smoothing factor
◆ Reset()
override void QuantConnect.Indicators.ExponentialMovingAverage.Reset |
( |
| ) |
|
◆ ComputeNextValue()
override decimal QuantConnect.Indicators.ExponentialMovingAverage.ComputeNextValue |
( |
IndicatorDataPoint |
input | ) |
|
|
protected |
Computes the next value of this indicator from the given state
- Parameters
-
input | The input given to the indicator |
- Returns
- A new value for this indicator
Definition at line 108 of file ExponentialMovingAverage.cs.
◆ WarmUpPeriod
int QuantConnect.Indicators.ExponentialMovingAverage.WarmUpPeriod => _period |
◆ IsReady
override bool QuantConnect.Indicators.ExponentialMovingAverage.IsReady => Samples >= _period |
The documentation for this class was generated from the following file: