Trend prediction [Quantum Edge]

351
BY QUANTUM EDGE: Trend Prediction [Quantum Edge]
Trend Prediction [Quantum Edge] is a trend-following overlay that combines volatility-adjusted trend bands, color-coded candles, and three projected target levels. It provides a visual framework for tracking confirmed directional changes and monitoring price relative to a reference entry, a stop reference, and potential objectives.

Despite its name, the indicator does not forecast future prices. Its signals respond to price crossing calculated trend boundaries.

How the trend is determined
The indicator calculates two boundaries using moving averages of candle highs and lows, adjusted by a smoothed Average True Range (ATR):

Upper boundary: moving average of highs plus the volatility adjustment.

Lower boundary: moving average of lows minus the volatility adjustment.

A bullish trend change occurs when price crosses above the upper boundary on a confirmed candle close. A bearish trend change occurs when price crosses below the lower boundary on a confirmed candle close.

Once established, the trend state remains active until an opposite qualifying crossover occurs. Candles are colored green for the bullish state and orange for the bearish state.

Entry, stop reference, and projected targets
When a new trend signal appears, the indicator draws:

A reference entry at the signal candle’s closing price.

A stop reference at the opposite trend boundary.

Three volatility-based target levels in the direction of the signal.

The volatility unit used for these calculations is the 200-period simple moving average of ATR(200), multiplied by 0.8.

With the default Set Targets value of 0, target distances from the reference entry are:

Target 1: 5 volatility units.

Target 2: 10 volatility units.

Target 3: 15 volatility units.

The Set Targets input adjusts the spacing using these formulas:

Target 1:
5
+
𝑇
5+T

Target 2:
10
+
2
𝑇
10+2T

Target 3:
15
+
3
𝑇
15+3T

Here,
𝑇
T is the Set Targets input. Distances are multiplied by the volatility unit and added to the reference entry for bullish signals or subtracted for bearish signals.

These targets are volatility projections—not fixed risk/reward multiples.

Visual tracking
The indicator includes:

Trend-colored candles.

Upward and downward triangles marking confirmed trend changes.

An active trend boundary that updates with price and volatility.

Horizontal reference entry, stop, and target levels.

Shaded areas between the stop reference, entry, and furthest target.

Checkmarks and dashed lines when a subsequent candle’s high-to-low range includes a tracked level.

An X marker when a subsequent candle’s range includes the stop reference.

The horizontal levels are established when the signal appears and remain at their original prices while that trend is active. The plotted trend boundary continues to update separately. An opposite trend signal removes the previous level set and creates a new one.

Settings
Trend Length
Controls the moving-average length used to calculate the high and low boundaries. The default is 10.

Set Targets
Adjusts the spacing of all three projected targets. The default is 0. Increasing this value moves the targets farther from the reference entry. Use nonnegative values to maintain the intended directional target layout.

Suggested interpretation
Use the indicator as a trend-context and level-visualization tool:

Observe a confirmed trend-change signal.

Review the reference entry, stop reference, and projected targets.

Evaluate the setup against your own market context and risk rules.

Monitor subsequent price interaction with the displayed levels.

A trend-change marker is not, by itself, confirmation of a complete trading setup.

Important limitations
Trend-change signals require a confirmed candle close, but the active boundary and touch markers can update while the current candle is forming.

Checkmarks indicate that a candle’s range included a level. They do not establish execution price, fill quality, or which level was reached first.

A stop touch does not automatically end the active trend or prevent later target markings. This is a visual tracking tool, not a trade-management engine.

The long volatility calculation requires sufficient historical data before meaningful signals and levels are available.

The initial trend state is bearish by default; a bearish candle color at startup does not necessarily represent a newly confirmed bearish signal.

The script does not include strategy orders, backtest statistics, position sizing, or dedicated alert conditions.

For educational and analytical use only. No prediction accuracy, profitability, or trading outcome is guaranteed.hh

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.