Lean
$LEAN_TAG$
|
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...
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< IndicatorDataPoint > | Intercept => LinearRegression.Intercept |
The point where the regression line crosses the y-axis (price-axis) More... | |
IndicatorBase< IndicatorDataPoint > | Slope => 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< IndicatorDataPoint > | UpperChannel [get] |
Gets the upper channel (linear regression + k * stdDev) More... | |
IndicatorBase< IndicatorDataPoint > | LowerChannel [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... | |
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.
QuantConnect.Indicators.RegressionChannel.RegressionChannel | ( | string | name, |
int | period, | ||
decimal | k | ||
) |
Initializes a new instance of the RegressionChannel class.
name | The name of this indicator |
period | The number of data points to hold in the window |
k | The 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.
QuantConnect.Indicators.RegressionChannel.RegressionChannel | ( | int | period, |
decimal | k | ||
) |
Initializes a new instance of the LeastSquaresMovingAverage class.
period | The number of data points to hold in the window. |
k | The 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.
|
protected |
Computes the next value of this indicator from the given state
input | The input given to the indicator |
Definition at line 99 of file RegressionChannel.cs.
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.
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.
IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.RegressionChannel.Slope => LinearRegression.Slope |
The regression line slope
Definition at line 54 of file RegressionChannel.cs.
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.
|
get |
Gets the linear regression
Definition at line 34 of file RegressionChannel.cs.
|
get |
Gets the upper channel (linear regression + k * stdDev)
Definition at line 39 of file RegressionChannel.cs.
|
get |
Gets the lower channel (linear regression - k * stdDev)
Definition at line 44 of file RegressionChannel.cs.
|
get |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 64 of file RegressionChannel.cs.