OPEN-SOURCE SCRIPT

Advanced UT-Trail System Pros [identityKa]

1 897
Overview
The Advanced UT-Trail System Pro [identityKa] is a comprehensive trend-following and trade management indicator. Built upon the foundation of Average True Range (ATR) trailing stops, this script introduces dynamic timeframe adaptation and Heikin-Ashi noise filtering to provide smoother, more reliable structural signals. It is designed to keep traders in prevailing trends longer while mathematically defining risk and automated profit targets.

Core Calculations & Engine
The indicator relies on a robust trailing stop logic driven by volatility:

1-) ATR Volatility Baseline: It calculates the ATR over a user-defined period (default 10). This value is multiplied by a "Base Key Value" to determine the strict distance the trailing stop will maintain from the price action.

2-) Heikin-Ashi Filtering: Traditional price action can cause premature stop-outs due to market noise. By default, this script pulls Heikin-Ashi close data (ticker.heikinashi) as the source (src) for the trailing calculation. This dramatically smooths the underlying data feed, preventing false wick-outs.

3-) Auto-Adaptive Sensitivity: To combat the lag inherent in macro trailing stops on lower timeframes, the script features an adaptive multiplier engine. If the trader switches to an intraday timeframe (≤ 60 minutes) or a scalp timeframe (≤ 15 minutes), the script mathematically reduces the Base Key Value multiplier (e.g., $a \times 0.6$), tightening the trailing stop dynamically to suit the faster price action.

Dynamic Trade Management
Upon the confirmation of a directional flip (the source crossing the trailing stop line), the script plots actionable data:

Trailing Stop Line: A step-line visualizes the exact, non-repainting invalidation level.

Auto Take-Profit Projection: Utilizing the exact ATR value at the moment of the signal, the script automatically projects and draws Target 1 (TP1) and Target 2 (TP2) dashed lines into the future. These targets are based on predefined ATR multipliers (default 1.5x and 3.0x), enforcing a mechanical risk-to-reward ratio.

HUD Dashboard & AI State Tracker
The integrated on-chart panel aggregates the current system data:

Engine Mode: Displays whether the script is operating in SCALP, DAY, or SWING sensitivity mode based on the current chart.

AI Suggestion: Evaluates the proximity of the current price to the trailing stop.

LONG / SHORT: Triggered when the price is safely trending in the direction of the trailing stop.

Dangerous: Triggered strictly when the current closing price enters a 0.2 ATR threshold of the trailing stop line. This mathematical condition acts as a warning that the trend is actively being tested and a reversal may be imminent.

How to Use It
Traders should utilize the printed BUY/SELL labels as macro directional bias. The trailing step-line serves as an objective, mechanical Stop-Loss level. When entering a position, traders can use the automatically projected TP1 and TP2 lines to scale out of their positions incrementally. If the AI Suggestion shifts to "Dangerous", it is a mechanical cue to protect capital, tighten stops manually, or avoid adding to existing positions.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.