Diupdate

Dynamic Candle Trailing Stop

569
Dynamic Candle Trailing Stop (v1)

The Dynamic Candle Trailing Stop is a clean, multi-directional trailing stop tool designed to help traders automate exit management, protect profits, and reduce emotional decision-making.

Instead of relying on volatility indicators like ATR or static percentages, this indicator anchors its trailing stop directly to recent price structure (highs and lows over a customizable candle period, default is 6 candles).

-----

🔹 How It Works

1. Structural Anchoring: It continuously calculates the highest high and lowest low over a user-defined lookback window (`# of Candles to Look Back`).
2. One-Way Ratcheting Mechanism:
- In a Long Trend: The trailing stop only moves UP (ratchets upward as new local lows form) and will never step down.
- In a Short Trend: The trailing stop only moves DOWN (ratchets downward as new local highs form) and will never step up.
3. Automated Trend Reset: When price closes beyond the trailing stop, the trend state automatically flips, and the stop resets to the opposite structural boundary.

-----

🟢 How to Use It

* Color Coding:
* Green Stepline: Active Long Trailing Stop.
* Red Stepline: Active Short Trailing Stop.
* Exit Signal: Close a position when the candle closes beyond the stepline.
* Trend Filtering: Use the line color as an extra confirmation filter for current short-term directional bias.
* Ranges: Don't ratchet your stop if the current candles closes opposite direction. Leave space for a range to breath. If you move the stop too aggressively you won't be able to capture the bigger move.

-----

⚙️ Settings

* # of Candles to Look Back:
* Default: `6`
* Lower values (e.g., 2–3) provide a tight, fast-reacting trail for scalping.
* Higher values (e.g., 5–10) give the asset more breathing room, suited for longer intraday trading.

-----

Open source under Mozilla Public License 2.0. Enjoy, and safe trading!
Catatan Rilis
Changed default # of candles to 6 as I've found that to be a better starting point.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.