OPEN-SOURCE SCRIPT

Trend Targets [AlgoAlpha]

12 095
OVERVIEW
This script combines a smoothed trend-following model with dynamic price rejection logic and ATR-based target projection to give traders a complete visual framework for trading trend continuations. It overlays on price and automatically detects potential trend shifts, confirms rejections near dynamic support/resistance, and displays calculated stop-loss and take-profit levels to support structured risk-reward management. Unlike traditional indicators that only show trend direction or signal entries, this tool brings together a unique mix of signal validation, volatility-aware positioning, and layered profit-taking to guide decision-making with more context.

CONCEPTS
The core trend logic is built on a custom Supertrend that uses an ATR-based band structure with long smoothing chains—first through a WMA, then an EMA—allowing the trend line to respond to major shifts while ignoring noise. A key addition is the use of rejection logic: the script looks for consolidation candles that "hug" the smoothed trend line and counts how many consecutive bars reject from it. This behavior often precedes significant moves. A user-defined threshold filters out weak tests and highlights only meaningful rejections.

FEATURES
  1. Trend Detection: Automatically identifies trend direction using a smoothed Supertrend (WMA + EMA), with shape markers on trend shifts and color-coded bars for clarity.
    syot kilat
  2. Rejection Signals: Detects price rejections at the trend line after a user-defined number of consolidation bars; plots ▲/▼ icons to highlight strong continuation setups.
    syot kilat
  3. Target Projection: On trend confirmation, plots entry, stop-loss (ATR-based), and three dynamic take-profit levels based on customizable syot kilatmultiples.

  4. Dynamic Updates: All levels (entry, SL, TP1–TP3) auto-adjust based on volatility and are labeled in real time on the chart.
  5. Customization: Users can tweak trend parameters, rejection confirmation count, SL/TP ratios, smoothing lengths, and appearance settings.
  6. Alerts: Built-in alerts for trend changes, rejection events, and when TP1, TP2, or TP3 are reached.
  7. Chart Overlay: Plots directly on price chart with minimal clutter and clearly labeled levels for easy trading.


USAGE
Start by tuning the Supertrend factor and ATR period to fit your asset and timeframe—higher values will catch bigger swings, lower values catch faster moves. The confirmation count should match how tightly you want to filter rejection behavior—higher values make signals rarer but stronger. When the trend shifts, the indicator colors the bars and line accordingly, and if enabled, plots the full entry-TP-SL structure. Rejection markers appear only after enough qualifying bars confirm price pressure at the trend line. This is especially useful for continuation plays where price retests the trend but fails to break it. All calculations are based on volatility (ATR), so targets naturally adjust with market conditions. Add alerts to get notified of important signals even when away from the chart.








Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.