OPEN-SOURCE SCRIPT
Aggiornato Swing Point - VALID/ INVALID

This indicator identifies reliable swing highs and lows by combining structural patterns with momentum confirmation. It first looks for a standard three-candle peak or valley, allowing up to two candles on the right side to form the necessary lower low or higher high. Once the structure forms, it requires a candle body to close beyond the extreme wick of the peak or valley within that same two-candle window. If both conditions are met, it plots a red or green triangle to mark a confirmed swing point; if the structure forms but the momentum close fails, it plots a purple triangle to warn you of a setup that lacked the power to follow through.
Note di rilascio
The Logic: It looks for a classic 3-candle peak or valley, giving the market up to two candles on the right side to complete the structural shape (Condition 1). It then checks if a candle body convincingly closed past that peak/valley's extreme wick within that same two-candle window (Condition 2).The Signals: If both conditions are met, it plots a Red (High) or Green (Low) triangle, marking a high-conviction structural reversal point. If the shape forms but the body close fails, it plots a Purple triangle, warning you of an unconfirmed swing—which often acts as a liquidity trap or a target.
The Engine: It features a dual-rendering system with a built-in toggle. You can either show infinite historical swings for deep backtesting, or flip the toggle to show an exact, strict count (e.g., only the last 20 total swings) using invisible labels to keep your live trading chart completely clutter-free.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.