OPEN-SOURCE SCRIPT

Uptrick: Vector Trail Trend

9 737
Introduction
Uptrick: Vector Trail Trend (VTT) is an overlay tool that combines a velocity-projected trend line with an ATR-based adaptive trailing band to identify directional bias and trend reversals. A secondary momentum module layered on top flags statistically extreme momentum conditions that traders can use as dynamic take-profit references within the prevailing trend. The script also includes a configurable overlay presentation and an on-chart dashboard summarizing current trend state.

Originality
This script combines three distinct calculation layers that are not typically merged in a single publication, and each is included for a specific reason.
The first layer builds a trend center from a smoothed moving average of price, then projects that line forward using a smoothed rate of change of the trend center itself, scaled by a user-defined projection factor. This produces a trend reference that leans in the direction of recent acceleration rather than simply lagging price, which is the basis used for the trailing band below it.

The second layer wraps that projected trend center in an ATR-based band that only trails in the favorable direction and resets on a confirmed close beyond the opposite band, similar in mechanism to a ratcheting stop line. This layer is responsible for the directional flips and the up and down signals plotted on the chart.

The third layer is independent of the first two and evaluates RSI relative to its own rolling mean and standard deviation, expressed as a Z-score. This is used to flag when momentum has reached a statistically extreme reading relative to its recent history, which the script surfaces as separate dynamic take-profit markers. This layer exists because trend direction and momentum exhaustion are different pieces of information, and combining them gives traders both a directional read and a separate overextension read without conflating the two into a single signal.

The overlay is user-selectable between a gradient fill between price and the trail, a dual EMA trend ribbon, both together, or neither, so the visual presentation can be adjusted without changing the underlying trend or TP logic.

Features
  • Velocity-projected trend center using a smoothed moving average and a smoothed rate of change projection
  • ATR-based adaptive trailing band with directional flip logic
  • Confirmed-bar trend state calculation to avoid intrabar repainting of the trend flip
  • Dynamic take-profit engine based on a Z-score of RSI relative to its own rolling mean and standard deviation
  • Selectable TP marker style, cross or circle
  • Up and down trend signal labels plotted at the trail
  • Selectable overlay mode: vector gradient fill, trend ribbon, both, or none
  • Adjustable gradient and ribbon transparency
  • Optional candle coloring based on active trend direction
  • Adjustable trail line width
  • On-chart dashboard showing trend, signal, Z-score, TP state, distance from trail in ATR units, and active overlay mode
  • Nine selectable dashboard positions
  • Seven alert conditions: up signal, down signal, long dynamic TP, short dynamic TP, any trend signal, any dynamic TP, and all VTT signals combined


Inputs
  • Trend Settings: source, trend length, velocity smoothing length, vector projection factor.
  • Trail Settings: ATR length, ATR multiplier.
  • Dynamic TP Settings: show/hide dynamic TPs, TP marker style, momentum (RSI) length, Z-score length, TP extreme level threshold.
  • Overlay: overlay style selection, gradient transparency, ribbon fast length, ribbon slow length, ribbon transparency.
  • Visuals: show/hide up and down signals, candle coloring toggle, trail width.
  • Dashboard: show/hide dashboard, dashboard position.

How It Works / How to Use
The trend center is calculated from a moving average of the chosen source, then projected forward using a smoothed measure of its own rate of change. An ATR-based band is built around this projected line and only moves in the direction favorable to the current trend, flipping only on a confirmed close beyond the opposite band. This flip is what produces the up and down signals and the trend color change.

Once a trend is established, the script tracks RSI relative to its own recent mean and standard deviation. When this Z-score reaches the user-defined extreme level and then crosses back toward normal, a dynamic take-profit marker is plotted for the active trend, using the opposite color for visual distinction, indicating that momentum has cooled from an extreme reading.

Traders can use the trail flips for directional bias and entries, and the dynamic TP markers as a secondary reference for potential exhaustion points within that trend. The overlay mode, transparency, candle coloring, and dashboard are all cosmetic and can be adjusted without affecting the underlying calculations.

Conclusion
Uptrick: Vector Trail Trend combines a velocity-projected trend line, an adaptive ATR trailing band, and a momentum Z-score take-profit layer into a single overlay tool, giving traders both a directional trend read and a separate momentum-exhaustion reference from one indicator.

Disclaimer
This script is provided for informational and educational purposes only and does not constitute financial advice. Past performance, whether shown historically or implied through the script's logic, does not guarantee future results. Always perform your own due diligence and risk management before making trading decisions.


免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。