Login Page - Create Account

Support Board


Date/Time: Tue, 07 Apr 2026 00:08:38 +0000



Post From: Linear regression - standard deviation bands

[2026-04-06 18:53:54]
John - SC Support - Posts: 45501
To get the current value of a Linear Regression fit to the last 100 bars and display the per bar value, you would need to use the Spreadsheet Study with the "FORECAST()" function. In this case, the you would enter the following in cell K3 to fit to the "Last" for each bar:
=FORECAST(A3, ID0.SG4@3:ID0.SG4@102, A3:A102)

Refer to the following:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#FORECAST_Function

You could then find the Standard Deviation of the forecasted data - meaning the per bar fit to the data, using the "STDEV.S()" or "STDEV.P()" function.

But there is not a way direct way to get the Standard Deviations for the Linear Regression fit itself at each bar. You could do it in the Spreadsheet by finding the Slope and Intercept of the fit data at each point, then finding the straight line and directly calculating the Standard Deviation. This is beyond our Support in terms of helping you further with this.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2026-04-06 18:54:30