Momentum indicator

Linear regression slope: measuring trend steepness

The linear regression slope is the steepness of the best-fit straight line through the last 20 closes, measured in points per candle. Above 0 the trend is up, below 0 it is down, and a rising slope means the trend is speeding up. A cross of 0 marks the point where the best-fit line turns from falling to rising or back.

No card for the live chart7 days freeCancel any time

WickSpeak reads it

What it isHow to trade itWhat proves it wrong
Illustration

What it is

Linear regression draws the straight line that sits closest to all the recent closes. The slope of that line is a clean, unbiased measure of trend: it uses every candle in the window equally and is not pulled about by the oldest candle dropping out, as a simple average difference can be.

Because it is in points per candle, a slope of +1.5 on 15 minute gold means the fitted line is climbing about 1.5 points each candle.

How it is calculated

1. Take the last 20 closes and number them 1 to 20. 2. Fit the straight line that minimises the squared distance to every close (least squares). 3. The slope = (n x sum of (x times price) minus sum of x times sum of price) / (n x sum of x squared minus (sum of x) squared), where x is the candle number and n is 20. 4. Plot that slope for each candle.

Settings

SettingDefaultRangeWhat it changes
Length203 to 400How many closes the line is fitted to. Short windows track recent swings; long windows show the bigger trend.

How to read it

Above 0The best-fit line is rising: an uptrend over the window.
Below 0The best-fit line is falling: a downtrend.
RisingThe trend is getting steeper, or a downtrend is easing.
Falling while above 0The uptrend is still in place but losing steepness.
Near 0 for many candlesPrice is moving sideways: a range.

How to trade it

  1. 1

    Use a 1 hour US30 chart with a 20 period slope as the trend filter: longs only above 0.

  2. 2

    Wait for a pullback that leaves the slope positive but falling.

  3. 3

    Enter long when the slope turns up again on a closed candle and price closes above the previous candle's high.

  4. 4

    Stop below the pullback low, for example 60 to 100 points on 1 hour US30.

  5. 5

    Exit if the slope crosses below 0, or at 2 times the stop.

What proves it wrong

The long is cancelled once the slope closes below 0, which means the fitted trend line over the window now points down.

How WickSpeak reads Regression slope

WickSpeak writes a plain-English reading of the regression slope on the live candle: what it is, how steep the trend is right now, how to trade it and what would prove it wrong. In Playbook, a condition can check when the slope crosses above or below zero, stays above or below zero, or is rising or falling, a simple way to require an up-sloping trend before a play fires.

Best markets and timeframes

Works on every market and timeframe. Most useful on 15 minute to daily charts of gold, US30 and NAS100 as a trend filter.

Common mistakes

  • Comparing slope values across markets. It is in points per candle, so gold and US30 have very different scales.
  • Using a very short window, which makes it as noisy as price itself.
  • Treating a falling slope above 0 as a downtrend. It is still an uptrend, only a gentler one.

Works well with

Questions traders ask

What does the linear regression slope tell you?

It tells you how steeply the best-fit line through recent prices is rising or falling. Positive means up, negative means down, and its size shows how fast.

What is the best period for the regression slope?

20 is a common default. Use 50 or 100 to measure the larger trend, or 10 for short-term swings.

Is the regression slope better than a moving average?

It answers a slightly different question. A moving average tells you the average price; the slope tells you the direction and speed. Many traders use both.

Why does the slope cross zero after price turns?

Because it fits a line through the whole window, older candles keep pulling it the old way until enough new candles agree. It is a confirmation tool, not an early warning.

Read Regression slope on a live chart

WickSpeak writes what Regression slope is doing on every candle, how to trade it and what proves it wrong. Free for 30 minutes, no account.