OPEN-SOURCE SCRIPT

Target Reach & Trend Projection

88
Target Reach & Trend Projection

Overview: The Target Reach & Trend Projection indicator helps traders estimate how long (in candles) it might take for the price to reach a chosen target level, while also providing insight into the current and higher-timeframe trend directions.

Key Features

1. Target Projection: Set your custom Target Price manually.

The indicator calculates the expected number of candles needed to reach that price, based on recent price velocity.

Displays an estimated date and time for when the price could reach your target.

2. Trend Detection (Local): Detects the current market direction using one of two methods:

Linear Trend: Measures direct slope between candles.

Smoothed Trend: Uses a moving average slope for cleaner, less noisy trend estimation.

3. Higher-Timeframe Confirmation: Confirms whether the higher timeframe (e.g., 4H, 1D) trend agrees with the local trend.

Displays “✅ Aligned” when both are in sync and “⚠️ Diverging” when not.

4. On-Chart Information: A dynamic label near the target price line shows:

Target level

Trend method used

Estimated candles to target

Current trend direction

Estimated time of arrival (ETA)

Higher-timeframe trend confirmation

5. Visual Feedback: Background color changes lightly to reflect trend direction (green for bullish, red for bearish).

6. Alerts: Optional alerts for when:

The target price is reached.

Both local and higher-timeframe trends align bullishly or bearishly.

How It Works

The script measures the average price velocity (slope) over a chosen lookback period.

It then divides the distance between the current price and the target by that slope to estimate how many candles it might take to get there.

It projects the estimated time of arrival based on your chart’s current timeframe.

The script also checks a higher timeframe trend (using a moving average) for multi-timeframe confirmation.

🧭 Use Cases

Estimating the time horizon for swing trades or targets.

Confirming momentum direction before entering or exiting positions.

Aligning intraday setups with higher-timeframe trends.

⚠️ Notes

Estimates assume current trend velocity continues — it does not predict future volatility or reversals.

Works best on time-based charts with clear directional movement (e.g., 1H, 4H, 1D).

Отказ от ответственности

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.