# Standard Error (StdError)

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

Jon Anderson came up with the Standard Error Bands, which are similar to the Bollinger Bands, but with a different calculation. An upper and a lower boundary around a middle line create the bands – this is also known as the linear regression. The lower standard error band results from the subtraction of two standard errors from the final value of the regression line. Because individual closing prices can have a huge influence on the values of the bands, it is necessary to use a Simple Moving Average to smooth the data.

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

One of the applications of the standard error bands is the tightening of the bands when prices rise/fall. If the bands tighten, it signifies that a trend is currently in place. A strong trend will continue to tighten the bands.

#### Further information <a href="#further-information_39" id="further-information_39"></a>

<http://www.forexrealm.com/technical-analysis/technical-indicators/standard-error-bands.html>

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

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

//Upper band
StdError(int period).Upper[int barsAgo]
StdError(IDataSeries inSeries, int period).Upper[int barsAgo]

//Lower band
StdError(int period).Lower[int barsAgo]
StdError(IDataSeries inSeries, int period).Lower[int barsAgo]
```

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

**double**

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

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

inSeries Input data series for the indicator

period Number of bars included in the calculations

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

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

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

```csharp
//Output for the values of the middle line
Print("The middle line is currently at: " + StdError(21)[0]);

//Output for the lower band
Print("The lower band of the standard error is currently at: " + StdError(21).Lower[0]);

//output for the upper band
Print("The upper band of the standard error is currently at: " + StdError(21).Upper[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/standard-error-stderror.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.
