LinearRegressionForecast


Summary

Linear Regression Forecast is a trend indicator used to forecast values using the Least Squares Fit method.

Syntax

public LinearRegressionForecast LinearRegressionForecast(DataSeries source, int periods)

Parameters

NameDescription

Example 1

private LinearRegressionForecast lrForecast;
protected override void OnStart()
{
    lrForecast = Indicators.LinearRegressionForecast(Source, Period);
}
protected override void OnTick()
{
    Print("LRF Last Value = {0}", lrForecast.Result.LastValue);
}