PROTECTED SOURCE SCRIPT
Mis à jour

TP/SL Dynamic (FIB,ATR,MULTIPLE,PERCENT)

253
TP/SL Dynamic (FIB, ATR, MULTIPLE, PERCENT)

This indicator provides a flexible framework for managing Take Profit (TP) and Stop Loss (SL) levels using multiple calculation schemes. It is designed for traders who want dynamic or rule-based levels that adapt to volatility, market type, and custom input.

The script supports four TP/SL methodologies:

Pro Standards (Auto-Select): Adapts method based on asset type and volatility.

R Multiples: Risk-based reward multiples from ATR-derived stop distance.

Fibonacci R: Fibonacci extension levels projected from recent pivots.

Percent: Fixed percentage distance from entry, adjusted by volatility.

ATR Multiples: ATR-based calculations with configurable multipliers.

Features:

Up to 3 manual entries, each with configurable time, price, and position size.
Weighted entry price calculation across multiple positions.
Single or multiple TP targets (up to 4) with automatic scaling.
Dynamic ATR option: updates SL/TP levels with live volatility or fixes them at entry.
Pivot-based logic for Fibonacci extensions.
Symbol Locking to prevent mismatches between intended pair and chart symbol.
Table display with optional R-multiples, TP/SL values, and entry details.
Visual chart elements: lines, labels, price-scale markers for SL/TP, and zebra-style info tables.
Entry markers (E1, E2, E3) for clarity.
Alerts for TP and SL triggers (both long and short).

How to Use:

Define entry prices, times, and position sizes (up to 3 entries).
Select a TP method (Pro Standards, R Multiples, Fibonacci R, Percent, or ATR Multiples).
Choose single or multiple TP mode.
Optionally enable Dynamic ATR to update levels in real time.
Check the on-chart table for all calculated levels and alerts.

Author & Credit:
Developed from the ground up by me (no external code used outside The Pine public library).
Notes de version
-Adjusted example chart
Notes de version
Update 1.01
-Fixed minor bugs
Notes de version
Update 1.02
-Fixed scaling issue
-Tightened FIB levels
Notes de version
Update 1.03
- Added Dynamic ATR Multiplier: scales ATR-based SL/TP by volatility percentile
- Implemented Adaptive ATR Length: 10 / 21 instead of fixed length
- Added HTF Confirmation: soft widens SL and strict gates outputs vs selected HTF SMA50
- Adjusted Regime-based TP Spacing: widens ladders in trends, tightens in ranges
- Adjusted Volatility-Scaled R Targets: keeps R-multiple targets reachable
- Added Trailing Stop: modes Off/Always/After TP1 with configurable ATR multiple
- Added Fibonacci Golden Zone Ladders: optional 0.382/0.50/0.618/1.0 rungs for Fib R when ordered swings exist
- Implemented Smoother Percent Scheme: curves percent distances by ATR% of price
- Added Kelly Sizing Info: optional half-Kelly suggestion row in table
- Added Multi-TP Alerts: TP1–TP4 alert conditions for long and short targets
Notes de version
Update 1.04
-Overhauled core logic
-Increased calculation complexity to adapt to different market situations
-Added stop-loss hunt–aware system based on liquidity
-Load time increased significantly, but the improvement is worth the wait

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.