OPEN-SOURCE SCRIPT

Equity Forecast Matrix Table

325
Publication Summary

Equity Forecast Table is a multi-factor daily and weekly swing-trading dashboard designed for equities. The indicator combines trend regime, price structure, volume behavior, regression positioning, volatility expansion, Fibonacci extensions and a k-nearest neighbors (kNN) forecast model into a compact table.

The purpose of the script is to give traders a structured read on current market bias, probable target zones, invalidation levels and confirmation quality without cluttering the chart with excessive projected lines or labels.

This indicator is intended for swing traders who want a cleaner way to evaluate:

Whether the current setup favors bulls or bears
Whether price structure supports continuation or reversal
Where the highest-probability target zones are located
Whether volume is confirming or weakening the setup
Where the broader forecast thesis becomes invalid
How current price compares to volatility-based and Fibonacci-based projections

The script is designed primarily for daily and weekly equity charts, though it can be applied to other timeframes for context.

Core Features
Multi-Factor Forecast Bias

The table produces a directional forecast bias based on a weighted blend of:

k-nearest neighbors (kNN) forecast
Higher-timeframe trend regime
Internal price structure
Volume confirmation
Regression trend behavior

The result is summarized as a bullish, bearish or neutral forecast bias.

kNN Forecast Model

The k-nearest neighbors (kNN) model compares the current setup against historical analogs and evaluates how similar prior setups resolved. The model uses recent price behavior, trend conditions and structural context to estimate the most likely directional path.

The table displays:

Forecast value
Confidence level
Sample count
Number of neighbors used

This gives the trader a read on both the model’s forecast and the quality of the historical comparison.

Structure Detection

The script evaluates internal market structure using concepts such as:

Break of Structure (BOS)
Change of Character (CHoCH)
Failed breakouts
Higher-low and lower-high behavior

This helps separate strong continuation structures from setups that are starting to weaken.

Volume Confirmation

The model includes volume behavior through:

Relative Volume (RVOL)
On-Balance Volume (OBV)

Volume is used as a confirmation layer. A bullish structure with rising OBV and expanding RVOL is stronger than a bullish structure on weak participation.

Ranked Target Zones

Rather than relying on a single price target, the indicator ranks multiple target zones. These zones are built from a blend of structure, volatility, regression and extension logic.

The table displays:

Ranked Target 1
Ranked Target 2
Ranked Target 3

Each target includes a probability-style score to help traders identify which zones are most relevant.

Invalidation Level

The indicator provides an invalidation level based on structure and Average True Range (ATR).

This level is not intended to be a mandatory stop-loss. It is the level where the broader model thesis is considered structurally wrong.

Volatility and Extension Projections

The table also includes:

ATR expansion target
Measured move target
Fibonacci 1.000 extension
Fibonacci 1.272 extension
Fibonacci 1.618 extension

These levels are intended to provide broader upside or downside context if price continues beyond the ranked target zones.

How to Read the Table

The table is organized into four columns:

Column Meaning
Metric The model component being evaluated
Value The current reading for that metric
Context Why the model is assigning that reading
Score The confidence or contribution of that component

The table should be read from top to bottom.

Table Breakdown
Forecast Bias

This is the headline output of the model.

A bullish reading means the weighted model inputs favor upside continuation.
A bearish reading means the weighted model inputs favor downside continuation.
A neutral reading means the evidence is mixed or not strong enough to support a directional edge.

This should be treated as the model’s directional lean, not a standalone trade signal.

kNN Forecast

The k-nearest neighbors (kNN) row shows how the current setup compares to historical analogs.

Key fields:

Field Meaning
Forecast % Directional forecast output from similar historical setups
Confidence Quality of the analog comparison
Samples Number of historical samples available
Neighbors Number of closest historical matches used

A higher-confidence reading with a full sample set is more reliable than a low-confidence reading with limited samples.

Structure

The structure row evaluates whether price action is internally bullish, bearish or neutral.

Common context readings include:

Reading Meaning
Bull Structure Price is maintaining constructive higher-low or breakout behavior
Bear Structure Price is maintaining lower-high or breakdown behavior
CHoCH Change of Character, suggesting trend behavior may be shifting
BOS Break of Structure, confirming a directional break
Failed BOS Price attempted to break structure but failed, often supporting the opposite side

