OPEN-SOURCE SCRIPT

Gap Zones

83
This TradingView indicator automatically detects daily price gaps and plots them clearly on any timeframe (intraday or daily).
It helps visualize where unfilled gaps are sitting, track whether they’ve been filled, and control how far the zone extends.

Key Features
1. Daily Gap Detection
• Works even when you’re on intraday charts (uses daily OHLC data).
• Marks both gap up (potential support zones) and gap down (potential resistance zones).
2. Shaded Gap Zones
• Each gap is highlighted as a band (greenish for up, reddish for down).
• Option to turn shading off if you just want horizontal lines.
3. Hide When Filled
• Once price closes or touches the far side of the gap, it disappears (configurable: Touch vs Close).
4. Lookback Window
• Gaps only show if they occurred within the past X trading days (default: 30).
• Prevents your chart from being cluttered with ancient gaps.
5. Multiple Gaps Tracked
• Can track up to 5 recent gaps simultaneously.
• Oldest gaps “roll off” as new ones form.
6. Finite Right-Edge Guides
• Optional horizontal guide lines extend to the right, but only for a fixed number of bars (default: 50).
• Cleaner than infinite extensions.
7. Gap-Day Marker
• Optional vertical line drawn on the bar where the gap first occurred.



⚙️ Inputs & Settings

When you apply the indicator, you’ll see these options:
• Lookback (trading days): How far back to scan for gaps (default 30).
• Max gaps to show (1..5): How many simultaneous gap zones to display.
• Min gap size (% of prior close): Filter out tiny gaps (default 0.25%).
• Hide gaps once filled: Removes a gap from the chart once filled.
• Fill rule uses CLOSE (off = Touch):
• Touch = filled when price trades through the level intraday.
• Close = filled only when a candle close crosses it.
• Show shading: Toggle zone fills on/off.
• Show vertical marker on gap day: Toggle gap-day marker line.
• Show finite right-edge lines: Toggle horizontal lines extending right.
• Right line length (bars): How far those lines extend (default 50 bars).



🟢 How to Use It
1. Apply on Any Chart
• Works best on daily or intraday (5m, 15m, 1h).
• Gaps are always calculated from daily data, so intraday charts will show higher-timeframe gaps correctly.
2. Interpret Colors
• Green shading = Gap Up (often acts as support).
• Red shading = Gap Down (often acts as resistance).
3. Watch for Fills
• When price re-enters the gap zone, the indicator checks if it’s “filled” (based on your Touch/Close setting).
• If “Hide When Filled” is on, the zone vanishes.
4. Trade Context
• Many traders use gaps as targets (expecting a fill) or levels of support/resistance.
• Combined with your bull put/bear call spread strategies, it helps confirm strong levels.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.