Dynamic Swing Retracement Tracker

Methodology:
Directional Bias Filter: Utilizes two exponential moving averages (configurable periods, default 50 and 200) as a momentum comparison mechanism. When the faster average exceeds the slower average, bullish bias is established; the inverse confirms bearish bias.
Automated Swing Recognition: The script continuously scans for local price extremes using pivot analysis with a user-defined lookback window (default 36 bars). These extremes become anchor points for calculating potential retracement zones.
Geometric Retracement Zones: Between each pair of swing extremes, the script calculates key mathematical ratios (0.5 and 0.618) to identify zones where price is statistically likely to find support or resistance during pullbacks. These zones are used for signal generation but remain invisible on the chart.
Signal Generation Logic:
Long entry signals appear when price retraces into calculated zones during bullish bias conditions
Short entry signals appear when price retraces into zones during bearish bias conditions
All signals require full candle confirmation to eliminate intra-bar noise
A customizable cooldown mechanism prevents signal clustering
Automated Risk Visualization:
Invalidation level (traditionally called "stop loss") placed beyond the most recent swing extreme, with adjustable pip buffer for spread accommodation
Three progressive target zones calculated using geometric extensions (1.618x, 2.0x, and 2.618x multiples of the original swing range)
All price levels displayed as horizontal reference lines spanning 20 bars (10 before, 10 after the signal candle
Technical Implementation:
Swing detection uses TradingView's built-in pivot functions with symmetric lookback
Retracement calculations based on classical golden ratio mathematics
Label positioning dynamically adjusts using Average True Range to maintain visibility across different volatility conditions
All drawing objects are refreshed on each bar to comply with platform object limits
Practical Application:
This tool is designed for traders who want to systematically identify counter-trend entries within established trends. Rather than manually drawing retracement levels, the indicator automates the process and provides immediate visual feedback on potential entry zones with pre-calculated risk and reward parameters.
Customization Options:
Momentum filter periods (default 50/200)
Swing detection sensitivity
Signal spacing controls
Risk buffer adjustment
Individual component visibility toggles
Important Notes:
This indicator does not predict future price movements. It identifies historical swing patterns and mathematically-derived levels based on past price action. All trading decisions should be made in conjunction with proper risk management and market analysis.
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement RB_T.
TradingView ne recommande PAS d'acheter ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez son fonctionnement. Vous pouvez également trouver des alternatives gratuites et open source dans nos scripts communautaires.
Instructions de l'auteur
Learn more: rbtrading.substack.com/p/premium-tradingview-indicators-hub
Clause de non-responsabilité
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement RB_T.
TradingView ne recommande PAS d'acheter ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez son fonctionnement. Vous pouvez également trouver des alternatives gratuites et open source dans nos scripts communautaires.
Instructions de l'auteur
Learn more: rbtrading.substack.com/p/premium-tradingview-indicators-hub