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.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。