PROTECTED SOURCE SCRIPT

Gap Fill Detector

1 067
The Gap Fill Detector is a visual tool designed to highlight potential price imbalances caused by sudden, sharp movements following periods of low volatility or indecision. These events can often result in "gaps" or "voids" in price action that may later attract a return move — commonly referred to as a gap fill.

This indicator helps traders visually identify these unique conditions and monitor whether price revisits the origin of the move. It does so by marking the location of the price gap and providing a clean, color-coded interface to track price interaction with that level over time.

🔧 Key Features
🔸 Highlight Zones
When the script detects a potential gap-forming move, the background of the triggering candle is highlighted. These areas represent potential moments of price imbalance or sudden breakout behavior.

🔸 Gap Fill Line
A horizontal line is drawn from the close of the candle before the spike (representing the likely gap origin). This line acts as a reference for tracking whether price returns to "fill" the gap. The line is persistent but will automatically hide once price intersects it, or if another gap signal occurs.

🔸 Intelligent Auto-Hide Logic
Once the gap line has been touched by price or interrupted by a new spike event, it is removed from view. This keeps the chart clean and avoids clutter from outdated signals.

🔸 Dynamic Fill Shading
The area between the current price and the gap line is filled with a color-coded visual cue:

🟩 Green Fill: When price is above the gap line — a possible bullish continuation.

🟪 Purple Fill: When price is below the gap line — a potential retracement or bearish correction. Fill transparency is customizable to blend with your chart style.

🔸 Stability Zones (Optional)
Users can optionally enable shaded background zones to mark extended periods of price stagnation. These zones may help identify moments where the market is "winding up" before releasing energy in the form of a fast move.

⚙️ Customization Options
Base highlight color & transparency

Enable/disable stability zone highlighting

Adjustable gap fill area transparency

✅ Use Cases
This tool is ideal for:

Intraday traders seeking gap fills or mean reversion setups

Swing traders identifying sudden breakouts for future re-entry

Visual traders who want a clean, automated way to spot and manage price dislocations

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.