Lean  $LEAN_TAG$
QuantConnect.Indicators.DeMarkerIndicator Class Reference

In the DeMarker strategy, for some period of size N, set: More...

Inheritance diagram for QuantConnect.Indicators.DeMarkerIndicator:
[legend]

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DeMarkerIndicator() [1/2]

QuantConnect.Indicators.DeMarkerIndicator.DeMarkerIndicator ( int  period,
MovingAverageType  type = MovingAverageType.Simple 
)

Initializes a new instance of the DeMarkerIndicator class with the specified period

Parameters
periodThe period of the DeMarker Indicator
typeThe type of moving average to use in calculations

Definition at line 48 of file DeMarkerIndicator.cs.

◆ DeMarkerIndicator() [2/2]

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

Parameters
nameThe name of this indicator
periodThe period of the DeMarker Indicator
typeThe type of moving average to use in calculations

Definition at line 59 of file DeMarkerIndicator.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.DeMarkerIndicator.Reset ( )

Resets this indicator to its initial state

Definition at line 82 of file DeMarkerIndicator.cs.

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.DeMarkerIndicator.ComputeNextValue ( IBaseDataBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 97 of file DeMarkerIndicator.cs.

Member Data Documentation

◆ IsReady

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.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.DeMarkerIndicator.WarmUpPeriod
get

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 77 of file DeMarkerIndicator.cs.


The documentation for this class was generated from the following file: