# Extrapolated Previous Trend

The Extrapolated Previous Trend fits a linear trend to each completed interval and projects it into the current one, turning the prior slope into a live forecast line. Projections double as support and resistance, and a dashboard scores how persistently uptrends and downtrends carry between intervals. Built for traders who want trend persistence made measurable.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jul 25, 2023.
- Access: free.
- Concepts: [Linear Regression](https://www.luxalgo.com/library/concept/linear-regression/) (primary), [Trendline](https://www.luxalgo.com/library/concept/trendline/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn1hla0021vhsg2nx5rwcp
- Page: https://www.luxalgo.com/library/indicator/extrapolated-previous-trend/

**Extrapolated Previous Trend** fits a [linear regression](https://www.luxalgo.com/library/concept/linear-regression/) to the last completed interval and extends that line across the current one. The bet is persistence: if trend sign and slope tend to carry from one interval to the next, the projection becomes a usable forecast, and because every coefficient is computed on an already-closed interval, the model is immune to lookahead bias by construction.

## How to Trade the Extrapolated Previous Trend?

- **Projected line as forecast**: when persistence runs high, trade in the direction of the extrapolated slope and let the line define the expected path.
- **Line as support or resistance**: even when the new interval disagrees with the old one, the projection often behaves like a pre-drawn [trendline](https://www.luxalgo.com/library/concept/trendline/) where reversals and continuations resolve.
- **Persistence dashboard**: separate readings for uptrends and downtrends. High values mean successive intervals keep reinforcing each other, while low values warn that projections are flipping and a reversal mindset pays better.

Under the hood the indicator is a segmented linear model, a(n)t + b(n) for each interval n, whose coefficients come strictly from the previous segment. The steadier those coefficients stay over time, the more literally the projection can be taken.

## Extrapolated Previous Trend Settings

- **Timeframe**: the interval each trend is fitted on and projected from. Larger intervals track slow structural trends; smaller ones re-anchor the projection more frequently for faster tactical reads.

## Frequently Asked Questions

### What does the persistence value actually measure?

It scores how consistently segmented trends repeat between intervals, tracked separately for up and down moves. A high reading supports trading the projection as continuation; a low one says recent projections have been failing and reversals deserve more respect.

### How does this differ from an ordinary regression fit?

A standard segmented regression fits the data you are currently watching, so its line adjusts as the segment evolves. This tool freezes the previous interval's fit and projects it forward, related in spirit to [Periodic Linear Regressions](https://www.luxalgo.com/library/indicator/periodic-linear-regressions/), but built to forecast rather than describe.

### Is the Extrapolated Previous Trend free?

Yes. It lives in the free LuxAlgo Library, and this page can open it directly in Quant, our coding agent, for testing across intervals and markets. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Linear Regression Histogram](https://www.luxalgo.com/library/indicator/linear-regression-histogram/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/linear-regression-histogram.md
- [Linear Regression Fan](https://www.luxalgo.com/library/indicator/linear-regression-fan/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/linear-regression-fan.md
- [Periodic Linear Regressions](https://www.luxalgo.com/library/indicator/periodic-linear-regressions/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/periodic-linear-regressions.md
- [Rolling Segment](https://www.luxalgo.com/library/indicator/rolling-segment/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/rolling-segment.md
- [Rolling Trendline](https://www.luxalgo.com/library/indicator/rolling-trendline/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/rolling-trendline.md
- [Bitcoin Power Law](https://www.luxalgo.com/library/indicator/bitcoin-power-law/) (Linear Regression): markdown at https://www.luxalgo.com/library/indicator/bitcoin-power-law.md
- [Trendlines Oscillator](https://www.luxalgo.com/library/indicator/trendlines-oscillator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-oscillator.md
- [Trendlines with Breaks](https://www.luxalgo.com/library/indicator/trendlines-with-breaks/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-with-breaks.md

---

Source: https://www.luxalgo.com/library/indicator/extrapolated-previous-trend/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
