LinearRegressionSlope


Summary

The Linear Regression Slope indicator is intended to measure the direction and strength of a trend.

Syntax

public LinearRegressionSlope LinearRegressionSlope(DataSeries source, int periods)

Parameters

NameDescription

Example 1

private LinearRegressionSlope slope;
protected override void Initialize()
{
    slope = Indicators.LinearRegressionSlope(MarketSeries.Close, 14);
}
public override void Calculate(int index)
{
    double currentSlope = slope.Result[index];
}