Lean  $LEAN_TAG$
QuantConnect.Indicators.PythonIndicator Class Reference

Provides a wrapper for IndicatorBase<IBaseData> implementations written in python More...

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

Public Member Functions

 PythonIndicator ()
 Initializes a new instance of the PythonIndicator class using the specified name. More...
 
 PythonIndicator (params PyObject[] args)
 Initializes a new instance of the PythonIndicator class using the specified name. More...
 
 PythonIndicator (PyObject indicator)
 Initializes a new instance of the PythonIndicator class using the specified name. More...
 
void SetIndicator (PyObject indicator)
 Sets the python implementation of the indicator More...
 

Public Attributes

override bool IsReady => _isReady
 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...
 

Properties

int WarmUpPeriod [get, protected set]
 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

Provides a wrapper for IndicatorBase<IBaseData> implementations written in python

Definition at line 26 of file PythonIndicator.cs.

Constructor & Destructor Documentation

◆ PythonIndicator() [1/3]

QuantConnect.Indicators.PythonIndicator.PythonIndicator ( )

Initializes a new instance of the PythonIndicator class using the specified name.

This overload allows inheritance for python classes with no arguments

Definition at line 35 of file PythonIndicator.cs.

◆ PythonIndicator() [2/3]

QuantConnect.Indicators.PythonIndicator.PythonIndicator ( params PyObject[]  args)

Initializes a new instance of the PythonIndicator class using the specified name.

This overload allows inheritance for python classes with multiple arguments

Definition at line 44 of file PythonIndicator.cs.

◆ PythonIndicator() [3/3]

QuantConnect.Indicators.PythonIndicator.PythonIndicator ( PyObject  indicator)

Initializes a new instance of the PythonIndicator class using the specified name.

Parameters
indicatorThe python implementation of IndicatorBase<IBaseDataBar>

Definition at line 53 of file PythonIndicator.cs.

Here is the call graph for this function:

Member Function Documentation

◆ SetIndicator()

void QuantConnect.Indicators.PythonIndicator.SetIndicator ( PyObject  indicator)

Sets the python implementation of the indicator

Parameters
indicatorThe python implementation of IndicatorBase<IBaseDataBar>

Definition at line 63 of file PythonIndicator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.PythonIndicator.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 103 of file PythonIndicator.cs.

Here is the call graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.PythonIndicator.IsReady => _isReady

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

Definition at line 91 of file PythonIndicator.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.PythonIndicator.WarmUpPeriod
getprotected set

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

Definition at line 96 of file PythonIndicator.cs.


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