What is Standard Error?
The Standard Error indicator fits a straight line through the last Length closes and measures how far those closes typically sit from that line. It plots the result in its own pane, in price units. A steady, even trend has almost no scatter around its line and reads low; a jerky, back-and-forth market reads high.
Standard Error measures how well price fits a straight line. It does not tell you the direction of that line, how steep it is, or whether the trend will continue.
How to use Standard Error
- Low reading. Price is tracking a straight line closely. That can be a quiet sideways market or a clean, steady trend, so look at the chart to tell which.
- High reading. Price is scattering around its own trend line, either because the trend is disorderly or because the market is swinging without one.
- Against Standard Deviation. During a steady climb, Standard Deviation rises because the closes drift away from their mean, while Standard Error stays low because they stay close to their line. The gap between the two is the trend.
- Compare it with itself only. The reading is in price units, so read it against its own recent history on the same chart.
These are ways to read trend quality, not entry signals on their own.
Settings
| Setting | Default | What it changes |
|---|---|---|
| Length | 14 | Bars the line is fitted through. Shorter reacts sooner to a change in behaviour; longer judges the fit over a broader stretch. Minimum 3. |
| Source | Close | Which price each bar contributes. Open, high, low and the averaged sources such as hl2 and hlc3 are also available. |
Adjust the window and the price source in the indicator settings.
Calculation
Each bar, the indicator fits an ordinary least-squares line through the last Length values and measures the leftover distance from each value to that line:
line[k] = intercept + slope * k (k = 0 for the current bar, 1 for the bar before, ...)
residual = close[k] - line[k] for each of the last 14 bars
std error = sqrt( sum of residual^2 / (14 - 2) )
The sum of squared residuals is divided by Length minus 2, because fitting a line uses up two degrees of freedom, one for its level and one for its slope. With only two bars there would be nothing left to measure, which is why Length has a minimum of 3.
The whole fitted line is used, not just its value at the current bar, so every bar in the window contributes its own residual. The line appears once Length bars are available and is not smoothed afterwards.
Limitations
- It is in price units. The level rises and falls with price, so it cannot be compared between markets or across a large move on the same market.
- Low does not mean trending. A flat, quiet market also fits a straight line well, so a low reading needs the chart to tell a steady trend from a dead range.
- It assumes a straight line. A move that curves, such as an accelerating rally or a rounded top, leaves residuals that raise the reading even when the move is orderly.
- The live candle moves. The line is refitted every bar, and the current bar's value changes until that bar closes.
- It is not a strategy. It describes how orderly price has been. It gives no entry, exit, sizing or risk management on its own.
Frequently asked questions
It measures how far recent closes typically sit from a straight line fitted through them by least squares. A low reading means price has been following a line closely; a high one means price has been scattering around it.
Standard Deviation measures the scatter around the window's average; Standard Error measures the scatter around the window's fitted trend line. In a steady trend, Standard Deviation rises while Standard Error stays low, because the closes move away from their average but stay close to their line.
Yes. The indicator declares two inputs: Length, default 14 with a minimum of 3, and Source, default close. Open the indicator's settings on the chart to change them.
No. The line is refitted on every bar using only that bar and the ones before it, so values on closed bars are not revised. The current candle's reading moves while that candle is live and settles when it closes.
A straight line always passes exactly through two points, so with two bars there is no scatter left to measure. The calculation divides by Length minus 2, and it needs at least one bar beyond the two the line uses up.
Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in Standard Error already applied. On any other market, open the indicator picker on the chart and choose Standard Error from the Volatility group.