Skip to content

LinearRegressionSlope.Result

property · LinearRegressionSlope · cAlgo.API.Indicators

DesktopCLICloud

The resulting time series of the calculation of the Linear Regression Slope indicator.

Definition

IndicatorDataSeries Result {get;}
linearRegressionSlope.Result: IndicatorDataSeries

Returns IndicatorDataSeries

Examples

var linearRegressionSlope = Indicators.LinearRegressionSlope(Bars.ClosePrices, 14);
var slope = linearRegressionSlope.Result.Last(1);
Print("The trend is {0}, slope: {1}", slope > 0 ? "rising" : "falling", slope);
linearRegressionSlope = api.Indicators.LinearRegressionSlope(api.Bars.ClosePrices, 14)
slope = linearRegressionSlope.Result.Last(1)
api.Print(f"The trend is {'rising' if slope > 0 else 'falling'}, slope: {slope}")