Lean  $LEAN_TAG$
QuantConnect.Indicators.ConstantIndicator< T > Class Template Reference

An indicator that will always return the same value. More...

Inheritance diagram for QuantConnect.Indicators.ConstantIndicator< T >:
[legend]

Public Member Functions

 ConstantIndicator (string name, decimal value)
 Creates a new ConstantIndicator that will always return the specified value More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => true
 Gets true since the ConstantIndicator is always ready to return the same value More...
 

Protected Member Functions

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

Detailed Description

An indicator that will always return the same value.

Template Parameters
TThe type of input this indicator takes
Type Constraints
T :IBaseData 

Definition at line 25 of file ConstantIndicator.cs.

Constructor & Destructor Documentation

◆ ConstantIndicator()

QuantConnect.Indicators.ConstantIndicator< T >.ConstantIndicator ( string  name,
decimal  value 
)

Creates a new ConstantIndicator that will always return the specified value

Parameters
nameThe name of this indicator
valueThe constant value to be returned

Definition at line 40 of file ConstantIndicator.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.ConstantIndicator< T >.ComputeNextValue ( 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 55 of file ConstantIndicator.cs.

◆ Reset()

override void QuantConnect.Indicators.ConstantIndicator< T >.Reset ( )

Resets this indicator to its initial state

Definition at line 63 of file ConstantIndicator.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.ConstantIndicator< T >.IsReady => true

Gets true since the ConstantIndicator is always ready to return the same value

Definition at line 33 of file ConstantIndicator.cs.


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