Lean
$LEAN_TAG$
|
In the DeMarker strategy, for some period of size N, set: More...
Public Member Functions | |
DeMarkerIndicator (int period, MovingAverageType type=MovingAverageType.Simple) | |
Initializes a new instance of the DeMarkerIndicator class with the specified period More... | |
DeMarkerIndicator (string name, int period, MovingAverageType type=MovingAverageType.Simple) | |
Initializes a new instance of the DeMarkerIndicator class with the specified name and period More... | |
override void | Reset () |
Resets this indicator to its initial state More... | |
Public Attributes | |
override bool | IsReady => _maxMA.IsReady && _minMA.IsReady |
Gets a flag indicating when this indicator is ready and fully initialized More... | |
Protected Member Functions | |
override decimal | ComputeNextValue (IBaseDataBar input) |
Computes the next value of this indicator from the given state More... | |
Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator | |
BarIndicator (string name) | |
Creates a new TradeBarIndicator with the specified name More... | |
Properties | |
int | WarmUpPeriod [get] |
Required period, in data points, for the indicator to be ready and fully initialized. More... | |
Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider | |
int | WarmUpPeriod [get] |
Required period, in data points, for the indicator to be ready and fully initialized. More... | |
In the DeMarker strategy, for some period of size N, set:
DeMax = High - Previous High, and DeMin = Previous Low - Low
where, in the prior, if either term is less than zero (DeMax or DeMin), set it to zero. We can now define the indicator itself, DEM, as: para> DEM = MA(DeMax)/(MA(DeMax)+MA(DeMin)) /para> where MA denotes a Moving Average of period N.
https://www.investopedia.com/terms/d/demarkerindicator.asp
Definition at line 36 of file DeMarkerIndicator.cs.
QuantConnect.Indicators.DeMarkerIndicator.DeMarkerIndicator | ( | int | period, |
MovingAverageType | type = MovingAverageType.Simple |
||
) |
Initializes a new instance of the DeMarkerIndicator class with the specified period
period | The period of the DeMarker Indicator |
type | The type of moving average to use in calculations |
Definition at line 48 of file DeMarkerIndicator.cs.
QuantConnect.Indicators.DeMarkerIndicator.DeMarkerIndicator | ( | string | name, |
int | period, | ||
MovingAverageType | type = MovingAverageType.Simple |
||
) |
Initializes a new instance of the DeMarkerIndicator class with the specified name and period
name | The name of this indicator |
period | The period of the DeMarker Indicator |
type | The type of moving average to use in calculations |
Definition at line 59 of file DeMarkerIndicator.cs.
override void QuantConnect.Indicators.DeMarkerIndicator.Reset | ( | ) |
Resets this indicator to its initial state
Definition at line 82 of file DeMarkerIndicator.cs.
|
protected |
Computes the next value of this indicator from the given state
input | The input given to the indicator |
Definition at line 97 of file DeMarkerIndicator.cs.
override bool QuantConnect.Indicators.DeMarkerIndicator.IsReady => _maxMA.IsReady && _minMA.IsReady |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 72 of file DeMarkerIndicator.cs.
|
get |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 77 of file DeMarkerIndicator.cs.