Structure is one of the most important confirmation layers in the table.

Volume

The volume row measures whether participation supports the forecast.

Metric Meaning
Relative Volume (RVOL) Current volume compared with normal volume
On-Balance Volume (OBV) Accumulation or distribution pressure

A bullish setup with rising OBV and strong RVOL is stronger than a bullish setup on weak volume.

A bearish setup with falling OBV and elevated RVOL suggests stronger distribution.

Regression

The regression row evaluates trend direction and price extension relative to the current regression path.

A rising regression trend supports bullish setups.
A falling regression trend supports bearish setups.
An extended regression position can warn that price may need to consolidate before continuing.

This row helps avoid chasing extended moves after the highest-quality entry has already passed.

Weekly Regime

The weekly regime row shows whether the higher timeframe supports or conflicts with the current setup.

Reading Interpretation
Bullish weekly regime Daily bullish setups have better continuation odds
Bearish weekly regime Daily bearish setups have better continuation odds
Neutral weekly regime Higher-timeframe confirmation is limited

This is especially important when using the script on daily charts.

Invalidation

The invalidation row shows the level where the model’s broader thesis is considered broken.

For bullish setups, a move below invalidation suggests the bullish structure has failed.
For bearish setups, a move above invalidation suggests the bearish structure has failed.

This is a model invalidation level, not automatically a trade stop. Traders should still apply their own position sizing, risk rules and execution framework.

Ranked Targets

The ranked target rows show the most relevant price zones based on the model.

Target Use
Ranked Target 1 Nearest high-probability target or resistance/support zone
Ranked Target 2 Next continuation zone if Target 1 is accepted or broken
Ranked Target 3 Extended continuation zone

The ranked targets should be used as decision zones:

Take partial profits
Tighten risk
Reassess price behavior
Watch for rejection or continuation
Confirm with volume before assuming further extension
Projected High, Mid and Low

These rows estimate a broader forecast range based on the model’s historical analogs.

Projection Meaning
Projected High Upper path estimate
Projected Mid Central path estimate
Projected Low Lower path estimate

These should not be treated as guaranteed targets. They are scenario boundaries.

ATR Expansion

The Average True Range (ATR) expansion row estimates where price could reasonably move based on current volatility.

This is useful when it aligns with a ranked target. When ATR expansion and a ranked target point to the same area, that zone has stronger confluence.

Measured Move

The measured move row estimates a larger continuation target based on the prior structure range.

This is usually more aggressive than the nearest ranked target and should be treated as a secondary swing objective.

Fibonacci Extensions

The Fibonacci extension rows provide longer-range continuation references.

Common levels include:

Level Meaning
Fib 1.000 Full measured extension
Fib 1.272 Higher continuation extension
Fib 1.618 Aggressive continuation extension

These levels become more relevant only after price clears nearer ranked targets.

Bull Score and Bear Score

The bull and bear scores summarize the weighted directional evidence.

The model weighting typically includes:

Component Role
kNN forecast Historical analog forecast
Regime Higher-timeframe trend alignment
Structure Current price action quality
Volume Participation and confirmation

A strong bull score with a weak bear score favors upside continuation.
A strong bear score with a weak bull score favors downside continuation.
When both scores are close, the setup is mixed and should be treated with caution.

Practical Use

The table is best used as a structured trading checklist:

Start with Forecast Bias to identify the model’s directional lean.
Confirm with Structure to make sure price action supports the bias.
Check Volume to see whether participation confirms the move.
Use Ranked Targets as profit-taking or reassessment zones.
Use Invalidation to know where the broader model thesis is wrong.
Use ATR, measured move and Fibonacci extensions for broader context.

The strongest setups occur when forecast bias, structure, weekly regime and volume are all aligned.

Disclaimer

This script is for educational and informational purposes only. It does not provide financial advice or guarantee future price movement. Traders should use their own risk management, position sizing and trade execution rules. Historical analogs, statistical forecasts and technical levels are probabilistic tools, not certainties.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.