Table of Contents

Class LinearRegression

Namespace
StockSharp.Algo.Indicators
Assembly
StockSharp.Algo.dll

The full class of linear regression, calculates LinearReg, LinearRegSlope, RSquared and StandardError at the same time.

[Display(ResourceType = typeof(LocalizedStrings), Name = "LinearRegression", Description = "LinearRegressionDesc")]
[Browsable(false)]
public class LinearRegression : BaseComplexIndicator, IComplexIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
Inheritance
LinearRegression
Implements
IPersistable
ICloneable<IIndicator>
Inherited Members
Extension Methods

Constructors

LinearRegression()

Initializes a new instance of the LinearRegression.

public LinearRegression()

LinearRegression(LinearReg, LinearRegRSquared, LinearRegSlope, StandardError)

Initializes a new instance of the LinearRegression.

public LinearRegression(LinearReg linearReg, LinearRegRSquared rSquared, LinearRegSlope regSlope, StandardError standardError)

Parameters

linearReg LinearReg

Linear regression.

rSquared LinearRegRSquared

Regression R-squared.

regSlope LinearRegSlope

Coefficient with independent variable, slope of a straight line.

standardError StandardError

Standard error.

Properties

Length

Period length.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Period", Description = "IndicatorPeriod", GroupName = "General")]
public int Length { get; set; }

Property Value

int

LinearReg

Linear regression.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LinearRegression", Description = "LinearRegression", GroupName = "General")]
public LinearReg LinearReg { get; }

Property Value

LinearReg

LinearRegSlope

Coefficient with independent variable, slope of a straight line.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LRS", Description = "LinearRegSlope", GroupName = "General")]
public LinearRegSlope LinearRegSlope { get; }

Property Value

LinearRegSlope

RSquared

Regression R-squared.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "RSquared", Description = "RSquared", GroupName = "General")]
public LinearRegRSquared RSquared { get; }

Property Value

LinearRegRSquared

StandardError

Standard error.

[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "StandardError", Description = "StandardErrorLinearReg", GroupName = "General")]
public StandardError StandardError { get; }

Property Value

StandardError

Methods

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

ToString()

public override string ToString()

Returns

string