Indicators
Linear Regression Indicator Explained
How the Linear Regression indicator fits a least-squares line to price for statistical trend measurement in Setup.Cash.
Featured image placeholder
/og/setup-cash-og.svg
The Linear Regression indicator fits a least-squares straight line through the last N closes and plots the line's endpoint each bar. It's the statistician's moving average: instead of averaging the past, it models the trend and reports where the model says price should be now.
How It Works
- A least-squares fit minimizes distance to all closes in the window.
- The endpoint value leads a same-length SMA because the fit extrapolates the trend within the window.
- Deviation of actual price from the regression value measures short-term stretch.
How to Trade It
Use it as a low-lag baseline (price above a rising regression line = trend intact), or trade the gap: price far above the regression value tends to revert toward it. Combined with its own Slope, you get direction and steepness as separate conditions.
Building It in Setup.Cash
Add Linear Regression in the strategy builder — the length input controls its sensitivity — and use its value in any entry, exit, or filter condition. You can also combine it with other tools in the Indicators Lab or via the AI indicator generator. The TOS StdDev All indicator draws the full regression channel. For the full category overview, see the advanced trend library guide.
Trend tools reward patience: pick one, pair it with a volatility or regime filter, and backtest before trading it live.
Related Posts
View allIndicators
Correlation Trend Indicator (CTI) Indicator Explained
How Ehlers' Correlation Trend Indicator scores trend quality from -1 to +1 by correlating price with time, in Setup.Cash.
2 min read · 205 words
Indicators
Efficiency Ratio (ER) Indicator Explained
How Kaufman's Efficiency Ratio measures how directly price travels, and how to use ER as a regime filter in Setup.Cash.
2 min read · 217 words
Indicators
Rolling Median Indicator Explained
How the rolling Median gives an outlier-proof center line for robust baselines in Setup.Cash.
1 min read · 197 words
Indicators
Slope Indicator Explained
How the Slope indicator quantifies trend steepness as a number your bot can threshold, and how to use it in Setup.Cash.
1 min read · 194 words
Start here
Build your trading bot workflow with structure
Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.