# API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers Quick Search
»

# StdError

### Syntax

```public static StdError Series(WealthLab.DataSeries source, int period)
public StdError(DataSeries source, int period, string description)
public static double Value(int bar, DataSeries source, int period)
```

### Parameter Description

 source The source DataSeries period Indicator calculation period

### Description

Returns the Standard Error of the estimate for a Linear Regression line of the specified Period. Standard Error measures the difference between actual price and the estimated price of the Linear Regression line at every point along the line. The lower the standard error, the closer actual prices have met the estimate. If all the closing prices matched the Linear Regression values for the specified period, then the Standard Error would be zero.

StdError is a statistical indicator. Other indicators in the same class are LinearReg, LinearRegSlope, RSquared, and StdDev.

### Interpretation

• The larger the error the less reliable the trend as the price has greater variance around the Linear Regression line, prices are volatile. This can be caused by the changes in the prevailing trend within the specified number of periods.
• The smaller the error then more reliable the trend as the prices are congregating around the Linear Regression Linear line.
• If RSquared and Standard Error are at extreme levels and then they begin to converge then expect a change in the trend.

### Calculation

Standard Error is a fairly complex statistical calculation. It uses the least square fit method to fit a trendline to the data by minimizing the distance between the price and the Linear Regression trendline. This is used to find an estimated of the next periods price. The Standard Error indicator returns the statistical difference between the estimate and the actual price.

### Example

```using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
// Display the most recent Linear Regression value, and the Standard Error
int bar = Bars.Count-1;
DrawLabel( PricePane, "Linear Reg = " + LinearReg.Value( bar, Close, 30 ) );
DrawLabel( PricePane, "Std Error = " + StdError.Value( bar, Close, 30 ) );
}
}
}```
 Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

ScrewTurn Wiki. Some of the icons created by FamFamFam.