Lean  $LEAN_TAG$
QuantConnect.Indicators.Trix Class Reference

This indicator computes the TRIX (1-period ROC of a Triple EMA) The TRIX is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:trix More...

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

Public Member Functions

 Trix (string name, int period)
 Initializes a new instance of the Trix class using the specified name and period. More...
 
 Trix (int period)
 Initializes a new instance of the Trix class using the specified period. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _roc.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => 3 * (_period - 1) + _roc.WarmUpPeriod
 Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up. More...
 

Protected Member Functions

override decimal ComputeNextValue (IndicatorDataPoint input)
 Computes the next value of this indicator from the given state More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.Indicator
 Indicator (string name)
 Initializes a new instance of the Indicator class using the specified name. More...
 

Additional Inherited Members

- Properties inherited from QuantConnect.Indicators.Indicator
static int DefaultWindowSize = 2 [get]
 The default size of the history window for the indicator 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

This indicator computes the TRIX (1-period ROC of a Triple EMA) The TRIX is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:trix

Definition at line 23 of file Trix.cs.

Constructor & Destructor Documentation

◆ Trix() [1/2]

QuantConnect.Indicators.Trix.Trix ( string  name,
int  period 
)

Initializes a new instance of the Trix class using the specified name and period.

Parameters
nameThe name of this indicator
periodThe period of the indicator

Definition at line 36 of file Trix.cs.

◆ Trix() [2/2]

QuantConnect.Indicators.Trix.Trix ( int  period)

Initializes a new instance of the Trix class using the specified period.

Parameters
periodThe period of the indicator

Definition at line 50 of file Trix.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.Trix.ComputeNextValue ( IndicatorDataPoint  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 73 of file Trix.cs.

◆ Reset()

override void QuantConnect.Indicators.Trix.Reset ( )

Resets this indicator to its initial state

Definition at line 92 of file Trix.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.Trix.IsReady => _roc.IsReady

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

Definition at line 58 of file Trix.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.Trix.WarmUpPeriod => 3 * (_period - 1) + _roc.WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up.

Definition at line 66 of file Trix.cs.


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