Lean  $LEAN_TAG$
QuantConnect.Indicators.RegressionChannel Class Reference

The Regression Channel indicator extends the LeastSquaresMovingAverage with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations. Reference: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html More...

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

Public Member Functions

 RegressionChannel (string name, int period, decimal k)
 Initializes a new instance of the RegressionChannel class. More...
 
 RegressionChannel (int period, decimal k)
 Initializes a new instance of the LeastSquaresMovingAverage class. More...
 
override void Reset ()
 Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand) More...
 

Public Attributes

IndicatorBase< IndicatorDataPointIntercept => LinearRegression.Intercept
 The point where the regression line crosses the y-axis (price-axis) More...
 
IndicatorBase< IndicatorDataPointSlope => LinearRegression.Slope
 The regression line slope More...
 
override bool IsReady => _standardDeviation.IsReady && LinearRegression.IsReady && UpperChannel.IsReady && LowerChannel.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized 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...
 

Properties

LeastSquaresMovingAverage LinearRegression [get]
 Gets the linear regression More...
 
IndicatorBase< IndicatorDataPointUpperChannel [get]
 Gets the upper channel (linear regression + k * stdDev) More...
 
IndicatorBase< IndicatorDataPointLowerChannel [get]
 Gets the lower channel (linear regression - k * stdDev) More...
 
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- 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

The Regression Channel indicator extends the LeastSquaresMovingAverage with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations. Reference: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html

Definition at line 24 of file RegressionChannel.cs.

Constructor & Destructor Documentation

◆ RegressionChannel() [1/2]

QuantConnect.Indicators.RegressionChannel.RegressionChannel ( string  name,
int  period,
decimal  k 
)

Initializes a new instance of the RegressionChannel class.

Parameters
nameThe name of this indicator
periodThe number of data points to hold in the window
kThe number of standard deviations specifying the distance between the linear regression and upper or lower channel lines

Definition at line 72 of file RegressionChannel.cs.

◆ RegressionChannel() [2/2]

QuantConnect.Indicators.RegressionChannel.RegressionChannel ( int  period,
decimal  k 
)

Initializes a new instance of the LeastSquaresMovingAverage class.

Parameters
periodThe number of data points to hold in the window.
kThe number of standard deviations specifying the distance between the linear regression and upper or lower channel lines

Definition at line 87 of file RegressionChannel.cs.

Member Function Documentation

◆ ComputeNextValue()

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

◆ Reset()

override void QuantConnect.Indicators.RegressionChannel.Reset ( )

Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand)

Definition at line 110 of file RegressionChannel.cs.

Here is the call graph for this function:

Member Data Documentation

◆ Intercept

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.RegressionChannel.Intercept => LinearRegression.Intercept

The point where the regression line crosses the y-axis (price-axis)

Definition at line 49 of file RegressionChannel.cs.

◆ Slope

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.RegressionChannel.Slope => LinearRegression.Slope

The regression line slope

Definition at line 54 of file RegressionChannel.cs.

◆ IsReady

override bool QuantConnect.Indicators.RegressionChannel.IsReady => _standardDeviation.IsReady && LinearRegression.IsReady && UpperChannel.IsReady && LowerChannel.IsReady

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

Definition at line 59 of file RegressionChannel.cs.

Property Documentation

◆ LinearRegression

LeastSquaresMovingAverage QuantConnect.Indicators.RegressionChannel.LinearRegression
get

Gets the linear regression

Definition at line 34 of file RegressionChannel.cs.

◆ UpperChannel

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.RegressionChannel.UpperChannel
get

Gets the upper channel (linear regression + k * stdDev)

Definition at line 39 of file RegressionChannel.cs.

◆ LowerChannel

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.RegressionChannel.LowerChannel
get

Gets the lower channel (linear regression - k * stdDev)

Definition at line 44 of file RegressionChannel.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.RegressionChannel.WarmUpPeriod
get

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

Definition at line 64 of file RegressionChannel.cs.


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