OPEN-SOURCE SCRIPT

FVG + Swings + Configurable

813
Overview
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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.