FVG + Swings + Configurable

This Pine Script v5 indicator highlights Fair Value Gaps (FVGs), plots swing‑high and swing‑low pivots, and marks single breakouts above the last swing‑high or below the last swing‑low by recoloring the breakout candle. Every aspect—gap size, count limits, colors, and feature toggles—is exposed as an input so you can tailor it to your own workflow.
Key Features
Fair Value Gaps
Detects bullish gaps when the high of bar i-2 is below the low of the current bar.
Detects bearish gaps when the low of bar i-2 is above the high of the current bar.
Draws a semi‑transparent rectangle spanning from bar i-2 to bar i + extension.
Automatically deletes oldest boxes when exceeding the user’s “Max FVG Boxes” limit.
Swing‑High / Swing‑Low Pivots
Identifies a swing‑high when the middle candle of a three‑bar sequence has the highest high.
Identifies a swing‑low when the middle candle has the lowest low.
Marks each pivot with a tiny dot above (high) or below (low) the bar.
Single Breakouts
Tracks the most recent swing‑high and swing‑low levels.
On the first close above the last swing‑high (or below the last swing‑low), recolors that single candle.
Prevents repeated coloring until a new swing pivot forms.
Full Customization
Show/Hide toggles for FVGs, swing pivots, breakouts.
Numeric inputs for FVG extension length and maximum retained boxes.
Color pickers for bullish/bearish gaps, swing pivots, and breakout candles.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.