OPEN-SOURCE SCRIPT

Every Hour 1st/Last FVG vTDL

194
OVERVIEW - Shoutout to Micheal J. Huddleston aka ICT

This indicator identifies the first Fair Value Gap (FVG) that forms within each trading hour, providing traders with potential entry zones, reversal points, and unmitigated gap targets. Based on the concept that the first presented FVG of each hour represents a significant price delivery array where institutional order flow occurred.

The indicator detects FVGs on a lower timeframe (1-minute default) and displays them as boxes on your chart, tracking which gaps get filled and which remain open as potential draw-on-liquidity targets.



WHAT IS A FAIR VALUE GAP

A Fair Value Gap is a 3-candle price pattern representing an imbalance between buyers and sellers:

  • Bullish FVG: Forms when candle 3's low is above candle 1's high, leaving a gap
  • Bearish FVG: Forms when candle 3's high is below candle 1's low, leaving a gap


These gaps often act as magnets for price, which tends to return and "fill" the imbalance before continuing. They function as dynamic support and resistance zones.


KEY FEATURES

Detection Types
  • FVG: Standard fair value gap detection with volume imbalance expansion
  • Suspension FVG Blocks: Requires outside prints on both sides for more refined signals


Hourly Display Modes
  • First Only: Shows whichever FVG appears first each hour (bullish or bearish)
  • Show Both: Shows first bullish AND first bearish FVG independently each hour


Last FVG Tracking
  • Optionally display the last FVG of each hour
  • Useful for comparing how the hour developed
  • Can extend into the next hour for continued tracking


Breakaway Gap Detection
  • Gaps not traded into during their formation hour extend forward
  • Extended gaps display labels showing formation time and date
  • These unmitigated gaps become price targets and reversal zones


Gap Fill Modes
  • Touch Box: Marks filled when price enters the gap
  • Touch Midpoint: Marks filled when price reaches the 50 percent level
  • Fill Completely: Marks filled when price fills the entire gap with visual progress



HOW TO USE

Entry Points

The first FVG of each hour provides potential entry zones based on price reaction:
  • When price returns to an FVG and shows rejection, enter in the direction of rejection
  • The gap zone represents where institutional orders likely reside
  • Use the boundaries of the gap for stop loss placement
  • A clean rejection of the zone confirms it as valid support or resistance


Reversal Points

Unmitigated gaps that extend beyond their formation hour are high-probability reaction zones:
  • Extended boxes with labels indicate unfilled gaps
  • When price finally reaches these zones, expect a reaction
  • The longer a gap remains unfilled, the stronger the expected response
  • These zones act as magnets drawing price back to them


Price Targets

Use unmitigated gaps as draw-on-liquidity targets:
  • Look for extended boxes above or below current price
  • Price tends to seek out and fill imbalances
  • The midpoint line often serves as a minimum target
  • Multiple unfilled gaps in one direction suggest strong momentum potential



FRAMING DIRECTIONAL BIAS

The first presented FVG of each hour acts as a support or resistance zone. The direction of the FVG itself does not determine bias - it is how price reacts to that FVG that reveals the true market intention.

Reading Price Reaction

  • Price respects a bullish FVG as support and bounces higher = bullish bias confirmed
  • Price respects a bearish FVG as resistance and rejects lower = bearish bias confirmed
  • Price fails to hold a bullish FVG and breaks through = potential inversion, look for shorts
  • Price fails to hold a bearish FVG and breaks through = potential inversion, look for longs


Inversion Fair Value Gaps (IFVG)

When price trades through an FVG and closes beyond it, that gap can invert its role:

  • A bullish FVG that fails becomes resistance - use it as a short entry zone
  • A bearish FVG that fails becomes support - use it as a long entry zone
  • The inversion signals a shift in control from one side to the other
  • Watch for price to retest the inverted gap before continuing


Support and Resistance Framework

