Liquidity Edge - HTF FVG Gray Box Matrix

OVERVIEW & PURPOSE
The Multi-Timeframe (MTF) Higher Timeframe Fair Value Gap (HTF FVG) Matrix is an institutional-grade price-action overlay designed to detect, track, and manage macro market imbalances directly on intraday execution charts.
Instead of cluttering execution charts with lower-timeframe micro gaps that frequently fail, this indicator tracks genuine 3-candle imbalance gaps formed on higher timeframes (15-Minute, 1-Hour, and optional 30-Minute/4-Hour) and projects them cleanly onto execution charts (1m, 2m, 3m, 5m). It establishes institutional order-flow context, plots dynamic 50% Consequent Encroachment (CE) equilibrium lines, tracks real-time mitigation lifecycle status, and features an integrated Order Flow Telemetry HUD.
CORE MECHANICS & ALGORITHMIC LOGIC
Pure 3-Candle Imbalance Detection (Strictly No IFVGs) Imbalances are calculated using classic three-bar price geometry: • Bullish FVG: Formed when the low of the third bar is strictly greater than the high of the first bar (Low > High[2]). The imbalance spans from High[2] (bottom of zone) to Low[0] (top of zone). • Bearish FVG: Formed when the high of the third bar is strictly lower than the low of the first bar (High < Low[2]). The imbalance spans from High[0] (bottom of zone) to Low[2] (top of zone). • Noise Filtering: A configurable tick threshold filters micro gaps caused by normal spread variance. • Strict Invalidation (No Inversion FVGs): Violated zones (candle body close through the opposing boundary) are permanently discarded from memory. The engine tracks only genuine, active imbalances.
Non-Repainting Multi-Timeframe Architecture Higher timeframe data is requested using request.security() with strict non-repainting parameters (lookahead_off and gaps_off). Zones appear only after the higher timeframe candle has officially confirmed and closed. Historical forward projections and mitigation tracking strictly begin at the confirmation timestamp (cTime), eliminating retroactive false invalidations.
Confirmation-Safe Mitigation Engine • Untested Active State: Rendered with signature institutional slate gray fill (80% opacity) and bordered edges. • Tested / Tapped State: If price wicks into the zone without closing beyond it, the zone transitions into a ghost-slate state (85% opacity) to signal that resting liquidity has been partially consumed. • Full Invalidation: When a candle body closes beyond the opposing boundary (below a bullish floor or above a bearish ceiling), the zone is permanently removed.
50% Consequent Encroachment (CE) The exact midpoint: (Top + Bottom) / 2 of every active imbalance is calculated and drawn as a dashed reference line. In algorithmic liquidity theory, the 50% CE level represents true equilibrium and frequently acts as dynamic support or resistance.
HOW TO USE & TRADING APPLICATION
• Execution Chart Integration: Apply the indicator to your execution timeframe (1m, 2m, 3m, or 5m). • Higher-Timeframe Order Flow Bias:
Bullish FVGs (Support): Look for lower-timeframe liquidity sweeps into the 15M or 1H gray box. Confluence between the 50% CE line and lower-timeframe market structure often marks high-probability reaction points.
Bearish FVGs (Resistance): Look for rejection patterns when price expands upward into an active overhead 15M or 1H imbalance.
Multi-Timeframe Confluence: When a 15-minute FVG forms directly inside or adjacent to a 1-hour FVG, the area represents high-density imbalance confluence, flagged in real-time by the HUD. • Order Flow Telemetry HUD: The on-chart dashboard reports real-time point distance to the nearest active 15M, 30M, 1H, and 4H zones, displaying directional bias (BULLISH, BEARISH, BULL BIAS, BEAR BIAS, or NEUTRAL).
ORIGINALITY & UNIQUE FEATURES
• Smart Timeframe Hierarchy Engine: Automatically tailors display based on the current chart resolution:
On charts 5 minutes and under: Displays 15M and 1H zones.
On 15-minute charts: Automatically hides 15M zones to eliminate self-timeframe noise and elevates the macro view to 1H and 4H zones. • Smart Anti-Collision Auto-Separation: When a 15M and 1H FVG share concurrent prices, traditional indicators print overlapping text badges. This script includes an automated anti-collision algorithm: 1H zones anchor to the top boundary, while the 15M tag dynamically shifts to the bottom boundary with tiered horizontal staggering, guaranteeing zero badge overlap. • 4 Switchable Aesthetic Modes:
Modern Micro-Pills (Default): High-contrast midnight pill badges (#0F172A) with vibrant timeframe accents (Sky Blue 1H, Crisp White 15M, Amber 4H, Lavender 30M) engineered for visibility on both dark and light chart themes.
On-Line Minimalist: Ultra-clean text centered directly on the border lines of the box near the right edge.
Inside Box Corner: Pinned neatly inside the corner of the gray box.
None: Pure gray boxes and CE lines only.
SETTINGS & CONFIGURATION GUIDE
• Smart Timeframe Filter: Toggles automatic timeframe filtering based on chart resolution. • Show 4H on <=5M Charts: Optional toggle to display macro 4-hour levels on micro execution charts. • Higher Timeframe Toggles: Independent activation for 15M (default ON), 1H (default ON), 30M (optional), and 4H (optional). • Active Zones Memory Per Side (1-4): Sets how many active bullish and bearish zones are retained in memory per timeframe. • Min FVG Size (Ticks): Filters out insignificant micro gaps. • Visual Tag Style: Modern Micro-Pills, On-Line Minimalist, Inside Box Corner, or None. • Tag Text Format: Short (1H / 15M) or Standard (1H FVG / 15M FVG · Tested). • 15M Label Placement: Auto (Anti-Collision), Bottom of Zone, Top of Zone, or 50% CE Midline. • Mitigation Invalidation Rule: Candle body close beyond zone (recommended) or wick touch beyond zone. • HUD Table Position: Top Right, Bottom Right, Top Left, or Bottom Left. • Built-In Alerts: Triggers when entering an active 15M FVG, 1H FVG, or upon multi-timeframe confluence.
TECHNICAL LIMITATIONS & DISCLAIMERS
• Historical Buffer Lookback: Bounded to 1,000 bars with an allocated 3,000-bar buffer (max_bars_back=3000) to maintain high chart responsiveness. Imbalances formed further back are not evaluated. • Non-Repainting Delay: Higher timeframe zones appear only after the corresponding HTF candle confirms and closes (e.g. at the close of the 15-minute or 1-hour bar). • Platform Drawing Limits: Active boxes, lines, and labels are capped at 500 drawing objects in compliance with TradingView limitations. • Analytical Tool Disclaimer: Strictly a technical price-action visualization overlay for market structure analysis. Does not provide automated trade execution, buy/sell recommendations, or financial advice.
The Multi-Timeframe (MTF) Higher Timeframe Fair Value Gap (HTF FVG) Matrix is an institutional-grade price-action overlay designed to detect, track, and manage macro market imbalances directly on intraday execution charts.
Instead of cluttering execution charts with lower-timeframe micro gaps that frequently fail, this indicator tracks genuine 3-candle imbalance gaps formed on higher timeframes (15-Minute, 1-Hour, and optional 30-Minute/4-Hour) and projects them cleanly onto execution charts (1m, 2m, 3m, 5m). It establishes institutional order-flow context, plots dynamic 50% Consequent Encroachment (CE) equilibrium lines, tracks real-time mitigation lifecycle status, and features an integrated Order Flow Telemetry HUD.
CORE MECHANICS & ALGORITHMIC LOGIC
Pure 3-Candle Imbalance Detection (Strictly No IFVGs) Imbalances are calculated using classic three-bar price geometry: • Bullish FVG: Formed when the low of the third bar is strictly greater than the high of the first bar (Low > High[2]). The imbalance spans from High[2] (bottom of zone) to Low[0] (top of zone). • Bearish FVG: Formed when the high of the third bar is strictly lower than the low of the first bar (High < Low[2]). The imbalance spans from High[0] (bottom of zone) to Low[2] (top of zone). • Noise Filtering: A configurable tick threshold filters micro gaps caused by normal spread variance. • Strict Invalidation (No Inversion FVGs): Violated zones (candle body close through the opposing boundary) are permanently discarded from memory. The engine tracks only genuine, active imbalances.
Non-Repainting Multi-Timeframe Architecture Higher timeframe data is requested using request.security() with strict non-repainting parameters (lookahead_off and gaps_off). Zones appear only after the higher timeframe candle has officially confirmed and closed. Historical forward projections and mitigation tracking strictly begin at the confirmation timestamp (cTime), eliminating retroactive false invalidations.
Confirmation-Safe Mitigation Engine • Untested Active State: Rendered with signature institutional slate gray fill (80% opacity) and bordered edges. • Tested / Tapped State: If price wicks into the zone without closing beyond it, the zone transitions into a ghost-slate state (85% opacity) to signal that resting liquidity has been partially consumed. • Full Invalidation: When a candle body closes beyond the opposing boundary (below a bullish floor or above a bearish ceiling), the zone is permanently removed.
50% Consequent Encroachment (CE) The exact midpoint: (Top + Bottom) / 2 of every active imbalance is calculated and drawn as a dashed reference line. In algorithmic liquidity theory, the 50% CE level represents true equilibrium and frequently acts as dynamic support or resistance.
HOW TO USE & TRADING APPLICATION
• Execution Chart Integration: Apply the indicator to your execution timeframe (1m, 2m, 3m, or 5m). • Higher-Timeframe Order Flow Bias:
Bullish FVGs (Support): Look for lower-timeframe liquidity sweeps into the 15M or 1H gray box. Confluence between the 50% CE line and lower-timeframe market structure often marks high-probability reaction points.
Bearish FVGs (Resistance): Look for rejection patterns when price expands upward into an active overhead 15M or 1H imbalance.
Multi-Timeframe Confluence: When a 15-minute FVG forms directly inside or adjacent to a 1-hour FVG, the area represents high-density imbalance confluence, flagged in real-time by the HUD. • Order Flow Telemetry HUD: The on-chart dashboard reports real-time point distance to the nearest active 15M, 30M, 1H, and 4H zones, displaying directional bias (BULLISH, BEARISH, BULL BIAS, BEAR BIAS, or NEUTRAL).
ORIGINALITY & UNIQUE FEATURES
• Smart Timeframe Hierarchy Engine: Automatically tailors display based on the current chart resolution:
On charts 5 minutes and under: Displays 15M and 1H zones.
On 15-minute charts: Automatically hides 15M zones to eliminate self-timeframe noise and elevates the macro view to 1H and 4H zones. • Smart Anti-Collision Auto-Separation: When a 15M and 1H FVG share concurrent prices, traditional indicators print overlapping text badges. This script includes an automated anti-collision algorithm: 1H zones anchor to the top boundary, while the 15M tag dynamically shifts to the bottom boundary with tiered horizontal staggering, guaranteeing zero badge overlap. • 4 Switchable Aesthetic Modes:
Modern Micro-Pills (Default): High-contrast midnight pill badges (#0F172A) with vibrant timeframe accents (Sky Blue 1H, Crisp White 15M, Amber 4H, Lavender 30M) engineered for visibility on both dark and light chart themes.
On-Line Minimalist: Ultra-clean text centered directly on the border lines of the box near the right edge.
Inside Box Corner: Pinned neatly inside the corner of the gray box.
None: Pure gray boxes and CE lines only.
SETTINGS & CONFIGURATION GUIDE
• Smart Timeframe Filter: Toggles automatic timeframe filtering based on chart resolution. • Show 4H on <=5M Charts: Optional toggle to display macro 4-hour levels on micro execution charts. • Higher Timeframe Toggles: Independent activation for 15M (default ON), 1H (default ON), 30M (optional), and 4H (optional). • Active Zones Memory Per Side (1-4): Sets how many active bullish and bearish zones are retained in memory per timeframe. • Min FVG Size (Ticks): Filters out insignificant micro gaps. • Visual Tag Style: Modern Micro-Pills, On-Line Minimalist, Inside Box Corner, or None. • Tag Text Format: Short (1H / 15M) or Standard (1H FVG / 15M FVG · Tested). • 15M Label Placement: Auto (Anti-Collision), Bottom of Zone, Top of Zone, or 50% CE Midline. • Mitigation Invalidation Rule: Candle body close beyond zone (recommended) or wick touch beyond zone. • HUD Table Position: Top Right, Bottom Right, Top Left, or Bottom Left. • Built-In Alerts: Triggers when entering an active 15M FVG, 1H FVG, or upon multi-timeframe confluence.
TECHNICAL LIMITATIONS & DISCLAIMERS
• Historical Buffer Lookback: Bounded to 1,000 bars with an allocated 3,000-bar buffer (max_bars_back=3000) to maintain high chart responsiveness. Imbalances formed further back are not evaluated. • Non-Repainting Delay: Higher timeframe zones appear only after the corresponding HTF candle confirms and closes (e.g. at the close of the 15-minute or 1-hour bar). • Platform Drawing Limits: Active boxes, lines, and labels are capped at 500 drawing objects in compliance with TradingView limitations. • Analytical Tool Disclaimer: Strictly a technical price-action visualization overlay for market structure analysis. Does not provide automated trade execution, buy/sell recommendations, or financial advice.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。