# 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]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/linregslope.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
