Regression trend
The linear regression channel's construction throughout: the same two anchors naming only a time range, the same closes read from the bars, the same least-squares line.
The width is the whole difference: the half-width here is a configurable multiple of the standard deviation of the closes' distances from that line, where the linear regression channel takes the largest of those distances instead. The parameter defaults to 2. On a stretch where the closes barely move, the standard deviation approaches zero and both bounds fall onto the centre line.
01The tool, live
Placed and drawn by Bentrix’s own code over the same synthetic bars on every page — an illustration of the tool’s geometry, not a market.
02Its parts, named
- 1Press on anchor 1
- 2Drag: a ghost of the whole tool follows the pointer
- 3Release on anchor 2
03What you see
The same fitted line as the linear regression channel, with parallels at a multiple of the closes' standard deviation from it — 2 by default — instead of at the farthest close.
Two points name a stretch of time; the line is the least-squares fit through the closes in that stretch, with parallels a chosen number of standard deviations away. It moves in time only: its prices come from the bars.
It shows how far the closes in the range scatter around their own fit, in the units of that scatter.
04Where it comes from
Standard-deviation bands around a fitted line are the regression counterpart of bands around a moving average, in use among quantitative traders since the 1980s.
05How it is placed
- Open the chart's Tools column and choose Line tools › Regression trend.
- Press on the start of the range, drag to the end of the range, and release. A ghost of the whole tool follows the pointer while you drag.
- With the magnet on, an anchor dropped near a candle's open, high, low or close snaps to it.
Its anchors
- 1The start of the range
- 2The end of the range
Put the two anchors at the two ends of the stretch to be read.
06The geometry
With the least-squares line through the range's closes:
σ = √(1/n Σ[i=1..n] (Cᵢ − L(i))²), upper = L + kσ, lower = L − kσ
07Settings and defaults
08Readings — what traders look for
How unusual a close is. A close beyond the band is farther from the fit than most closes of the range were.
Width. A wide band is a noisy trend; a narrow one, an orderly trend.
Return to the line. Readers watch whether stretches away from the fitted line come back to it.
09What it does not tell you
Two standard deviations is not a wall. Nothing about the band says price turns there.
10Limits and common misreadings
Not a probability. The familiar 95 % belongs to a bell curve; price distances from a trend are not one.
The range and are both choices, and each changes the picture.
11On other chart types
A drawing is fixed to moments and prices, so it keeps its place on every chart type. On a chart built by price or by activity — Renko, Range bars, Point & Figure, Kagi, Line break — each anchor stands on the brick, bar or column that holds its moment. No chart type refuses a drawing. In an indicator's own pane, the channel is fitted to that pane's main line instead of to the closes.
12In Bentrix
- Where it is: the chart's Tools column › Line tools › Regression trend.
- Its properties: select the tool and open its properties window; the small bar that floats beside a selected tool has its lock.
- Undo: Ctrl+Z takes back the last drawing step on that chart.
- In a pane: every tool can also be placed in an indicator's own pane.
13From an agent or a program
An agent or a program places the tool with object_place: the chart, the kind std_dev_channel, and its anchors in placement order, each a moment (t_ms, milliseconds since 1970 on the workbench's feed) and a price. Acting on a chart needs the lab permission, and tools that act are part of Plus.
{
"name": "object_place",
"arguments": {
"chart": "<chart uri>",
"kind": "std_dev_channel",
"anchors": [
{
"t_ms": 1710151200000,
"price": 1.085
},
{
"t_ms": 1710172800000,
"price": 1.0862
}
]
}
}object_move moves its anchors, object_change its look, object_find lists a chart's drawings and object_delete removes one. All of them are in the MCP reference, and every SDK language has the same calls.
15Sources
- Kirkpatrick, Charles D., and Julie R. Dahlquist. Technical Analysis: The Complete Resource for Financial Market Technicians. 2nd ed., FT Press, 2010.
Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed