Lean  $LEAN_TAG$
QuantConnect.Indicators.FilteredIdentity Class Reference

Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition More...

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

Public Member Functions

 FilteredIdentity (string name, Func< IBaseData, bool > filter)
 Initializes a new instance of the FilteredIdentity indicator with the specified name More...
 

Public Attributes

override bool IsReady => Samples > 0 && Current.Value > 0
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IBaseData input)
 Computes the next value of this indicator from the given state More...
 

Detailed Description

Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition

Definition at line 26 of file FilteredIdentity.cs.

Constructor & Destructor Documentation

◆ FilteredIdentity()

QuantConnect.Indicators.FilteredIdentity.FilteredIdentity ( string  name,
Func< IBaseData, bool >  filter 
)

Initializes a new instance of the FilteredIdentity indicator with the specified name

Parameters
nameThe name of the indicator
filterFilters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter

Definition at line 36 of file FilteredIdentity.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.FilteredIdentity.ComputeNextValue ( IBaseData  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 53 of file FilteredIdentity.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.FilteredIdentity.IsReady => Samples > 0 && Current.Value > 0

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 46 of file FilteredIdentity.cs.


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