OPEN-SOURCE SCRIPT
Trailing Stop + Profit Target

Trailing Stop + Exit Confirmation is a manual-entry tool designed to help traders visually manage trades with dynamic trailing stops and profit targets, based on ATR projections with a toggle button to reset calculations in real-time. Contains a “Short” toggle to work for short positions as well, which automatically inverses the PT and SL lines when toggled on.
Primary Calculations: Utilizes a manually adjustable entry price (default: $5 — ideal for options traders) that (when adjusted and recalculated) populates the chart with an adaptive ATR-based trailing stop line, dynamic profit target line, and optional 21-day EMA for directional context.
Below the Entry Price is a fully functional, manual reset toggle to reset all parameters mid-session to assess risk-reward based on entry price, risk tolerance, etc. followed by the “Short” toggle.
Primary Directions/Functions:
Enter your trade price in the “Manual Entry Price” field.
The script will begin plotting a dynamic trailing stop and profit target based on current market conditions.
Use the reset toggle to clear all calculations and start a new position at any time.
Customizable Settings:
ATR Length and Multiplier
Risk/Reward Profit Target Multiplier
Toggle to show/hide trailing stop, target, and EMA lines
Options Trading Use Case:
This tool is especially useful for options traders looking to manage premium-based entries (e.g., $5.00) on intraday or swing trades. The dynamic stop and target lines provide clear visual cues for scaling out or exiting based on price action, while allowing for tighter or looser risk depending on volatility (ATR).
This tool does not auto-detect entries or backtest positions. It is intended to complement your entry signals, not generate them. I've written an Options Momentum Signal indicator you can find right here
which functions well in tandem with this tool.
Made for traders who execute trades manually and want typical preset guidelines for profit and stop loss signals but lets you recalculate them by simply clicking a button, especially if any major news or downturn causes a big change in market conditions so you can make adjustments in real time.
Primary Calculations: Utilizes a manually adjustable entry price (default: $5 — ideal for options traders) that (when adjusted and recalculated) populates the chart with an adaptive ATR-based trailing stop line, dynamic profit target line, and optional 21-day EMA for directional context.
Below the Entry Price is a fully functional, manual reset toggle to reset all parameters mid-session to assess risk-reward based on entry price, risk tolerance, etc. followed by the “Short” toggle.
Primary Directions/Functions:
Enter your trade price in the “Manual Entry Price” field.
The script will begin plotting a dynamic trailing stop and profit target based on current market conditions.
Use the reset toggle to clear all calculations and start a new position at any time.
Customizable Settings:
ATR Length and Multiplier
Risk/Reward Profit Target Multiplier
Toggle to show/hide trailing stop, target, and EMA lines
Options Trading Use Case:
This tool is especially useful for options traders looking to manage premium-based entries (e.g., $5.00) on intraday or swing trades. The dynamic stop and target lines provide clear visual cues for scaling out or exiting based on price action, while allowing for tighter or looser risk depending on volatility (ATR).
This tool does not auto-detect entries or backtest positions. It is intended to complement your entry signals, not generate them. I've written an Options Momentum Signal indicator you can find right here

Made for traders who execute trades manually and want typical preset guidelines for profit and stop loss signals but lets you recalculate them by simply clicking a button, especially if any major news or downturn causes a big change in market conditions so you can make adjustments in real time.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.