Adaptive Entry/Exit Signals with Optional TP Confirmation

What’s unique
- Gated entry sequencing: Prevents duplicate Long/Short labels within the same move (“lock/unlock”).
- Exit-line visualization tied to prior extremes: Plots step lines showing the exact exit thresholds the logic uses.
- Optional multi-filter confluence: ADX/DI trend check, Chandelier Stop, hold/cooldown rules.
- Optional Take-Profit (TP) confirmation using RSI.
What it does
This indicator highlights six events on the active timeframe:
- Long — potential long entry
- Exit Long — exit condition for an open long
- Long TP — take-profit trigger for a long
- Short — potential short entry
- Exit Short — exit condition for an open short
- Short TP — take-profit trigger for a short
Optionally, it draws dynamic exit lines that mirror the thresholds used by the logic.
How signals are calculated (high level):
Trend bands
- highBand = highest high of the last Trend Window bars
- lowBand = lowest low of the last Trend Window bars
Entries
- Long when price breaks (or equals) the previous bar’s highBand.
- Short when price breaks (or equals) the previous bar’s lowBand.
- Gating:
- Lock/unlock prevents multiple entry labels in one directional move.
- A bar-ordering gate reduces immediate flip-flops.
Exits
- Exit Long = lowest(low, Exit Window)[1]
- Exit Short = highest(high, Exit Window)[1]
- Optional filters can require:
- Close beyond the exit line
- ADX/DI (Average Directional Index/Directional Indicators, Wilder) trend-loss check
- Chandelier Stop (ATR-based) confluence
- Minimum hold time after entry
Take-Profit (optional)
If TP % > 0, the tool computes a TP from the entry bar and confirms with RSI (default: >70 for longs, <20 for shorts).
Exit Lines (optional)
- Plotted as step lines while “in position”:
- Long Exit Line = lowest(low, Exit Window)[1]
- Short Exit Line = highest(high, Exit Window)[1]
Inputs (essentials)
- Trend Window — lookback for high/low bands
- Exit Window — lookback for exit thresholds
- TP % — percent distance from entry to compute TP (0 disables)
- RSI Length / Cutoffs — for TP confirmation
Filters (toggleable)
- Close must cross the exit line
- ADX/DI trend-loss check (Wilder’s method)
- Chandelier Stop (ATR-based) confluence
- Minimum hold bars after entry
- Cooldown bars after exit before re-entry
Visuals
- Show/hide trend bands and exit lines.
Alerts Included
- Long Entry, Short Entry
- Exit Long, Exit Short
- Long TP, Short TP
Tip: For stable behavior, set alerts to Once per bar close.
Notes & Best Practices
- This is an indicator, not a strategy; it does not open/close trades.
- Signals are calculated on the current chart timeframe only (single-timeframe logic).
- Parameter choices are context-dependent. As a starting point:
- Faster charts: consider a slightly larger Exit Window and enable Close must cross to reduce wick exits.
- Slower charts: filters can be relaxed.
Repainting & Data Policy
- No lookahead is used.
- The script does not request higher timeframes for its logic.
- On real-time (in-progress) bars, visuals and alerts can update until the bar closes. For confirmation-style use, wait for bar close and/or use the provided filters (e.g., close-only or 2-bar style confirmation).
Chart Types
- Designed for standard Candlestick/Bar charts.
- Not intended for Heikin Ashi, Renko, Kagi, Point & Figure, or Range charts.
Limitations & Disclosure
- No performance claims are made.Past behavior does not guarantee future results.
- For educational and analytical purposes only; not financial advice. Always do your own research and use risk management.
Version & Scope
- Scope: Entry/Exit/TP framework with optional exit filters and exit-line visualization.
- Engine: Single-timeframe logic (no MTF); Wilder-style ADX/DI implemented internally for portability.
- Pine version: v5
- External libraries: none
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente aitradingsignals.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
📥 Contact me for script access & strategy guides
🎯 Built for momentum, breakout & BTC cycle traders
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente aitradingsignals.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
📥 Contact me for script access & strategy guides
🎯 Built for momentum, breakout & BTC cycle traders