OPEN-SOURCE SCRIPT
Mis à jour

Adaptive Projection

2 662
Adaptive Projection is a personal chartist projection tool I use on my own charts to estimate what could be the most logically consistent continuation of trend structure.

This script is not built to “predict” the future with certainty. Its purpose is to project, in the most structurally disciplined way possible, what trend continuation could look like if the current market architecture keeps unfolding in a coherent manner.

Most projections are simplistic. They extend one line, one slope, or one regression and assume that is enough. This script takes a much more demanding approach. It evaluates trend structure across three different horizons — short-term, long-term, and very long-term — because a serious chart model should not treat all trends as if they were describing the same layer of information.

The core idea is simple to understand intuitively:
if trend continuation is going to remain chart-consistent, then the best projection should come from the alignment of multiple valid channel structures, not from one isolated line.

So instead of relying on a single channel, this script:
- finds the best short-term channel,
- finds the best long-term channel,
- finds the best very long-term channel,
- evaluates how solid each one is,
- then combines them with weighted logic so that higher-timeframe structure does not have the same role as lower-timeframe structure.

This is what makes the projection much more robust than a standard extrapolation.

At a practical level, the script tries to answer this question:
if the market continues in the most structurally logical way, what could that path look like?

To do that, it does not draw one naive straight projection. It builds the forward path adaptively, step by step. That is why the result is a curved projection rather than a rigid line to a distant endpoint. Each segment is informed by the structural information extracted from the three channel horizons, with different weights and multiple quality filters.

Why this approach is strong:

1. It is multi-horizon by design.
A short-term channel can capture recent acceleration or deceleration.
A long-term channel can capture the dominant structure.
A very long-term channel can capture the background trend regime.
The script does not flatten these into one simplistic view. It lets each horizon contribute according to its own importance.

2. It does not trust channels blindly.
Each candidate channel is filtered and scored using several structural criteria. The script is not just looking for a slope that “looks good”. It checks whether the channel is statistically coherent and structurally usable.

3. It favors robustness over convenience.
The script gives priority to channels that are eligible under demanding conditions. If no channel fully satisfies all conditions, it can still fall back to the best available candidate, but the model’s confidence reflects that reduced robustness.

4. It projects adaptively instead of mechanically.
A single straight projection assumes the same structure stays dominant all the way forward. This script is more nuanced: it builds the path progressively, so the projected curve better reflects how trend continuation would logically unfold if current structure persists.

5. It expresses internal agreement.
The confidence reading is not a claim of probability. It is a structural coherence score. It tells you how strongly the selected channels and their projected paths agree with each other. High confidence means stronger internal alignment. Low confidence means weaker convergence or more structural disagreement.

This indicator is especially useful if you want a serious chart-based framework for thinking about continuation, scenario planning, and directional structure without reducing everything to a simplistic trendline extension.

How the model works in more detail:

- The script scans predefined ranges for short-term, long-term, and very long-term channel lengths.
- For each candidate, it computes a regression-based channel structure.
- It measures Pearson correlation to evaluate linear coherence.
- It measures containment to verify whether price behavior actually respects the channel.
- It measures channel width to penalize structures that are too loose to be informative.
- It uses ADX-based information to confirm that the structure is supported by meaningful trend conditions rather than noise.
- It computes trend efficiency to distinguish cleaner trends from unstable ones.
- It computes a stability score by comparing neighboring candidate lengths, which helps avoid selecting fragile one-off fits.
- It combines these elements into a selection score designed to favor robust structural candidates.

Once the best channel has been identified for each horizon, the script then:
- projects the future location of each channel,
- measures where current price sits within each channel,
- estimates the most logical future continuation relative to that internal channel position,
- applies horizon-specific importance weights,
- applies quality-based weights,
- adjusts for horizon fit,
- and blends everything into one adaptive projection path.

That means the final projection is not the result of one indicator condition. It is the result of a layered structural decision process.

The Annualized Line Return should also be interpreted carefully. It is not a claim of expected performance. It is simply a normalized way to express the implied rate of change of the projected path over the selected horizon.

Important limitations:

- This script does not know the future.
- It does not incorporate news, macro shocks, liquidity events, or sudden regime changes.
- It is not a trading system and should not be read as a guaranteed directional forecast.
- It is a structural chart model designed to estimate the most logically consistent continuation of trend if the existing architecture persists.
- It is most meaningful in markets where structure exists. In chaotic or regime-shifting environments, confidence will usually degrade, which is appropriate.

In short, this is the projection tool I personally keep on my charts when I want the most advanced and structurally grounded chartist estimate of what trend continuation could logically look like.

It is built for one purpose:
to project trend continuation with as much internal discipline, multi-horizon structure, and robustness as possible.
Notes de version
Minor Update
Notes de version
Minor Update
Notes de version
Minor Update - Regime-aware persistence validation

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.