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<LinearRegressionValue>, IComplexIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
- Inheritance
-
LinearRegression
- Implements
- 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
linearRegLinearRegLinear regression.
rSquaredLinearRegRSquaredRegression R-squared.
regSlopeLinearRegSlopeCoefficient with independent variable, slope of a straight line.
standardErrorStandardErrorStandard error.
Properties
Length
Period length.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Period", Description = "IndicatorPeriod", GroupName = "General")]
public int Length { get; set; }
Property Value
LinearReg
Linear regression.
[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LinearRegression", Description = "LinearRegression", GroupName = "General")]
public LinearReg LinearReg { get; }
Property Value
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
RSquared
Regression R-squared.
[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "RSquared", Description = "RSquared", GroupName = "General")]
public LinearRegRSquared RSquared { get; }
Property Value
StandardError
Standard error.
[TypeConverter(typeof(ExpandableObjectConverter))]
[Display(ResourceType = typeof(LocalizedStrings), Name = "StandardError", Description = "StandardErrorLinearReg", GroupName = "General")]
public StandardError StandardError { get; }
Property Value
Methods
CreateValue(DateTimeOffset)
Create LinearRegressionValue.
protected override LinearRegressionValue CreateValue(DateTimeOffset time)
Parameters
timeDateTimeOffset
Returns
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
ToString()
public override string ToString()