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 que requiere invitación
Solo los usuarios aprobados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor que se indican a continuación o póngase en contacto directamente con RB_T.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Learn more: rbtrading.substack.com/p/premium-tradingview-indicators-hub
Exención de responsabilidad
Script que requiere invitación
Solo los usuarios aprobados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor que se indican a continuación o póngase en contacto directamente con RB_T.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Learn more: rbtrading.substack.com/p/premium-tradingview-indicators-hub