Linear Regression Slope

Linear Regression Slope
Indicator

TrendSeparate panelFree on ChartLabs

Linear Regression Slope is the slope of a straight line fitted to the 14 closes before the current bar: how far price rises or falls per bar along it.

Built on the moving regression in The New Technical Trader by Tushar Chande and Stanley Kroll, 1994. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AILinear Regression Slopechartlabs.co/charts
Atlas reads it

The slope is negative and falling: the 14-bar line points down more steeply.

Slope -336.1 per bar · Close 65,242.2

Atlas reads it

The slope is negative and falling: the 14-bar line points down more steeply.

Slope -336.1 per bar · Close 65,242.2

Illustration on simulated data.

Linear Regression SlopeWhat is the Linear Regression Slope indicator?

The slope draws one grey line in its own panel. Each bar it fits a least-squares line through the 14 closes before that bar and plots the slope of that line: its change in price per bar.

Above zero the fitted line points up; below zero it points down. The further from zero, the steeper the trend. ChartLabs draws no zero line on this panel; the scenes on this page add a faint one for illustration.

The value is in price units per bar, so it depends on the price of the market. A slope of 50 is steep on a 100 dollar stock and barely moving on Bitcoin. Read it against its own history, not against another market.

The closes before the bar

ChartLabs fits the 14 closes before the current bar. The current close joins the fit on the next bar, so the live bar's value is set when it opens.

Warm-up

The first value is on the 16th bar. Earlier bars are left empty rather than drawn as zero.

Linear Regression Slope signalsFive patterns to know.

Above zero: line points up
1Bullish

Slope above zero

The 14-close fit points up. The higher the reading, the steeper the climb.

Below zero: line points down
2Bearish

Slope below zero

The fit points down.

Crosses above zero
3Bullish lean

Crossing above zero

The fitted line has turned from falling to rising.

Crosses under zero
4Bearish lean

Crossing below zero

The fitted line has turned from rising to falling.

Hugs zero
5Inconclusive

Hugging zero

In a range the fit is nearly flat and the slope stays close to zero.

Linear Regression Slope formulaHow it is calculated.

Slope=∑(x−x¯)(y−y¯)∑(x−x¯)2over the 14 closes before the bar
STEP 1

Take the earlier closes

Use the 14 closes before the current bar, numbered 0 for the oldest to 13 for the newest.

STEP 2

Fit a line

Find the straight line with the smallest sum of squared distances to those closes.

STEP 3

Plot its slope

The slope is the line's change per bar. Positive means it rises, negative means it falls.

Linear Regression Slope settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Length142 to 5,000Closes in the fit. Longer gives a steadier, slower slope.
SourceCloseAny priceWhich values feed the fit.
LineGrey #999999, 1 pxAny colour and widthColour and width of the line. No guide lines are drawn.
ScaleAuto, 3 decimalsFixedThe panel scales to the values in view and shows 3 decimals.
Setting
Length
Default
14
Range
2 to 5,000
What it changes
Closes in the fit. Longer gives a steadier, slower slope.
Setting
Source
Default
Close
Range
Any price
What it changes
Which values feed the fit.
Setting
Line
Default
Grey #999999, 1 px
Range
Any colour and width
What it changes
Colour and width of the line. No guide lines are drawn.
Setting
Scale
Default
Auto, 3 decimals
Range
Fixed
What it changes
The panel scales to the values in view and shows 3 decimals.
146 zero crosses in view
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

Linear Regression Slope strategiesUse it in 3 setups.

Crosses above zero

Trade the turn of the fit

IfSlopecrosses above0thenlook for longs

The cross means the 14-close line has turned up. Traders often want price above a longer average as well.

Above zero: line points up

Hold while it stays positive

WhileSlopeis above0holdthe position

As long as the fit points up, the short-term trend the trade relied on is still there.

Crosses under zero

Exit on the cross under zero

IfSlopecrosses below0thenclose the long

A plain exit rule: the line that justified the trade no longer rises.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

Linear Regression Slope mistakesCommon mistakes.

Turns down above zero

Selling the first turn down

A falling slope above zero means the climb is less steep, not that it has ended. Here price kept rising.

The lowSlope crosses zero

Expecting the cross at the low

The fit needs closes above the older ones before it points up, so the zero cross comes after the low. Here it came about ten bars later.

Hugs zero

Reading small moves near zero

In a range the slope drifts around zero and its small crosses mean little.

Linear Regression Slope combinationsPair it with these.

Linear Regression Slope FAQQuestions traders ask.

What are the default Linear Regression Slope settings?

Length 14 on the close.

How is the slope calculated?

It fits a least-squares line to the 14 closes before the current bar and reports how much that line changes per bar.

What does a slope of zero mean?

The fitted line is flat: over those 14 closes price went sideways on balance.

Why are the numbers so large on some charts?

The slope is in price per bar. On a high-priced market the line can move by hundreds each bar.

Can I compare the slope between markets?

Not directly, because it is in price units. A percent measure such as ROC compares more fairly.

Why does the live bar's value not move?

ChartLabs fits the 14 closes before the current bar, so the value is fixed when the bar opens. The newest close joins the fit on the next bar.

Slope or Momentum?

Momentum compares two closes. The slope uses all 14 closes in the fit, so one odd bar moves it less.

Why is there no zero line?

The panel is drawn without guide lines. Zero still matters; read it from the scale.

Does the slope work on crypto?

Yes. It needs only closes.

Is it leading or lagging?

Lagging. It describes a line through past closes.

Does the slope repaint?

No. Closed bars never change, and the live bar's value stays put while the bar forms.

Related indicatorsMore trend tools.

All trend indicators

Try Linear Regression Slope on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
LR Slope (14, close)