OPEN-SOURCE SCRIPT
Dynamic Take Profit Stop Loss

Dynamic Take Profit Stop Loss
Dynamic Take Profit Stop Loss is designed to move beyond static take profit levels by dynamically adapting profit projections to changing market conditions.
Instead of relying on fixed R:R targets or ATR values alone, this indicator uses an internal Efficiency Engine to measure how effectively price is moving and adjusts projected targets accordingly.
As market efficiency strengthens, targets can expand. As efficiency weakens or deteriorates, targets can tighten to help preserve gains and reduce exposure.
Key Features
• Adaptive TP projections based on market efficiency
• SL-based R:R projection mode
• ATR-based projection mode
• Dynamic TP expansion and contraction logic
• Automatic Optimal TP selection (TP1 / TP2 / TP3)
• Local High / Low stop-loss calculation with adjustable buffers
• Optional manual entry price input
• Multiple TP display combinations:
TP1 Only
TP2 Only
TP3 Only
Optimal Only
TP + Optimal combinations
Multi-TP combinations
Show All
• Long and Short trade projections
• Dynamic TP multiplier engine
• Efficiency state analysis:
Improving
Mixed
Worsening
• Live information table showing:
Efficiency Score
Market State
TP Multiplier
Optimal TP
Long SL Distance
Short SL Distance
• Adjustable colors, table placement, text sizing, labels, and projection length
How It Works
The internal Efficiency Engine analyzes recent price behavior by comparing:
• Net directional movement
• Total movement path traveled
• Historical improvement or deterioration in efficiency
A weighted score is generated and translated into a dynamic TP multiplier.
Typical behavior:
Strong efficiency + improving conditions
→ Expand targets
Neutral conditions
→ Hold targets
Weakening efficiency
→ Tighten targets
Weak and deteriorating conditions
→ Exit or reduce exposure
Example Use
A standard 2R target may become:
Strong conditions:
2R → 3R+
Weak conditions:
2R → 1.2R–1.5R
The goal is to align profit expectations with how price is actually behaving instead of assuming all trades deserve identical targets.
Best Used For
• Trend continuation trading
• Breakout strategies
• Intraday trading
• Swing trading
• Futures
• Forex
• Indices
• Crypto
• Stocks
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market.
Dynamic Take Profit Stop Loss is designed to move beyond static take profit levels by dynamically adapting profit projections to changing market conditions.
Instead of relying on fixed R:R targets or ATR values alone, this indicator uses an internal Efficiency Engine to measure how effectively price is moving and adjusts projected targets accordingly.
As market efficiency strengthens, targets can expand. As efficiency weakens or deteriorates, targets can tighten to help preserve gains and reduce exposure.
Key Features
• Adaptive TP projections based on market efficiency
• SL-based R:R projection mode
• ATR-based projection mode
• Dynamic TP expansion and contraction logic
• Automatic Optimal TP selection (TP1 / TP2 / TP3)
• Local High / Low stop-loss calculation with adjustable buffers
• Optional manual entry price input
• Multiple TP display combinations:
TP1 Only
TP2 Only
TP3 Only
Optimal Only
TP + Optimal combinations
Multi-TP combinations
Show All
• Long and Short trade projections
• Dynamic TP multiplier engine
• Efficiency state analysis:
Improving
Mixed
Worsening
• Live information table showing:
Efficiency Score
Market State
TP Multiplier
Optimal TP
Long SL Distance
Short SL Distance
• Adjustable colors, table placement, text sizing, labels, and projection length
How It Works
The internal Efficiency Engine analyzes recent price behavior by comparing:
• Net directional movement
• Total movement path traveled
• Historical improvement or deterioration in efficiency
A weighted score is generated and translated into a dynamic TP multiplier.
Typical behavior:
Strong efficiency + improving conditions
→ Expand targets
Neutral conditions
→ Hold targets
Weakening efficiency
→ Tighten targets
Weak and deteriorating conditions
→ Exit or reduce exposure
Example Use
A standard 2R target may become:
Strong conditions:
2R → 3R+
Weak conditions:
2R → 1.2R–1.5R
The goal is to align profit expectations with how price is actually behaving instead of assuming all trades deserve identical targets.
Best Used For
• Trend continuation trading
• Breakout strategies
• Intraday trading
• Swing trading
• Futures
• Forex
• Indices
• Crypto
• Stocks
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。