LinearRegression
StockSharp.Algo.Indicators
The full class of linear regression, calculates LinearReg, LinearRegSlope, RSquared and StandardError at the same time.
Inherits: BaseComplexIndicator<ILinearRegressionValue>
Constructors
LinearRegression
public LinearRegression()
linearRegression = LinearRegression()
Initializes a new instance of the LinearRegression.
LinearRegression
public LinearRegression(LinearReg linearReg, LinearRegRSquared rSquared, LinearRegSlope regSlope, StandardError standardError)
linearRegression = LinearRegression(linearReg, rSquared, regSlope, standardError)
Initializes a new instance of the LinearRegression.
- linearReg
- Linear regression.
- rSquared
- Regression R-squared.
- regSlope
- Coefficient with independent variable, slope of a straight line.
- standardError
- Standard error.
Properties
Length
public int Length { get; set; }
value = linearRegression.Length
linearRegression.Length = value
Period length.
LinearRegSlope
public LinearRegSlope LinearRegSlope { get; }
value = linearRegression.LinearRegSlope
Coefficient with independent variable, slope of a straight line.
RSquared
public LinearRegRSquared RSquared { get; }
value = linearRegression.RSquared
Regression R-squared.
StandardError
public StandardError StandardError { get; }
value = linearRegression.StandardError
Standard error.
Methods
CreateValue
protected override ILinearRegressionValue CreateValue(DateTime time)
result = linearRegression.CreateValue(time)
Create .
- time
- Time
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = linearRegression.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = linearRegression.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
ToString
public override string ToString()
result = linearRegression.ToString()
Returns a string representation of the tuple, with values separated by commas.
Returns: A string representing the tuple's values.