OPEN-SOURCE SCRIPT

Dynamic Take Profit Stop Loss

1 247
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.

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.