# LinRegSlope

#### Description <a href="#description_51" id="description_51"></a>

The Linear Regression Slope outputs the slope of the linear regression line, and is a measurement of the regression line’s “elevation”.

See [*Linear Regression*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#linearregression), [*R-Squared*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#r-squared), [*LinRegIntercept*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#linregintercept).

#### Interpretation <a href="#interpretation_25" id="interpretation_25"></a>

Simply put: in an uptrend, the elevation is positive and facing upwards. The opposite applies to downtrends. This indicator is not very useful for determining overbought or oversold areas, but can be used to measure the strength of a trend. It should be used in combination with other indicators to identify potential entries.

#### Usage <a href="#usage_52" id="usage_52"></a>

```csharp
LinRegSlope(int period)
LinRegSlope(IDataSeries inSeries, int period)
LinRegSlope(int period)[int barsAgo]
LinRegSlope(IDataSeries inSeries, int period)[int barsAgo]
```

#### Return value <a href="#return-value_51" id="return-value_51"></a>

**double**

When using this method with an index (e.g. **LinRegSlope**(14)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_46" id="parameters_46"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

#### Visualization <a href="#visualization_47" id="visualization_47"></a>

![LinRegSlope](https://agenatrader.github.io/AgenaIndicator-documentation/media/LinRegSlope.jpg)

#### Example <a href="#example_50" id="example_50"></a>

```csharp
//Current value for the slope:
Print("The current value for the inclination of the linear regression line is: " + LinRegSlope(14)[0]);
```
