TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
TradingView Futures Indicators

Linear Regression Channel on TradingView Compare a Frozen and Rolling Fit on MES

The center line fits the selected prices to a straight line. The two outside bands show distance from that fit. Both the slope and the bands can change as older bars leave a rolling window and new ones enter it.

Quick Answer

In Supercharts, add the built-in Linear Regression indicator and choose Count, Source, and the upper and lower deviations. Use the Regression Trend drawing when you want two fixed endpoints. In replay, save the channel before the next bar if you want to judge whether that bar broke the earlier band.

Start 7-Day TrialChoose the indicator or drawingCompare two snapshots of the same candlesRun the check in Bar Replay

Set up the indicator and the fixed drawing

From Supercharts, select Indicators and search for Linear Regression. Choose the built-in result. On a five-minute chart, set Count to 20, Source to Close, and both deviations to 2 for this practice exercise. Check that both bands are enabled. Twenty five-minute candles span 100 trading minutes when there are no gaps in the data.

For a fixed window, choose Regression Trend from the left drawing toolbar’s Trend tools and place the two points on the first and last bars of the sample. In the drawing’s Coordinates settings, check the bar positions. Use its line extension to see the projection to the right without moving the second anchor. Check Source and deviations in the drawing separately from the indicator.

A parallel channel uses anchors you choose on the chart. A regression channel uses the estimated slope of the selected data. Use the same dated contract, interval and session template to compare them.

See why the 11:15 close moves inside the recalculated band

This teaching chart fits the closes with ordinary least squares and puts its dashed bands two root-mean-square residuals from the center line. A residual is a close minus its fitted price at that bar. The calculation makes the example reproducible. TradingView and community scripts can differ in their implementation and displayed values.

In the frozen view, the latest input is the 11:00 a.m. close. At A, the 11:05 close of 6,011.50 is above the projected band at 6,008.60. At B, the 11:15 close of 6,010.25 is still above the band at 6,009.11. The frozen view continues to use the same 20 prices.

Now switch to Recalculated at 11:15 a.m. At B, the same 6,010.25 close is inside the revised channel, which runs from 6,007.95 to 6,011.50 at that point. The bar has not changed. The recalculation includes B itself and the two bars that followed the frozen fit. The earlier upper band and the revised band answer different questions.

Compare fixed and recalculated MES bands

Synthetic MES 5-minute candles. Times are bar closes in CT.

Marked bars · 11:05 A / 11:15 B

The fit uses the 20 closes from 9:25 to 11:00 CT. A and B are outside the sample. The upper band is 6,008.60 at A and 6,009.11 at B.

Record the band before revealing the next candle

Open Bar Replay on a five-minute futures chart. If you are using 20 closes, advance until you can see 20 completed candles in your chosen session. Record their timestamps, Source, both deviations, and the current upper and lower levels. For an extrapolated next-bar check, draw the fixed Regression Trend over the same sample, extend it one interval, and record the projected band at that next bar.

Advance one candle and record its close separately from the band you saved. Then take a second screenshot of the rolling channel after that close. When reviewing more examples, keep the rule for a wick or close break fixed and record every eligible observation. A fitted channel can move with price and a break alone does not establish where price will go next.

Sources

Official References

Platform details on this page were checked against these official resources.

TradingView Linear Regression indicatorVerify Count, Source and channel deviation settings.TradingView Regression Trend drawingCheck drawing coordinates and line extension.TradingView’s Linear Regression tutorialSee the built-in indicator and examples on Supercharts.
Related Guides

Keep Building the Rule System

Compare a hand-drawn parallel channel

Mark fixed anchors and compare a wick with a failed retest.

Set up TradingView Bar Replay

Advance one candle at a time and record what you knew before the next bar.

Measure a futures session’s range

Fix a benchmark to completed sessions and compare it with today’s high and low.

FAQ

Common Questions

Why does my regression channel move after a breakout?

Each completed candle adds a new price to the rolling sample and removes an older one. That can change both the slope of the center line and the distance of its bands. A drawing with fixed endpoints preserves the original fit when you extend it.

Does two standard deviations mean price stays inside 95% of the time?

The bands describe deviations from a fit on a specific sample. Estimating how frequently future candles stay inside requires a separate test on subsequent data.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.