Skip to content

LinearRegressionRSquared.Result

property · LinearRegressionRSquared · cAlgo.API.Indicators

DesktopCLICloud

The Result Series of the Linear Regression R Squared indicator.

Definition

IndicatorDataSeries Result {get;}
linearRegressionRSquared.Result: IndicatorDataSeries

Returns IndicatorDataSeries

Examples

private LinearRegressionRSquared rSquared;

protected override void OnStart()
{
    // initialize rSquared indicator
    rSquared = Indicators.LinearRegressionRSquared(Bars.ClosePrices, 9);
}
protected override void OnTick()
{
    // Print the last value of rSquared indicator to the log
    Print("The current value of R Squared is {0}", rSquared.Result.LastValue);
}
def on_start(self):
    # initialize rSquared indicator
    self.rSquared = api.Indicators.LinearRegressionRSquared(api.Bars.ClosePrices, 9)

def on_tick(self):
    # Print the last value of rSquared indicator to the log
    api.Print(f"The current value of R Squared is {self.rSquared.Result.LastValue}")