Think of each hourly first FVG as a key level:

  • Price above the FVG: the gap acts as potential support
  • Price below the FVG: the gap acts as potential resistance
  • Watch how price behaves when it returns to the gap zone
  • A clean rejection confirms the level; a break through signals inversion



SHORT-TERM SCALPING APPLICATION

These FVGs provide scalping opportunities each hour:

  • Identify the first FVG of the hour as your key level
  • Wait for price to trade away from it and return
  • Observe the reaction at the gap zone
  • Enter in the direction of the reaction with tight risk
  • Target the next FVG, midpoint, or nearby liquidity


Trade Management

  • Use the opposite side of the FVG box as your stop loss zone
  • The midpoint of the gap often provides first target or decision point
  • Scale out at nearby unmitigated gaps or key levels
  • If the gap inverts, flip your bias and look for entries in the new direction



MULTI-HOUR CONTEXT

  • If price consistently respects FVGs as support across hours = uptrend context
  • If price consistently respects FVGs as resistance across hours = downtrend context
  • If FVGs keep inverting = choppy or transitional market
  • Use higher timeframe direction to filter which reactions to trade
  • Compare first and last FVG of each hour to see how momentum developed



SESSION FILTERING

The indicator automatically excludes unreliable periods:
  • 4 PM to 5 PM New York time (market close hours 16-17)
  • Weekend closed periods (Saturday and Sunday before 6 PM)


All timestamps use New York timezone for consistency with futures market hours.


SETTINGS GUIDE

Detection Settings

  • Detection Type: Choose between standard FVG or Suspension FVG Blocks
  • Lower Timeframe: 15 seconds, 1 minute, or 5 minutes for gap detection
  • Min FVG Size: Minimum gap size in ticks to filter noise


Display Settings

  • Hourly Display Mode: First Only shows one gap per hour; Show Both shows first bull and bear
  • Show First FVG: Toggle visibility of first FVG boxes
  • Show Last FVG: Toggle visibility of last FVG boxes
  • Show Midpoint Lines: Display the 50 percent level of each gap
  • Show Unfilled Breakaway Gaps: Extend boxes until price fills them
  • Show Only Today: Reduce clutter by hiding older hourly boxes


Gap Fill Detection Mode

  • Touch Box: Gap marked filled when price enters the zone
  • Touch Midpoint: Gap marked filled when price reaches 50 percent level
  • Fill Completely: Gap marked filled only when fully closed, shows visual fill progress


Recommended Settings by Style

  • Scalping: 1 minute LTF, 4 tick minimum, Show Both mode, Touch Box fill
  • Day Trading: 1 minute LTF, 4-8 tick minimum, First Only mode, Touch Midpoint fill
  • Swing Context: 5 minute LTF, Show Unfilled Gaps enabled, Fill Completely mode



COLOR CODING

  • Blue boxes: First bullish FVG of the hour
  • Red boxes: First bearish FVG of the hour
  • Green boxes: Last bullish FVG of the hour
  • Orange boxes: Last bearish FVG of the hour
  • Black midpoint lines: 50 percent level of each gap
  • Filled portion overlay: Shows visual progress in Fill Completely mode


All colors are fully customizable in the settings menu.


PRACTICAL TIPS

  • The first FVG of each hour is a hidden PD array - treat it as a significant level
  • Not every gap produces a tradeable reaction - wait for confirmation
  • Gaps that remain unfilled for multiple hours carry more weight
  • Use the Show Both mode to see both bullish and bearish opportunities each hour
  • When multiple gaps cluster in one zone, that area becomes even more significant
  • Inversions are powerful signals - a failed level often leads to acceleration



NOTES

  • Works on any instrument and timeframe
  • Best used on intraday charts (1 minute to 15 minute) viewing 1 minute LTF gaps
  • Combine with higher timeframe analysis for confluence
  • These are probability zones, not guarantees - always use proper risk management
  • The indicator handles HTF to LTF data fetching automatically

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。