Table of Contents

Class RegressionChannel

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

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

public class RegressionChannel : Indicator, IIndicator, IUpdatable
Inheritance
RegressionChannel
Implements
Inherited Members
Extension Methods

Constructors

RegressionChannel(int, double)

Initializes a new instance of the LeastSquaresMovingAverage class.

public RegressionChannel(int period, double k)

Parameters

period int

The number of data points to hold in the window.

k double

The number of standard deviations specifying the distance between the linear regression and upper or lower channel lines

RegressionChannel(string, int, double)

Initializes a new instance of the RegressionChannel class.

public RegressionChannel(string name, int period, double k)

Parameters

name string

The name of this indicator

period int

The number of data points to hold in the window

k double

The number of standard deviations specifying the distance between the linear regression and upper or lower channel lines

Properties

Intercept

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

public IndicatorBase Intercept { get; }

Property Value

IndicatorBase

IsReady

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

public override bool IsReady { get; }

Property Value

bool

LinearRegression

Gets the linear regression

public LeastSquaresMovingAverage LinearRegression { get; }

Property Value

LeastSquaresMovingAverage

LowerChannel

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

public IndicatorBase LowerChannel { get; }

Property Value

IndicatorBase

Slope

The regression line slope

public IndicatorBase Slope { get; }

Property Value

IndicatorBase

UpperChannel

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

public IndicatorBase UpperChannel { get; }

Property Value

IndicatorBase

WarmUpPeriod

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

public override int WarmUpPeriod { get; }

Property Value

int

Methods

Forward(long, DoubleArray)

Computes the next value of this indicator from the given state

protected override DoubleArray Forward(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The input given to the indicator

Returns

DoubleArray

A new value for this indicator

Reset()

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

public override void Reset()