Stratum Depth Profile [JOAT]Stratum Depth Profile
Introduction
The Stratum Depth Profile is an open-source volume profile indicator built in Pine Script v6. It calculates and displays a real-time Volume Profile histogram directly on the price chart, identifying the Point of Control (POC), Value Area High (VAH), Value Area Low (VAL), and classifying price zones as High Volume Nodes (HVN) or Low Volume Nodes (LVN). The indicator separates buying and selling volume within each price level, calculates a context score based on where price sits relative to the profile, and detects institutional signals like POC reclaims, Value Area breakouts, absorption events, and delta imbalances.
Unlike simple volume bars beneath the chart, this indicator maps volume across price levels to show where the most trading activity occurred. The POC represents the price level with the highest traded volume — a natural magnet for price. The Value Area contains the configurable percentage (default 70%) of total volume, defining the range where most participants agreed on value. Price outside the Value Area is in a statistical extreme and tends to revert or accelerate.
Why This Indicator Exists
Volume Profile is one of the most powerful tools in institutional trading, but most implementations on PulseWire either require paid subscriptions, lack delta separation, or do not provide context scoring. This indicator addresses those gaps:
Full Volume Profile Calculation: Bins volume across configurable price levels over a lookback period, producing a true histogram of volume by price
Bull/Bear Delta Separation: Each price level's volume is split into buying volume (close > open candles) and selling volume (close < open candles), revealing who controls each level
POC / VAH / VAL Detection: Automatically identifies the Point of Control and expands outward to find the Value Area boundaries containing the specified percentage of total volume
Context Scoring: A 0-100 score based on price position relative to the profile (above VAH, at POC, below VAL, etc.) combined with SMA alignment, giving a quick read on the current market context
Institutional Signal Detection: POC Reclaim, POC Rejection, VA Breakout, Absorption, Delta Imbalance, and Zone Shift events with anti-overlap cooldowns
HVN/LVN Classification: Identifies which price levels have concentrated volume (support/resistance) versus thin volume (fast-move zones)
How Volume Profile Calculation Works
The indicator divides the price range of the lookback period into a configurable number of rows (default 24). For each bar within the lookback, it determines which price bin the bar's activity falls into and accumulates volume. The calculation separates bullish and bearish volume:
// For each bar in the lookback, assign volume to the appropriate price bin
// Bullish volume: bars where close > open
// Bearish volume: bars where close < open
// POC = price bin with the highest total volume
// Value Area = expand from POC until cumulative volume >= vaPct% of total
The POC is the single price level where the most volume was traded — it acts as a magnet because it represents the price at which the most participants found value. The Value Area expands symmetrically from the POC, adding the next-highest adjacent bins until the specified percentage of total volume is captured.
Bull/Bear Delta at Each Level
What makes this profile unique is the delta separation within each price bin. Instead of just showing total volume, the histogram displays bullish volume (green/teal) and bearish volume (pink/red) side by side at each price level. This reveals:
A POC dominated by buying volume suggests buyers control the key level — bullish bias
A POC dominated by selling volume suggests distribution — bearish bias
VAH with heavy selling indicates resistance with institutional distribution
VAL with heavy buying indicates support with institutional accumulation
Levels where bull and bear volume are roughly equal indicate genuine two-way auction — balanced market
Context Scoring System
The context score (0-100) provides an at-a-glance assessment of the current market state relative to the volume profile:
Price Zone Component: Where price sits relative to POC, VAH, and VAL. Price above VAH or below VAL scores higher (trending/breakout conditions). Price near POC scores for mean-reversion potential.
SMA Alignment Component: Whether the 20, 50, and 200 SMAs are aligned in a trending configuration. Full bull alignment (20 > 50 > 200) or bear alignment adds to the score.
POC Proximity: How close price is to the POC level — useful for identifying mean-reversion opportunities or confirming that price is at a key decision point.
Delta Direction: Whether the current cumulative delta supports the price direction.
Institutional Signals
The indicator detects six types of institutional events, each with anti-overlap cooldowns to prevent label stacking:
POC Reclaim: Price crosses above the POC after being below it — indicates buyers are reclaiming the most-traded level, often a bullish continuation signal
POC Rejection: Price approaches the POC and reverses away — the POC is acting as resistance or support
VA Breakout: Price closes outside the Value Area — a statistical extreme that often leads to trend continuation or a sharp reversion
Absorption: High volume with small price range (Wyckoff Effort vs Result) — institutional orders are being filled without moving price, often preceding a directional move
Delta Imbalance: The buy/sell volume ratio at the current level is heavily skewed, indicating one-sided institutional flow
Zone Shift: The Value Area boundaries shift significantly between profile recalculations, indicating a change in the accepted value range
Visual Design
The indicator uses a "Midnight Neon" color theme with electric blues, hot pinks, neon violets, and lime accents on a dark background:
VP Histogram: Horizontal bars drawn as boxes, with bull volume in neon teal and bear volume in hot pink. A sin-based gradient provides smooth color transitions across the histogram.
POC Line: Bright electric blue line at the highest-volume price level, with a label showing the exact price
VAH/VAL Lines: Neon violet lines marking the Value Area boundaries
SMA Lines: 20/50/200 SMAs with neon glow effect for trend context
Signal Labels: Color-coded labels for each institutional signal type with cooldown-based anti-overlap
Context Score: Displayed in the HUD with color coding (green for high scores, amber for moderate, red for low)
HUD Dashboard
The real-time HUD displays key metrics:
POC price level and proximity state (At POC, Near POC, Away)
VAH and VAL price levels with current zone (Above VA, In VA, Below VA)
Context Score (0-100) with color coding
POC Delta direction (Buyers/Sellers/Balanced)
Current Delta value and direction
Effort/Result ratio (Wyckoff absorption detection)
SMA Alignment state (Bull Aligned, Bear Aligned, Mixed)
Volume Ratio (current vs 20-bar average)
Imbalance classification
Input Parameters
Volume Profile:
Lookback (bars): Number of bars to calculate the profile over (default: 100)
Price Levels: Number of horizontal bins to divide the price range into (default: 24)
Value Area %: Percentage of total volume to include in the Value Area (default: 70%)
Display:
Display Mode: Full (histogram + lines), Minimal (lines only), or Off
Histogram Width: How many bars wide the histogram extends (default: 12)
Show SMA Lines: Toggle 20/50/200 SMA overlay
Show Signals: Toggle institutional signal labels
Signal Cooldown: Minimum bars between signals (default: 5)
Show HUD Panel: Toggle the information dashboard
How to Use This Indicator
Step 1: Identify the Value Area
The area between VAH and VAL represents where 70% of volume was traded. Price inside this range is in "fair value." Price outside is in a statistical extreme.
Step 2: Watch the POC
The POC is the strongest magnet on the chart. If price is away from the POC, expect a pull back toward it unless strong momentum keeps price moving. If price is at the POC, watch for a directional break.
Step 3: Read the Delta
Check whether the POC is buyer-dominated or seller-dominated. A buyer-dominated POC in a bullish SMA alignment is a strong confluence for longs. A seller-dominated POC with bearish alignment favors shorts.
Step 4: Use Signals for Timing
POC Reclaim and VA Breakout signals provide timing for entries. Absorption signals warn that a move is being loaded. Delta Imbalance confirms directional conviction.
Step 5: Context Score for Quick Assessment
A context score above 70 suggests strong directional conditions. Below 30 suggests choppy or mean-reverting conditions. Use this to decide whether to trade aggressively or wait.
Best Practices
Volume Profile is most meaningful on instruments with reliable volume data — major forex pairs, large-cap equities, crypto majors
The lookback period should match your trading timeframe. Day traders might use 50-100 bars on a 5-minute chart. Swing traders might use 100-200 bars on a 1-hour chart.
More price levels (rows) give finer resolution but can make the histogram harder to read. 20-30 rows is a good balance.
The POC is not a guaranteed support/resistance level — it is a probability zone. Use it with other confluence factors.
VA Breakouts can be false. Confirm with volume and momentum before trading a breakout above VAH or below VAL.
The delta separation is estimated from candle direction (close vs open), which is an approximation. True tick-level delta requires exchange data not available in Pine Script.
During low-volume periods, the profile may be less representative of true institutional positioning.
Limitations
Volume Profile calculation is computationally intensive. Very large lookback periods (500+ bars) with many price levels may slow chart loading.
The profile is recalculated on each bar, so the POC and VA boundaries can shift as new volume data arrives. This is by design — the profile reflects the most current volume distribution.
Buy/sell volume separation uses candle direction as a proxy, not actual order flow data. This is the standard approximation available in Pine Script.
The indicator draws boxes for the histogram, which counts against PulseWire's drawing object limits. The max_boxes_count is set to 500.
On instruments with inconsistent volume reporting (some forex brokers, illiquid stocks), the profile may not accurately represent true volume distribution.
The context score is a heuristic, not a statistical model. It provides a useful summary but should not be the sole basis for trading decisions.
Technical Implementation
Built with Pine Script v6 using:
Custom volume profile calculation with configurable resolution and lookback
Bull/bear volume separation at each price bin
Value Area expansion algorithm (symmetric outward from POC)
Pre-allocated drawing objects updated via set() methods for performance
Sin-based gradient coloring for smooth histogram visual transitions
barstate.isconfirmed gating on all signal generation
Anti-overlap cooldown system for institutional signals
SMA alignment scoring integrated with profile-based context
Alert conditions for POC Reclaim, VA Breakout, Absorption, Delta Imbalance, and Zone Shift
Originality Statement
This indicator is original in its integration of volume profile analysis with institutional signal detection and context scoring. While volume profile calculation is a known concept, this indicator is justified because:
It combines VP histogram visualization with real-time bull/bear delta separation at each price level, revealing who controls each zone
The context scoring system synthesizes price position, SMA alignment, POC proximity, and delta direction into a single actionable metric
Institutional signal detection (POC Reclaim, Absorption, Delta Imbalance) is derived directly from the volume profile data rather than being a separate overlay
The sin-based gradient coloring and Midnight Neon theme provide clear visual hierarchy without the visual noise common in VP indicators
Pre-allocated drawing objects with set() updates provide significantly better performance than creating/deleting objects each bar
The HVN/LVN classification helps traders quickly identify where price will find support/resistance versus where it will move quickly
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Volume Profile analysis shows where volume was traded historically — it does not predict where price will go. The POC, VAH, and VAL are probability zones, not certainties. Past volume distributions do not guarantee future price behavior. Always use proper risk management and never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made by officialjackofalltrades
Indicator

Orderflow Synthesis Pro [JOAT]Orderflow Synthesis Pro
Introduction
The Orderflow Synthesis Pro is an advanced open-source institutional orderflow analysis indicator that combines Order Block detection, Fair Value Gap identification, Liquidity Pool mapping, and Premium/Discount Array analysis into a unified multi-dimensional flow system. This indicator helps traders identify where institutional money is positioning by analyzing price imbalances, supply/demand zones, and value arrays across the market structure.
Unlike basic support/resistance indicators that simply mark levels, this system dissects orderflow into actionable intelligence: Order Blocks reveal where institutions accumulated or distributed positions, Fair Value Gaps expose price inefficiencies that often get filled, Liquidity Pools identify where stop hunts occur, and Premium/Discount Arrays show whether price is trading at value or extremes. The indicator is designed for traders who understand that institutional footprints can be detected through systematic orderflow analysis.
Why This Indicator Exists
This indicator addresses a critical gap in retail trading: the ability to see institutional orderflow in real-time. Institutional traders leave detectable footprints through their large orders that create specific price patterns. By combining multiple orderflow methodologies, this indicator reveals:
Order Blocks: Last opposing candle before strong directional moves - marks institutional accumulation/distribution zones
Fair Value Gaps: Three-candle price imbalances where price moved too fast, leaving inefficiencies that often get filled
Liquidity Pools: Equal highs and lows where retail stops cluster - prime targets for institutional sweeps
Premium/Discount Arrays: Value zones showing whether price is expensive (premium) or cheap (discount) relative to range
Breaker Blocks: Failed Order Blocks that reverse - signal institutional trap or change in sentiment
Mitigation Blocks: Price returning to Order Blocks for retests - optimal entry opportunities
Each component provides a different lens on institutional behavior. Order Blocks show positioning, Fair Value Gaps show inefficiencies, Liquidity Pools show manipulation targets, and Value Arrays show context. Together, they create a comprehensive view of smart money activity.
Core Components Explained
1. Order Block Detection
Order Blocks represent the last opposing candle before a strong directional move. They mark zones where institutions placed large orders:
// Bullish Order Block: Last bearish candle before strong bullish move
bullishOB = close < open and close > open and
(high - low) > atr * 1.5 and
volume > avgVol * 1.3
The indicator identifies Order Blocks using three criteria:
Candle direction reversal (bearish to bullish or vice versa)
Strong momentum (candle range exceeds ATR threshold)
Volume confirmation (volume exceeds average by multiplier)
Each Order Block displays with a dark box, glowing border, and equilibrium line through the middle (50% level). Strength classification labels blocks as "STRONG" when volume exceeds 1.8x average. Order Blocks remain active until price closes through them (mitigation), at which point they're removed.
2. Fair Value Gap Analysis
Fair Value Gaps (FVGs) occur when price moves so fast that it leaves an imbalance - a gap between three consecutive candles:
// Bullish FVG: Current low > 2 candles ago high
bullishFVG = low > high
fvgSize = (low - high ) / high * 100
FVGs represent price inefficiencies where one side overwhelmed the other. The indicator:
Detects gaps with minimum size threshold (default 0.3%)
Draws semi-transparent boxes marking the imbalance zone
Tracks up to 15 active gaps simultaneously
Auto-removes gaps when price fills them (closes within the zone)
Institutions often return to fill these gaps, making them high-probability reversal or continuation zones depending on context.
3. Liquidity Pool Mapping
Liquidity Pools form at equal highs and lows where retail traders cluster their stop losses. Institutions target these zones to trigger stops before reversing:
The indicator identifies equal highs/lows using pivot detection with tolerance:
Detects swing highs and lows using configurable lookback
Compares pivots to find equal levels within tolerance percentage
Marks zones with thick horizontal lines and labels
Displays "SELL LIQ" above equal highs, "BUY LIQ" below equal lows
When price sweeps these levels and reverses, it signals institutional liquidity grab - often preceding significant moves in the opposite direction.
4. Premium/Discount Arrays
Premium/Discount Arrays classify price position relative to recent range, showing whether price is expensive or cheap:
rangeHigh = ta.highest(high, 50)
rangeLow = ta.lowest(low, 50)
rangeEQ = (rangeHigh + rangeLow) / 2
inPremium = close > rangeEQ and close > (rangeEQ + (rangeHigh - rangeEQ) * 0.5)
inDiscount = close < rangeEQ and close < (rangeEQ - (rangeEQ - rangeLow) * 0.5)
The indicator displays:
Multi-gradient background (red/orange in premium, cyan/green in discount)
Glowing iridescent equilibrium line with pulsing effect
Fibonacci-style levels at 75%, 50%, 25% of range
Dynamic adjustment as range evolves
Institutional traders typically buy in discount zones and sell in premium zones. This provides directional bias for entries.
5. Breaker Blocks
Breaker Blocks occur when an Order Block gets broken and price reverses. They signal failed institutional positioning or traps:
When a bullish Order Block breaks to the downside, it becomes a bearish Breaker Block. When a bearish Order Block breaks to the upside, it becomes a bullish Breaker Block. The indicator marks these with dotted boxes and "BREAKER" labels, showing zones where sentiment shifted.
6. Mitigation Blocks
Mitigation occurs when price returns to an Order Block for a retest. These provide optimal entry opportunities with defined risk:
The indicator marks mitigation with small "MIT" labels when price touches an active Order Block and shows rejection (bullish candle at bullish OB, bearish candle at bearish OB). This confirms the zone is holding and institutions are defending it.
Visual Elements
Order Block Boxes: Dark fill with glowing neon borders (cyan for bullish, magenta for bearish)
Equilibrium Lines: Dashed lines through Order Block midpoints
Fair Value Gap Boxes: Semi-transparent fills (green for bullish, red for bearish)
Liquidity Lines: Thick horizontal lines at equal highs/lows
Premium/Discount Background: Multi-color gradient showing value zones
Equilibrium Glow: Multi-layer iridescent line with pulsing effect
Gradient Candles: Optional candle coloring based on strength and context
Dashboard: Real-time metrics showing active zones and confluence
The dashboard displays 8 key metrics:
1. Confluence Level (Extreme/Strong/Moderate/Weak)
2. Active Order Blocks count
3. Open Imbalance Zones (FVGs)
4. Liquidity Pool count
5. Value Array position (Premium/Discount/Equilibrium)
6. Flow State (Explosive/Active/Dormant)
7. Signal Quality score (0-100)
Input Parameters
Order Block Detection:
Lookback Period: Bars to analyze for OB formation (default: 20)
Volume Multiplier: Threshold for volume confirmation (default: 1.3)
ATR Multiplier: Threshold for momentum confirmation (default: 1.5)
Maximum Active Blocks: Limit displayed OBs (default: 8)
Strength Classification: Enable/disable strength labels
Fair Value Gaps:
Minimum Gap Size: Percentage threshold for FVG detection (default: 0.3%)
Maximum Active Gaps: Limit displayed FVGs (default: 15)
Auto-Fill Detection: Remove gaps when filled
Quality Filter: All/Strong Only/Extreme Only
Liquidity Analysis:
Swing Detection Length: Pivot lookback for equal highs/lows (default: 5)
Level Tolerance: Percentage range for "equal" levels (default: 0.15%)
Show Sweep Markers: Display liquidity grab boxes
Volume Confirmation: Require volume spike for liquidity zones
Premium/Discount Arrays:
Array Lookback Period: Range calculation period (default: 50)
Fibonacci Levels: Show 75%/50%/25% levels
Dynamic Equilibrium: Adjust EQ line in real-time
Advanced Orderflow:
Volume Imbalance: Mark high-volume candles
Breaker Blocks: Show failed Order Blocks
Mitigation Blocks: Mark OB retests
Gradient Candles: Color candles by strength
How to Use This Indicator
Step 1: Identify Value Context
Check the Premium/Discount Array background. Look for entries in discount zones for longs, premium zones for shorts. The equilibrium line shows fair value.
Step 2: Locate Order Blocks
Find active Order Blocks in your direction. Bullish OBs in discount = high-probability long zones. Bearish OBs in premium = high-probability short zones.
Step 3: Watch for Fair Value Gaps
FVGs often get filled. When price approaches an FVG in your direction, prepare for potential retest entry. FVG + Order Block confluence = strongest setups.
Step 4: Monitor Liquidity Pools
Equal highs/lows are magnets for price. Expect sweeps before reversals. When price takes liquidity and shows rejection, it signals institutional positioning complete.
Step 5: Confirm with Mitigation
Wait for price to return to Order Blocks (mitigation). Enter on rejection candles at OB equilibrium lines with stops below/above the block.
Step 6: Check Confluence Score
Dashboard shows confluence level. Extreme/Strong = high-probability setups. Multiple components aligning (OB + FVG + Liquidity + Value Zone) = best entries.
Best Practices
Use on liquid instruments (major forex, large-cap stocks, major crypto) for reliable signals
Combine with higher timeframe bias - trade in direction of HTF structure
Order Blocks work best at key levels - look for OBs near support/resistance
FVG fills don't always happen immediately - be patient
Liquidity sweeps often happen at session opens (London/New York)
Premium/Discount context is critical - don't buy premium or sell discount
Breaker Blocks signal trend changes - respect them
Volume imbalance + Order Block = strongest zones
Multiple mitigation attempts weaken Order Blocks
Indicator Limitations
Orderflow analysis works best on trending markets with clear structure
Choppy, low-volume conditions produce unreliable signals
Order Blocks can fail - always use stop losses
Fair Value Gaps may not fill immediately or at all in strong trends
Liquidity sweeps can extend further than expected (stop hunts)
Premium/Discount zones are relative - not absolute support/resistance
The indicator shows where institutions likely positioned, not guaranteed future direction
Multiple Order Blocks can create conflicting signals - use confluence
Breaker Blocks require confirmation - don't trade the break alone
Technical Implementation
Built with Pine Script v6 using:
Custom Order Block detection with volume and ATR filters
Three-candle Fair Value Gap calculations
Pivot-based liquidity pool identification with tolerance
Dynamic Premium/Discount Array with gradient visualization
Breaker Block detection through OB invalidation tracking
Mitigation Block confirmation with candle pattern recognition
Real-time confluence scoring system
Advanced gradient color schemes with iridescent effects
Comprehensive dashboard with 8 real-time metrics
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its comprehensive integration approach. While individual components (Order Blocks, Fair Value Gaps, Liquidity Pools, Premium/Discount) are established ICT concepts, this indicator is justified because:
It synthesizes four distinct orderflow methodologies into a unified system with confluence scoring
The Breaker Block detection provides failed Order Block analysis not available in standard OB indicators
Mitigation Block tracking combines OB retests with candle pattern confirmation for entry precision
The Premium/Discount Array uses multi-gradient visualization with iridescent equilibrium lines
Volume imbalance integration adds confirmation layer to all components
The confluence scoring system quantifies setup quality across all orderflow elements
Real-time dashboard presents 8 metrics simultaneously for holistic orderflow analysis
Each component contributes unique information: Order Blocks show positioning, Fair Value Gaps show inefficiencies, Liquidity Pools show manipulation, Premium/Discount shows context, Breakers show failures, and Mitigation shows retests. The indicator's value lies in presenting these complementary perspectives simultaneously with unified classification and visual hierarchy.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Orderflow analysis is a tool for understanding market dynamics, not a crystal ball for predicting future price movement. Order Blocks do not guarantee reversals. Fair Value Gaps may not fill. Liquidity sweeps can fail. Past orderflow patterns do not guarantee future orderflow patterns. Market conditions change, and strategies that worked historically may not work in the future.
The zones displayed are analytical constructs based on current market data, not predictions of future price movement. High confluence scores do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Fibonacci Imbalance Zones [JOAT]Fibonacci Imbalance Zones
Introduction
Fibonacci Imbalance Zones is an open-source overlay indicator that merges automatic Fibonacci retracement with Fair Value Gap (FVG) detection and order block identification to find high-probability confluence zones where institutional concepts overlap. When a Fibonacci level aligns with an unmitigated FVG or an active order block, the indicator highlights that zone as a confluence point and optionally generates entry signals. It bridges the gap between classical Fibonacci analysis and modern Smart Money Concepts.
Built with Pine Script v6, the indicator uses custom types for Fibonacci levels, FVG zones, confluence points, swing points, order blocks, and institutional levels.
Why This Indicator Exists
Fibonacci retracement and FVG analysis are both widely used, but they are almost always applied as separate tools. Traders manually eyeball whether a Fibonacci level happens to overlap with an FVG, which is subjective and error-prone. This indicator automates that process by:
Auto-Fibonacci calculation: Automatically identifies the most recent significant swing high and swing low using pivot detection, then draws Fibonacci levels between them — no manual drawing required
FVG lifecycle tracking: Detects bullish and bearish FVGs, filters them by minimum size (ATR-based), tracks mitigation, and classifies them as premium or discount relative to fair value
Confluence detection: Programmatically checks whether any active Fibonacci level falls within a configurable ATR tolerance of any unmitigated FVG or order block, and calculates a confluence strength score
Entry signal generation: When price enters an FVG zone that overlaps with a key Fibonacci level (0.500-0.786 range), the indicator generates a directional entry signal
Core Components Explained
1. Automatic Fibonacci Levels
The indicator uses pivot detection to find the most significant recent swing high and swing low. The pivot strength parameter (default 5) controls how many bars on each side must be lower/higher for a point to qualify as a swing. Once swings are identified, Fibonacci levels are calculated:
calcFibLevel(float swingH, float swingL, float ratio, int direction) =>
float level = na
if direction > 0
level := swingL + (swingH - swingL) * ratio
else
level := swingH - (swingH - swingL) * ratio
level
Standard levels include 0.236, 0.382, 0.500, 0.618, and 0.786, each toggleable independently. Extensions at 1.618 and 2.272 are also available. When harmonic ratios are enabled, additional levels at 0.127, 0.414, 0.707, and 0.886 are drawn, covering the full spectrum of Fibonacci and harmonic trading levels.
Each level is drawn as a dashed line extending from the swing range to the right of the chart, with a label showing the ratio. Harmonic ratios receive a glow effect (thicker line, lower transparency) to visually distinguish them from standard levels.
2. FVG Detection with Premium/Discount Classification
Fair Value Gaps are detected using the standard three-bar pattern: a bullish FVG forms when the current bar's low is above the high from two bars ago. The indicator filters FVGs by a minimum size threshold (default 0.3x ATR) to avoid plotting insignificant gaps.
Each FVG is classified as premium or discount relative to the fair value of the middle candle:
Premium FVG: The gap's midpoint is above fair value — sellers may have an edge
Discount FVG: The gap's midpoint is below fair value — buyers may have an edge
FVGs are drawn as colored boxes. Premium FVGs use a gold color, discount FVGs use cyan, and neutral FVGs use the standard bull/bear colors. When mitigation tracking is enabled, the indicator monitors each FVG and updates its visual style (dotted border, faded color) when price fills the gap's midpoint.
Chart showing auto-drawn Fibonacci levels between swing high and swing low, with FVG boxes classified as premium (gold) and discount (cyan), and confluence diamonds where Fibonacci levels overlap with FVGs
3. Order Block Detection
The indicator identifies order blocks as the last opposing candle before a significant swing point, filtered by volume. A bullish order block is the last bearish candle before a swing high, but only if the volume on that candle exceeds 1.5x the 20-period volume average. This volume filter ensures that only institutionally significant order blocks are tracked.
Order blocks are drawn as semi-transparent boxes and monitored for sweeps. When price breaks through an order block, it is marked as swept and its visual is updated to a neutral, dotted style.
4. Confluence Detection Engine
The confluence engine is the core innovation of this indicator. It iterates through all active Fibonacci levels and checks each one against all unmitigated FVGs and active order blocks:
tolerance = atrVal * confluenceTol
for fib in fibLevels
if fib.isActive
for fvg in fvgZones
if not fvg.isMitigated
if math.abs(fib.price - fvg.mid) < tolerance
confStrength += 1
Each confluence point receives a strength score based on how many factors align:
Fibonacci level + FVG = base confluence
Add +1 if the Fibonacci level is a harmonic ratio (0.382, 0.618, etc.)
Add +1 if the FVG is in the premium or discount zone
Add +1 if the FVG has above-average volume
Add +1 if an order block also overlaps
Confluence points are drawn as labeled boxes showing which factors are present (e.g., "Harmonic+Discount+Volume"). A minimum confluence strength threshold (default 2) filters out weak confluences.
5. Entry Signal Generation
When entry signals are enabled, the indicator generates a bullish entry when price enters a bullish FVG zone that overlaps with a Fibonacci level in the 0.500-0.786 range (the "golden pocket") and the current candle closes bullish. The bearish entry is the inverse. These signals are plotted as circles below (bullish) or above (bearish) the price bars.
Visual Elements
Fibonacci Lines: Dashed lines at each active ratio with labels, harmonic ratios get glow effect
FVG Boxes: Color-coded by direction and premium/discount status, updated on mitigation
Order Block Boxes: Semi-transparent boxes with sweep tracking
Confluence Boxes: Highlighted zones where Fibonacci and FVG/OB overlap, with strength labels
Entry Signals: Circle markers for bullish/bearish entries at confluence zones
Structure Line: Line connecting the swing high and swing low
Background Coloring: Subtle trend-direction background tint
Dashboard: Displays current Fibonacci range, trend direction, active FVG count, confluence count, and entry status
Input Parameters
Fibonacci Settings:
Swing Lookback (default 50) and Pivot Strength (default 5)
Toggle each standard level (0.236, 0.382, 0.500, 0.618, 0.786) and extensions
FVG Detection:
FVG Max Age (default 50 bars)
Track Mitigation toggle
Min FVG Size (default 0.3 ATR)
Confluence Settings:
Confluence Tolerance (default 0.3 ATR)
Show Entry Signals and Confluence Strength
Min Confluence Strength (default 2)
Advanced Fibonacci:
Show Harmonic Ratios (0.127, 0.414, 0.707, 0.886)
Show Institutional Levels (volume-based levels near swings)
Show Smart Money Concepts and Order Blocks
Show Premium/Discount classification
Visual Settings:
Color Scheme: Quantum, Classic, Professional, or Minimal
Show Structure Lines, Dashboard, Glow Effects, Animation
Max Visual Elements (default 30)
How to Use This Indicator
Step 1: Let the indicator automatically identify the current swing range and draw Fibonacci levels. The structure line shows the swing high to swing low connection.
Step 2: Identify the trend direction from the structure line. In an uptrend (swing low formed after swing high), look for bullish setups at discount Fibonacci levels (0.618, 0.786). In a downtrend, look for bearish setups at premium levels.
Step 3: Watch for confluence diamonds. When a Fibonacci level overlaps with an unmitigated FVG, the confluence box appears. Higher strength confluences (3+) are more significant.
Step 4: If entry signals are enabled, wait for price to enter the confluence zone and print a confirming candle (bullish close for longs, bearish close for shorts).
Step 5: Use order blocks within the confluence zone as precise entry levels. The order block's range provides a natural stop-loss area (below the OB for longs, above for shorts).
Close-up of a high-strength confluence zone showing a 0.618 Fibonacci level overlapping with a discount FVG and a bullish order block, with an entry signal circle below the bar
Indicator Limitations
Automatic Fibonacci levels depend on pivot detection, which has an inherent delay. The swing points update only after the pivot is confirmed.
Fibonacci levels are drawn between the two most recent significant swings. In choppy markets with many equal swings, the selected range may not be the most relevant one.
FVG detection uses the standard three-bar pattern, which can produce many gaps on volatile instruments. Use the minimum size filter to manage this.
Confluence detection is proximity-based. A Fibonacci level near an FVG does not guarantee a price reaction — it identifies a zone of potential interest.
Entry signals are mechanical and do not account for broader market context. They should be used as alerts for further analysis, not as standalone trade triggers.
The indicator draws many visual elements. On busy charts, consider using the Max Visual Elements setting and disabling less critical features.
Originality Statement
This indicator is original in its automated confluence detection between Fibonacci analysis and Smart Money Concepts. While Fibonacci tools and FVG indicators exist separately, this indicator is justified because:
It programmatically detects overlap between Fibonacci levels and FVG zones, eliminating subjective visual assessment
The confluence strength scoring system quantifies how many institutional factors align at each zone
Premium/discount FVG classification adds a fair-value context layer to standard FVG detection
Volume-filtered order block detection integrated with Fibonacci levels creates a three-way confluence system
Harmonic ratio support extends beyond standard Fibonacci to cover the full spectrum of institutional trading levels
The entry signal system combines Fibonacci position, FVG presence, and candle confirmation into a structured trigger
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Fibonacci levels and FVG analysis are interpretive tools, not predictive guarantees. Always use proper risk management. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Volume Flow Analysis [UAlgo]Volume Flow Analysis is a price mapped volume study that distributes historical activity across price levels and separates that activity into directional pressure, stealth style movement, imbalance zones, absorption zones, Point of Control, Value Area, and profile shape. Instead of reading volume only bar by bar, the script converts a rolling section of chart history into a horizontal market map where each price level receives its own buy pressure, sell pressure, and movement efficiency profile.
The script works on the latest bar and rebuilds the full map from a rolling historical window. That window can either use the full user selected lookback or a shorter effective depth when decay is enabled. This gives more recent bars a stronger influence while older bars gradually lose weight. The result is a profile that can behave either like a stable historical map or like a more adaptive flow view depending on the selected decay factor.
Inside each price bucket, the script estimates directional pressure by splitting volume into buy side and sell side portions based on where price closed inside the bar range. It then distributes those portions across all buckets touched by the bar using proportional overlap. At the same time, it builds a separate stealth flow style measure based on range per unit of volume, which acts as a proxy for how much price movement occurred relative to participation.
From there, the script identifies the Point of Control, expands outward to build the seventy percent Value Area, classifies the overall profile shape, highlights extreme buy or sell imbalances, detects absorption style conditions, and optionally extends those key zones across the historical range. A legend table summarizes the active state of the map so the user can read the distribution quickly.
In practical use, Volume Flow Analysis is useful for studying where participation concentrated, where directional pressure was strongest, where flow became unbalanced, and whether the profile currently resembles a balanced, short covering, long liquidation, or double distribution structure.
🔹 Features
🔸 Price Bucket Volume Mapping
The script divides the active price range into user defined buckets and allocates volume into those levels according to actual price overlap. This creates a true horizontal flow map instead of a simple vertical volume display.
🔸 Buy Pressure and Sell Pressure Separation
Each price bucket stores both estimated buy side volume and estimated sell side volume. These two components are then drawn side by side so the user can see which side dominated each price level.
🔸 Decay Weighted Historical Memory
Older bars can gradually lose influence through the decay factor. This lets the profile emphasize fresher activity while still preserving historical structure.
🔸 Stealth Flow Layer
The script includes an additional stealth flow style metric based on range relative to volume. This highlights zones where price moved efficiently with relatively less participation.
🔸 Point of Control and Value Area
The indicator automatically finds the highest volume bucket as the Point of Control and expands from that level until seventy percent of total volume is captured to form the Value Area.
🔸 Imbalance Detection
Price levels with one sided pressure above the selected imbalance ratio are highlighted as buy or sell imbalance zones. These can also be extended across the profile range.
🔸 Absorption Detection
Buckets with unusually high total volume but unusually low stealth flow are marked as absorption. This can suggest heavy participation with reduced price efficiency.
🔸 Profile Shape Classification
The script classifies the overall profile as D shape, B shape, P shape, or b shape using the distribution of volume across the upper, middle, and lower thirds of the profile.
🔸 Range Box and Historical Scope Label
A dashed range box shows the active calculation window and displays the effective number of bars used in the current map.
🔸 Built In Legend and Summary Table
A table in the lower right corner explains the map colors and also reports the current buy sell balance, profile shape, and whether imbalance or absorption layers are active.
🔹 Calculations
1) Determining the Effective Historical Window
int nCalc = i_decay == 1.0 ? i_lookback : int(math.ceil(math.log(0.01) / math.log(i_decay)))
int N = math.max(1, math.min(nCalc, i_lookback))
N := math.min(N, bar_index)
This is the first major step of the script.
If decay is set to 1.0, the script simply uses the full user selected lookback.
If decay is below 1.0, the script solves for how many bars are needed until the decay weight falls to roughly one percent of its original value. That value becomes the effective calculation depth.
Then the script clamps that depth so it never exceeds the lookback input and never exceeds available chart history.
So the map can behave in two different ways:
a full fixed history profile,
or a dynamically shortened profile where older bars become practically irrelevant.
2) Finding the Active Price Range and Bucket Size
float pH = high
float pL = low
for i = 0 to N - 1
pH := math.max(pH, high )
pL := math.min(pL, low )
float bSz = (pH - pL) / i_buckets
This block establishes the vertical bounds of the map.
The script scans the effective historical window and finds the highest price and lowest price inside it. Then it divides that full range by the selected number of price levels.
The result is the bucket size, which determines the height of every price cell in the flow map.
So the whole analysis space is always defined by the actual recent trading range rather than by arbitrary static levels.
3) Initializing Buy, Sell, and Stealth Arrays
array bVol = array.new(i_buckets, 0.0)
array sVol = array.new(i_buckets, 0.0)
array stV = array.new(i_buckets, 0.0)
These three arrays are the main storage layer of the profile.
bVol stores buy pressure per bucket.
sVol stores sell pressure per bucket.
stV stores the stealth flow style metric per bucket.
As each historical bar is processed, its weighted contribution is distributed into these arrays according to price overlap.
So the script is building three parallel price maps at the same time.
4) Splitting Each Bar Into Buy and Sell Pressure
float b_v = rng == 0 ? (v_i / 2) : (v_i * (c_i - l_i) / rng)
float s_v = v_i - b_v
This is the directional volume model.
If a bar has zero range, volume is split evenly between buy side and sell side.
Otherwise, the script estimates buy pressure from where the close sits inside the bar range. A close nearer the high gives more weight to buy pressure. A close nearer the low gives less weight to buy pressure. Sell pressure is simply the remainder.
This is not exchange level aggressor data, but it is a practical price location based estimate of directional pressure inside each candle.
So every bar contributes both a buy component and a sell component to the profile.
5) Defining the Stealth Flow Proxy
float st_m = v_i == 0 ? rng : rng / v_i
This line creates the stealth flow style measurement.
The idea is simple. If price covers a relatively large range with relatively little volume, the ratio becomes larger. If price needs heavy volume to achieve the same range, the ratio becomes smaller.
So this metric behaves like a movement efficiency proxy:
higher values suggest cleaner movement per unit of volume,
lower values suggest heavier participation per unit of movement.
It is important to interpret this as a derived proxy rather than a direct exchange measured stealth order flow.
6) Applying Decay Weight to Historical Bars
float d_m = math.pow(i_decay, i)
Every historical bar receives a decay multiplier based on how far back it is.
The most recent bar gets the largest weight. Older bars receive progressively smaller weights as long as decay is below one.
This means the final profile is not just a raw accumulation of past activity. It is a weighted accumulation where recent flow can dominate older structure if the user wants a more adaptive map.
7) Distributing a Bar Across All Touched Buckets
int minIdx = math.max(0, math.floor((l_i - pL) / bSz))
int maxIdx = math.min(i_buckets - 1, math.floor((h_i - pL) / bSz))
for j = minIdx to maxIdx
float b_min = pL + j * bSz
float b_max = b_min + bSz
float ovr = math.max(0, math.min(h_i, b_max) - math.max(l_i, b_min))
if ovr > 0
float prop = ovr / rng
bVol.set(j, bVol.get(j) + b_v * prop * d_m)
sVol.set(j, sVol.get(j) + s_v * prop * d_m)
stV.set(j, stV.get(j) + st_m * prop * d_m)
This is one of the most important calculations in the whole script.
For every bar, the script determines which price buckets were touched by that bar. It then measures how much of the bar overlapped each bucket. That overlap fraction is used to distribute buy pressure, sell pressure, and stealth flow into the correct levels.
So if a bar spends more of its range inside a given bucket, more of its volume contribution goes into that bucket.
This makes the map much more realistic than assigning the full bar volume to only one price level.
8) Handling Zero Range Bars
else
int idx = math.max(0, math.min(i_buckets - 1, math.floor((c_i - pL) / bSz)))
bVol.set(idx, bVol.get(idx) + b_v * d_m)
sVol.set(idx, sVol.get(idx) + s_v * d_m)
stV.set(idx, stV.get(idx) + st_m * d_m)
If a bar has no range, the script cannot distribute it by overlap. In that case, it assigns the full weighted contribution to the bucket containing the close.
This ensures that flat or compressed bars still contribute to the profile without breaking the overlap logic.
9) Building Total Volume, Point of Control, and Summary Totals
float tVolMax = 0.0
float stMax = 0.0
float stMin = 1e10
int poc = 0
float pocV = 0.0
float sumV = 0.0
array tVol = array.new(i_buckets, 0.0)
for j = 0 to i_buckets - 1
float t = bVol.get(j) + sVol.get(j)
float st = stV.get(j)
tVol.set(j, t)
sumV += t
if t > tVolMax
tVolMax := t
if t > pocV
pocV := t
poc := j
After all bars are processed, the script combines buy and sell pressure for each bucket into total volume.
At the same time, it calculates:
the total profile volume,
the maximum bucket volume,
the Point of Control bucket,
and the minimum and maximum stealth values.
The Point of Control is simply the bucket with the largest accumulated total volume.
So this stage turns the raw arrays into a complete profile summary.
10) Calculating the Seventy Percent Value Area
float trg = sumV * 0.70
float cur = pocV
int vH = poc
int vL = poc
while cur < trg and (vH < i_buckets - 1 or vL > 0)
float vUp = vH < i_buckets - 1 ? tVol.get(vH + 1) : -1.0
float vDn = vL > 0 ? tVol.get(vL - 1) : -1.0
if vUp >= vDn and vUp >= 0
vH += 1
cur += vUp
else if vDn > vUp and vDn >= 0
vL -= 1
cur += vDn
else
break
This is the Value Area expansion algorithm.
The script starts at the Point of Control and keeps adding the next larger neighboring bucket, either above or below, until the accumulated total reaches seventy percent of overall profile volume.
The upper and lower boundaries of that expansion become the Value Area High and Value Area Low.
So the Value Area always forms around the Point of Control and grows toward whichever neighboring levels contain the most activity.
11) Classifying the Profile Shape
float vTop = 0.0
float vMid = 0.0
float vBot = 0.0
int third = math.floor(i_buckets / 3)
for j = 0 to i_buckets - 1
float v = tVol.get(j)
if j < third
vBot += v
else if j < third * 2
vMid += v
else
vTop += v
string shp = "D-Shape (Balanced)"
if vTop > sumV * 0.20 and vBot > sumV * 0.20 and vMid < sumV * 0.50
shp := "B-Shape (Double Dist)"
else if poc > i_buckets * 0.5 and vTop > vBot * 1.3
shp := "P-Shape (Short Covering)"
else if poc < i_buckets * 0.5 and vBot > vTop * 1.3
shp := "b-Shape (Long Liquidation)"
The script divides the profile into upper, middle, and lower thirds and compares how much volume sits in each section.
If upper and lower thirds both carry meaningful volume while the middle is relatively weak, the script labels the profile as a B shape.
If the Point of Control sits high and the upper section dominates, it labels the profile as a P shape.
If the Point of Control sits low and the lower section dominates, it labels the profile as a b shape.
Otherwise, the default label is D shape.
So the shape classifier is reading where the distribution is concentrated and how balanced it looks across the full price range.
12) Computing the Average Stealth Level
float avgSt = 0.0
int stCnt = 0
for j = 0 to i_buckets - 1
if stV.get(j) > 0
avgSt += stV.get(j)
stCnt += 1
avgSt := stCnt > 0 ? avgSt / stCnt : 0.0
This block computes the average positive stealth value across all populated buckets.
That average later becomes part of the absorption logic. Buckets with much lower than average stealth, combined with very high total volume, are flagged as absorption.
So the script uses the stealth map not only for display width, but also for analysis.
13) Detecting Imbalances and Absorption
bool imbB = i_showImb and s > 0 and b / s >= i_imbRatio
bool imbS = i_showImb and b > 0 and s / b >= i_imbRatio
bool absr = i_showAbs and t > avgV * 1.5 and st < avgSt * 0.5
These are the main analytical event conditions.
A buy imbalance exists when buy pressure is at least the selected ratio times larger than sell pressure.
A sell imbalance exists when sell pressure is at least the selected ratio times larger than buy pressure.
Absorption is defined differently. It requires:
total bucket volume above one and a half times the average bucket volume,
and stealth flow below half the average stealth value.
That means the bucket saw heavy participation but relatively poor movement efficiency, which can suggest absorbed flow.
So imbalances mark one sided aggression, while absorption marks heavy activity with suppressed movement.
14) Scaling the Visual Width of Each Layer
int wS = int((s / tVolMax) * i_width)
int wB = int((b / tVolMax) * i_width)
int wSt = int(((st - stMin) / math.max(1e-10, stMax - stMin)) * (i_width / 2))
The map is drawn horizontally, so the script converts each metric into width.
Sell pressure width and buy pressure width are scaled relative to the largest total bucket volume.
Stealth flow width is scaled separately relative to the stealth range and is limited to half the main map width.
So every bucket gets a visual footprint that reflects its relative pressure and stealth intensity.
15) Drawing the Buy, Sell, and Stealth Blocks
if wS > 0
_boxes.push(box.new(xStart, pHi, xStart + wS, pLo, bgcolor = cS, border_color = bc, border_width = bw))
if wB > 0
_boxes.push(box.new(xStart + wS, pHi, xStart + wS + wB, pLo, bgcolor = cB, border_color = bc, border_width = bw))
if i_showSt and wSt > 0
_boxes.push(box.new(xStart + wS + wB, pHi, xStart + wS + wB + wSt, pLo, bgcolor = c_stealth, border_color = bc, border_width = 1))
This is the actual map renderer.
The sell block is drawn first.
The buy block is drawn immediately after it.
If stealth flow display is enabled, the stealth block is drawn after both pressure blocks.
So each price level becomes a compact three part flow bar:
sell pressure,
buy pressure,
and optional stealth flow.
16) Extending Imbalance and Absorption Zones Across the Range
if i_showZones
if imbB
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(c_buy, 90), border_color = na))
if imbS
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(c_sell, 90), border_color = na))
if absr
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(color.rgb(255, 0, 255), 85), border_color = na))
If zone extension is enabled, the script projects imbalance and absorption buckets horizontally across the entire historical calculation window.
This makes key buckets easier to see in relation to actual price bars rather than only inside the right side profile map.
So the indicator can show both a profile view and a chart level zone view at the same time.
17) Drawing the Range Box and Historical Scope Label
if i_showRng
_boxes.push(box.new(bar_index - N + 1, pH, bar_index + 1, pL, bgcolor = na, border_color = c_range, border_style = line.style_dashed))
_labels.push(label.new(bar_index - int(N / 2) + 1, pH, "N: " + str.tostring(N), textcolor = c_range, style = label.style_label_down, color = color.new(color.black, 100), size = size.small))
This block outlines the active analysis window on the chart.
The dashed box marks the highest and lowest prices used by the profile, and the label shows the effective bar count N.
So the user can always see exactly which portion of chart history is feeding the current flow map.
18) Drawing the Point of Control
if i_showPOC
float pPrice = pL + (poc + 0.5) * bSz
int endX = i_extPOC ? bar_index + i_width : bar_index + 1
_lines.push(line.new(bar_index - N + 1, pPrice, endX, pPrice, color = c_poc, width = 2))
The Point of Control line is drawn at the midpoint of the highest volume bucket.
If extension is enabled, the line continues forward through the map width. Otherwise it stops at the right edge of the historical window.
So the Point of Control remains a clear reference level for the most active price area inside the map.
19) Drawing the Value Area
if i_showVA
float vaTop = pL + (vH + 1) * bSz
float vaBot = pL + vL * bSz
_boxes.push(box.new(bar_index + 1, vaTop, bar_index + 1 + i_width, vaBot, border_color = c_va, bgcolor = color.new(c_va, 90), border_style = line.style_dashed))
This draws the seventy percent Value Area as a translucent box on the right side of the profile.
The top and bottom are derived from the expanded Value Area bucket boundaries, and the box spans the full map width.
So the user can immediately see where most of the profile activity was concentrated around the Point of Control.
20) Buy Sell Dominance Summary
float tB = bVol.sum()
float tS = sVol.sum()
float tV = tB + tS
float pB = tV > 0 ? (tB / tV) * 100 : 0
float pS = tV > 0 ? (tS / tV) * 100 : 0
string dTxt = pB >= pS ? "Bullish " + str.tostring(pB, "#") + "%" : "Bearish " + str.tostring(pS, "#") + "%"
This block calculates the total buy side share and total sell side share across the whole profile.
Whichever side holds the greater percentage becomes the dominant flow label in the table.
So the summary does not only show local bucket conditions. It also provides a broad view of which side controlled more of the weighted participation inside the entire mapped range. Indicator

Auto Fair Value Gap (FVG) Pro [identityKa]Overview
The Auto Fair Value Gap (FVG) Pro is an essential Smart Money Concepts (SMC) tool engineered to detect and highlight institutional price imbalances. An FVG occurs when strong momentum creates a gap in price delivery, leaving an inefficiency between buyers and sellers. This script mathematically identifies these 3-bar structures in real-time, plotting them as dynamic zones. It goes a step further by offering automated chart mitigation (cleaning) and plotting the highly sought-after 50% Consequent Encroachment (CE) level.
Core Detection & Mitigation Mechanics
The algorithm evaluates price action strictly based on a 3-candle sequence:
Bullish FVG (Demand Imbalance): Identified when the Low of the 3rd candle is strictly higher than the High of the 1st candle, and the 2nd candle is bullish. This creates an unmitigated gap of buy-side liquidity.
Bearish FVG (Supply Imbalance): Identified when the High of the 3rd candle is strictly lower than the Low of the 1st candle, and the 2nd candle is bearish. This creates a sell-side imbalance.
Smart Mitigation (Wick vs. Close): The script allows the user to define what constitutes a "filled" gap. In "Wick" mode, the gap is instantly deleted from the chart the moment a subsequent candle's wick sweeps through the zone. In "Close" mode, the gap remains active until a candle's body strictly closes inside or beyond the zone, ensuring the chart stays clean and only relevant institutional targets remain visible.
The Consequent Encroachment (50% CE)
Institutions frequently target the exact middle of an imbalance. By default, this script draws a dashed line at the exact 50% mathematical equilibrium of every active FVG box. This serves as a precise entry point or target for advanced SMC traders.
HUD Dashboard & AI Logic
The integrated panel provides an instant read on the imbalance bias and risk state:
Dangerous: Displayed whenever the current live price action enters an active FVG zone. This signifies that the gap is actively being filled and high volatility is expected as orders are absorbed.
LONG: Triggered when the last detected FVG was Bullish, indicating that recent institutional momentum was upward and unmitigated demand zones lie below as support.
SHORT: Triggered when the last detected FVG was Bearish, indicating a dominance in sell-side momentum.
How to Use It
This tool is exceptionally powerful for Price Action trading, particularly on 15-minute and 1-hour timeframes where intraday institutional gaps frequently occur and are reliably filled. Traders should not blindly buy or sell when an FVG forms. Instead, use the FVG boxes as high-probability reversal zones. When the AI Suggestion reads "Dangerous" (price is inside the gap), monitor the price action on a lower timeframe. Wait for a rejection from the box—specifically near the 50% CE dashed line—before executing a trade in the direction of the macro trend. Indicator

Prism Orderflow Detector [JOAT]Prism Orderflow Detector
Introduction
The Prism Orderflow Detector is an open-source institutional liquidity and order flow system that combines Smart Money Concepts (SMC), liquidity pool detection, Fair Value Gap analysis, Order Block identification, and advanced orderflow strength measurement into a unified overlay indicator. This comprehensive system integrates multiple proven institutional trading methodologies to identify high-probability zones where smart money positioning and retail liquidity intersect.
The indicator is designed for traders who understand that institutional players move markets by targeting liquidity pools, creating imbalances, and establishing positions through Order Blocks. By synthesizing liquidity detection, Fair Value Gaps, Order Blocks, Breaker Blocks, market structure analysis, and real-time orderflow strength measurement, this tool helps identify structural market inflection points with institutional-grade precision.
Why This Integration Exists
This indicator combines eight distinct institutional analysis frameworks that complement each other:
Liquidity Pool Detection: Identifies equal highs/lows and swing points where retail stops cluster
Order Block Analysis: Tracks institutional accumulation and distribution zones
Fair Value Gap Identification: Detects price inefficiencies created by rapid institutional moves
Breaker Block Recognition: Identifies failed Order Blocks that become new support/resistance
Market Structure Mapping: Tracks Break of Structure (BOS) and Change of Character (CHoCH)
Liquidity Heatmap Analysis: Visualizes liquidity concentration across price levels
Volume Delta Tracking: Measures real-time buying versus selling pressure
Orderflow Strength Measurement: Quantifies institutional pressure across multiple factors
Each component addresses different aspects of institutional order flow. Liquidity detection reveals where stops are hunted, Order Blocks show where institutions positioned, Fair Value Gaps indicate rapid institutional moves, market structure provides trend context, and orderflow strength quantifies current institutional pressure. Together, they create a comprehensive view of smart money activity and retail liquidity targeting.
Core Components Explained
1. Advanced Liquidity Detection System
The system identifies multiple types of liquidity pools:
Equal Highs (Buy-Side Liquidity):
Equal High Threshold = high * (threshold_percentage / 100)
Equal High Condition = (high == high ) OR (abs(high - high ) <= threshold AND high > high )
Valid Equal High = Equal High Condition AND high == highest(high, lookback_period)
Equal Lows (Sell-Side Liquidity):
Equal Low Threshold = low * (threshold_percentage / 100)
Equal Low Condition = (low == low ) OR (abs(low - low ) <= threshold AND low < low )
Valid Equal Low = Equal Low Condition AND low == lowest(low, lookback_period)
Liquidity Sweeps:
- Bullish Sweep: Price breaks below recent lows but closes back above
- Bearish Sweep: Price breaks above recent highs but closes back below
These sweeps often precede significant moves as institutions trigger retail stops before establishing positions.
2. Order Block Detection Engine
Order Blocks represent the last opposite-direction move before a strong impulse:
Bullish Order Block:
Bullish OB = close < open AND close > open AND
close > high AND (high - low ) > (ATR * strength_multiplier)
Bearish Order Block:
Bearish OB = close > open AND close < open AND
close < low AND (high - low ) > (ATR * strength_multiplier)
Order Blocks are displayed as gradient boxes with diagonal lines and extend forward to show ongoing relevance.
3. Fair Value Gap Analysis
Fair Value Gaps represent price inefficiencies where institutions moved price rapidly:
Bullish FVG:
Bullish FVG = low > high AND close > open
FVG Size = ((low - high ) / close) * 100
Valid Bullish FVG = Bullish FVG AND FVG Size >= minimum_size_percentage
Bearish FVG:
Bearish FVG = high < low AND close < open
FVG Size = ((low - high ) / close) * 100
Valid Bearish FVG = Bearish FVG AND FVG Size >= minimum_size_percentage
FVGs are displayed as horizontal lines with gradient fills and often get filled (retested) later.
4. Breaker Block System
Breaker Blocks are failed Order Blocks that become new support/resistance:
Bullish Breaker: Failed bearish Order Block that price breaks above
Bearish Breaker: Failed bullish Order Block that price breaks below
These represent significant shifts in market structure and often provide strong reversal zones.
5. Market Structure Analysis
Tracks institutional trend changes through structure breaks:
Break of Structure (BOS):
- Bullish BOS: New higher high with strong momentum
- Bearish BOS: New lower low with strong momentum
Change of Character (CHoCH):
- Bullish CHoCH: Lower low followed by higher high (trend change)
- Bearish CHoCH: Higher high followed by lower low (trend change)
6. Advanced Orderflow Features
Liquidity Heatmap:
Tracks liquidity concentration by counting touches at key levels over specified periods. High-intensity areas (>80% touch count) are highlighted as significant liquidity zones.
Volume Delta Analysis:
Buy Volume = close > open ? volume : 0
Sell Volume = close < open ? volume : 0
Volume Delta = sma(Buy Volume - Sell Volume, 14)
Volume Delta Normalized = (Volume Delta / sma(volume, 14)) * 100
Strong delta (>50) indicates institutional accumulation or distribution.
Imbalance Zone Detection:
Enhanced Fair Value Gap detection for larger inefficiencies:
Bullish Imbalance = low > high AND (low - high ) > (ATR * 0.5)
Bearish Imbalance = high < low AND (low - high) > (ATR * 0.5)
Premium/Discount Zones:
Price Range = highest(high, 50) - lowest(low, 50)
Equilibrium = lowest(low, 50) + (Price Range / 2)
Premium Zone = close > equilibrium + (Price Range * 0.25)
Discount Zone = close < equilibrium - (Price Range * 0.25)
7. Orderflow Strength Meter
Real-time quantification of institutional pressure:
Orderflow Strength = Order Block Factor + FVG Factor + Sweep Factor +
Volume Delta Factor + Structure Factor
Components:
- Order Block: ±20 points for new OBs
- FVG: ±15 points for valid FVGs
- Sweeps: ±25 points for liquidity sweeps
- Volume Delta: ±30 points (normalized)
- Structure: ±20 points for BOS/CHoCH
Strength classifications:
- Extreme Bull/Bear Pressure: >±60
- Strong Bull/Bear Pressure: >±30
Visual Elements
Liquidity Arrows: Directional arrows for equal highs/lows with clean labels
Liquidity Sweeps: Arrow lines showing sweep direction with "SWEEP" labels
Order Block Boxes: Gradient boxes with diagonal lines and "OB" labels
Fair Value Gap Lines: Horizontal lines with gradient fills and "FVG" labels
Breaker Diamonds: Diamond markers for failed Order Blocks with "BRK" labels
Structure Arrows: CHoCH arrows with directional labels
Imbalance Zones: Boxes with crossing diagonal lines and "IMB" labels
Liquidity Heatmap: Significant liquidity levels with "LIQ" labels
Volume Delta Markers: "Δ+" and "Δ-" labels for extreme volume pressure
Orderflow Background: Subtle background coloring for extreme pressure states
Dashboard: Comprehensive real-time status of all orderflow components
How Components Work Together
The integration creates a layered institutional analysis approach:
Layer 1 - Liquidity Mapping: Equal highs/lows and swing points reveal where retail stops cluster
Layer 2 - Institutional Positioning: Order Blocks show where smart money accumulated/distributed
Layer 3 - Price Inefficiencies: Fair Value Gaps indicate rapid institutional moves
Layer 4 - Structure Context: BOS/CHoCH provide trend and reversal context
Layer 5 - Failed Levels: Breaker Blocks show where previous levels failed
Layer 6 - Flow Analysis: Volume delta and heatmaps reveal current institutional pressure
Layer 7 - Strength Synthesis: Orderflow strength meter quantifies overall institutional activity
Example scenario: Price approaches equal lows (Layer 1) where a bullish Order Block exists (Layer 2), creating a Fair Value Gap on the move up (Layer 3), with bullish CHoCH confirming trend change (Layer 4), strong positive volume delta (Layer 6), and extreme bullish orderflow strength (Layer 7). This confluence suggests high-probability long opportunity.
Input Parameters
Liquidity Settings:
Show Equal Highs/Lows: Toggle liquidity pool display
Equal Price Threshold: Percentage tolerance for equal levels (default: 0.1%)
Liquidity Lookback: Period for liquidity level detection (default: 50)
Order Block Settings:
Show Order Blocks: Toggle Order Block display
Order Block Strength: ATR multiplier for OB validation (default: 3)
Extend Order Blocks: Forward extension bars (default: 20)
Fair Value Gap Settings:
Show Fair Value Gaps: Toggle FVG display
Min FVG Size: Minimum gap size percentage (default: 0.1%)
Breaker Block Settings:
Show Breaker Blocks: Toggle Breaker display
Breaker Lookback: Period for Breaker detection (default: 20)
Advanced Features:
Show Liquidity Heatmap: Toggle heatmap visualization
Show Volume Delta: Toggle volume pressure display
Show Imbalance Zones: Toggle imbalance detection
Show Premium/Discount Zones: Toggle equilibrium analysis
Show Orderflow Strength: Toggle strength background
Heatmap Period: Lookback for liquidity concentration (default: 100)
How to Use This Indicator
Step 1: Identify Market Structure
Check for recent BOS or CHoCH to understand current trend context and potential reversal zones.
Step 2: Map Liquidity Pools
Locate equal highs/lows and swing points where retail stops are likely clustered.
Step 3: Find Order Blocks
Identify recent Order Blocks where institutions likely positioned for the next move.
Step 4: Check for Fair Value Gaps
Look for unfilled FVGs that price may return to test, especially near Order Blocks.
Step 5: Monitor Liquidity Sweeps
Watch for sweep arrows indicating stop hunting - these often precede strong moves in the opposite direction.
Step 6: Analyze Volume Delta
Confirm institutional flow direction through volume delta analysis - strong delta supports directional bias.
Step 7: Review Orderflow Strength
Check dashboard for current orderflow strength - extreme readings indicate high institutional activity.
Step 8: Wait for Confluence
Best setups occur when multiple factors align: liquidity pools + Order Blocks + structure + volume confirmation.
Best Practices
Use on 15-minute to 4-hour timeframes for optimal institutional detection
Focus on confluence zones where multiple SMC concepts align
Liquidity sweeps provide excellent risk:reward when they fail to sustain
Order Block retests often provide precise entry levels with tight stops
Fair Value Gaps act as magnets - price often returns to fill them
CHoCH signals are more significant than BOS for trend changes
Volume delta confirmation adds conviction to SMC setups
Premium/discount zones help time entries - buy discount, sell premium
Indicator Limitations
Not all liquidity pools get targeted - institutional timing varies
Order Blocks can fail if market structure changes significantly
Fair Value Gaps may never get filled during strong trending moves
Breaker Blocks don't always provide reliable support/resistance
Volume delta can be misleading in low-liquidity conditions
Orderflow strength is reactive, not predictive of future moves
SMC concepts require understanding of institutional behavior
Visual elements can clutter chart - adjust display settings as needed
Technical Implementation
Built with Pine Script v6 using:
Advanced liquidity detection with percentage-based thresholds
Real-time Order Block calculation with ATR-based validation
Dynamic Fair Value Gap identification with size filtering
Breaker Block tracking with lookback period management
Market structure analysis with BOS/CHoCH detection
Volume delta calculation with institutional bias measurement
Orderflow strength meter with multi-factor scoring
Anti-overlap filtering to prevent visual clutter
Comprehensive dashboard with real-time status updates
The code is fully open-source and can be modified to suit individual trading styles and preferences.
Originality Statement
This indicator is original in its comprehensive SMC integration approach. While individual components (Order Blocks, Fair Value Gaps, liquidity detection, volume analysis) are established Smart Money Concepts, this integration is justified because:
It synthesizes eight distinct SMC methodologies into a unified system
The orderflow strength meter quantifies institutional pressure across multiple factors
Advanced liquidity heatmap visualization shows concentration levels not available elsewhere
Integrated volume delta analysis provides real-time institutional flow confirmation
Premium/discount zone analysis adds equilibrium context to SMC setups
Anti-overlap filtering and clean visual design reduce chart clutter while maintaining functionality
Each component contributes unique institutional information: liquidity detection reveals stop hunting targets, Order Blocks show positioning zones, Fair Value Gaps indicate rapid moves, market structure provides context, and volume analysis confirms flow. The integration's value lies in presenting these complementary SMC perspectives simultaneously with quantified orderflow strength measurement.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Smart Money Concepts and institutional analysis are educational frameworks that do not guarantee future price movement. Past performance and backtested results do not guarantee future results. Market conditions change, and SMC patterns that worked historically may not work in the future.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this indicator. Users assume full responsibility for all trading decisions made using this tool.
-Made with passion by officialjackofalltrades Indicator

Smart Money Engine [WillyAlgoTrader]Smart Money Engine (SME) is a comprehensive overlay indicator that automates the core elements of Smart Money Concepts (SMC) analysis: multi-layer market structure detection (BOS / CHoCH), order block identification with strength grading, fair value gap tracking with fill monitoring, inverse FVG generation, and auto-anchored Fibonacci retracement — all in a single, unified tool.
Rather than stacking five separate indicators on your chart — one for structure, one for OBs, one for FVGs, one for IFVGs, and one for Fibonacci — SME integrates these components so they share a common structural context. Order blocks are created at actual structure break points, FVGs are filtered against volatility, IFVGs are born from filled FVGs, and the Fibonacci grid automatically anchors to the current strong high and strong low. Every component is aware of the others, producing a cleaner and more logically consistent chart than layering independent tools.
🔍 WHAT MAKES IT ORIGINAL
1. Dual-layer structure detection (Swing + Internal). The indicator runs two independent pivot-based structure engines simultaneously. The Swing layer (configurable length, default 10) captures major market structure — the higher-timeframe trend. The Internal layer (shorter length, default 5) captures minor structure shifts within the swing trend. Both label BOS (Break of Structure — continuation) and CHoCH (Change of Character — reversal) independently. This dual-layer approach lets you see whether an internal CHoCH is happening against or with the swing trend — a key distinction in SMC methodology that single-layer tools miss.
2. Order Blocks with contextual grading (A / B / C). OBs are not placed at arbitrary candles. They are created only when a swing-level BOS or CHoCH occurs — the script walks back from the break to find the last opposite-colored candle (the institutional candle that initiated the move). Each OB is then graded:
— Grade A : OB overlaps with an FVG and has a volume spike (highest confluence)
— Grade B : OB has one confluence factor (volume spike OR FVG overlap)
— Grade C : basic OB without additional confluence
Grading helps you prioritize which zones to trade from. OBs extend until mitigated (user choice: close-based or wick-based mitigation), and each OB displays a Consequent Encroachment (CE) midline — the 50% level that often acts as the reaction point within the block.
3. Fair Value Gaps with ATR auto-filter and fill tracking. FVGs are detected using the classic three-candle gap method (current low > high two bars ago for bullish, inverse for bearish). A built-in ATR filter (enabled by default) suppresses FVGs smaller than 0.5× ATR, removing the micro-gaps that clutter charts on lower timeframes. Each FVG extends until fully filled, displays a CE midline, and is automatically removed once price closes through the gap.
4. Inverse FVG (IFVG) generation. When an FVG is fully filled by price, it doesn't just disappear — it transforms into an Inverse FVG with flipped bias. A filled bullish FVG becomes a bearish IFVG (potential resistance); a filled bearish FVG becomes a bullish IFVG (potential support). This captures the SMC concept that once institutional imbalance is filled, the zone can flip polarity. IFVGs are displayed with distinct dashed borders and tracked until mitigated by a close through their zone.
5. Auto-anchored Fibonacci retracement. The Fibonacci grid automatically spans from the current Strong High to Strong Low — the trailing extremes of the active swing structure. When a new BOS/CHoCH shifts the structure, the anchor points update and the grid repositions. The OTE (Optimal Trade Entry) zone between 0.5 and 0.618 is highlighted, giving you an immediate visual reference for the premium/discount equilibrium.
6. Strong / Weak High and Low levels. After each structural break, the indicator identifies the trailing high and low as either "Strong" or "Weak" based on their position relative to the current trend direction. In a bullish swing, the low that initiated the trend is the Strong Low (protected) and the high is the Weak High (target). These levels are extended forward as dashed lines, providing clear reference for where the trend is protected and where it is vulnerable.
⚙️ HOW IT WORKS
Structure detection:
Swing pivots are identified using ta.pivothigh() and ta.pivotlow() with the configured lookback length. The script maintains the most recent swing high and swing low. When price closes above the previous swing high (confirmed bar close, no mid-bar signals), it registers a bullish break. If the prior trend was bearish, this is labeled CHoCH (reversal); if bullish, it is labeled BOS (continuation). The same logic applies in reverse for bearish breaks. Internal structure uses an identical algorithm with a shorter lookback, and its labels are drawn with dashed lines and lighter opacity to visually distinguish them from swing-level events.
Order Block detection:
When a swing-level break is confirmed, the script scans backward (up to 30 bars) from the pivot that was broken to find the last candle with opposite polarity — the candle whose body direction opposes the break direction. The full range (high to low) of that candle becomes the OB zone. A volume spike check (volume > 1.5× 20-period SMA) adds confluence for grading. OBs extend right until the mitigation condition is met.
FVG detection:
On every confirmed bar, the script checks whether the current bar's low exceeds the high of two bars ago (bullish FVG) or the current high is below the low of two bars ago (bearish FVG). If the gap size passes the ATR filter, an FVG box is created. The box extends right each bar. If price fills the gap completely (low touches the bottom of a bullish FVG, or high touches the top of a bearish FVG), the FVG is removed and — if IFVG mode is enabled — queued for conversion to an Inverse FVG.
HTF trend filter:
An optional higher-timeframe EMA(50) filter provides directional bias. The HTF data is fetched using request.security() with confirmed-bar referencing ( + lookahead_on pattern) to prevent repainting. When enabled, the dashboard displays the HTF bias, and the confluence can factor into OB grading.
Anti-repaint compliance:
All structure breaks, OB creation, and FVG detection require barstate.isconfirmed — signals fire only after the bar closes. The HTF filter uses the standard non-repainting security call pattern. No future data is accessed.
📖 HOW TO USE
Reading the chart:
— HH / HL / LH / LL labels at swing points classify the market structure
— Solid horizontal lines with BOS or CHoCH labels = swing-level structure breaks
— Dashed lines with BOS/CHoCH = internal (minor) structure breaks
— Colored boxes = Order Blocks (green-tinted = bullish, red-tinted = bearish)
— Letter labels (A/B/C) on OBs = strength grade
— Dotted midline inside OBs = Consequent Encroachment (CE)
— Blue-tinted boxes = bullish FVGs; orange-tinted = bearish FVGs
— Dashed-border boxes labeled IFVG = Inverse Fair Value Gaps
— Dotted horizontal Fibonacci lines with OTE zone highlight = auto retracement grid
— Dashed trailing lines labeled "Strong High/Low" or "Weak High/Low" = structural extremes
Suggested workflow:
— Identify the swing trend direction from BOS/CHoCH labels and Strong/Weak levels
— Check if internal structure aligns with or diverges from swing structure
— Look for entry opportunities at Order Blocks (prioritize Grade A/B) within the Fibonacci OTE zone
— Use FVGs as additional confluence — a bullish OB that overlaps a bullish FVG is a higher-probability zone
— Monitor IFVGs for polarity-flipped zones that may act as new support/resistance
— Use the dashboard to track active OB/FVG/IFVG counts and HTF bias alignment
Timeframe guidance:
— Scalping (1–5min): Swing Length 5–7, Internal 3, increase Max OBs/FVGs for more zones
— Intraday (15min–1H): Swing Length 8–12, Internal 5, default settings work well
— Swing (4H–Daily): Swing Length 15–25, Internal 7–10, reduce Max OBs to keep chart clean
— Use the HTF filter with 1 step up (e.g. 1H chart → 4H HTF, 4H chart → D HTF)
⚙️ KEY SETTINGS REFERENCE
— Swing Detection Length (default 10): lookback for major structure pivots
— Internal Structure Length (default 5): lookback for minor structure pivots (should be < Swing Length)
— OB Mitigation (default Wick): "Close" = OB removed on close through zone; "Wick" = removed on any touch
— Show OB Grade (default On): display A/B/C strength classification on OBs
— Show OB Midline (default On): display CE (50%) line inside order blocks
— Auto-Filter Small FVGs (default On): suppress FVGs smaller than 0.5× ATR
— Max Visible OBs / FVGs / IFVGs (default 5 each): cap on displayed zones to manage chart clutter
— Show Inverse FVGs (default Off): enable IFVG generation from filled FVGs
— Show Fibonacci Retracement (default On): auto-anchored grid with OTE zone highlight
— HTF Trend Filter (default Off): set a higher timeframe for directional bias via EMA(50)
— Volume Confirmation (default On): add confluence when volume > 1.5× average (auto-disabled on forex)
📊 Dashboard
The info panel (adjustable to any chart corner) displays in real time:
— Swing trend direction (Bullish / Bearish)
— Internal trend direction
— Fibonacci range (Strong High — Strong Low)
— Count of active OBs, FVGs, and IFVGs
— HTF bias (if enabled)
— Current timeframe and indicator version
⚠️ IMPORTANT NOTES
— This indicator does not repaint. All signals and zone creations require bar-close confirmation. The HTF filter uses the standard + lookahead_on non-repainting pattern.
— SME is a structural analysis and zone-mapping tool — it identifies where institutional activity likely occurred, but it does not generate explicit buy/sell signals. Trade decisions should incorporate your own entry triggers, risk management, and additional confluence.
— Past structure patterns and zone reactions do not guarantee future price behavior.
— Performance may vary across instruments and timeframes. Lower timeframes produce more zones and structure shifts; use the ATR filter and Max Visible caps to manage noise.
— The indicator works across all asset classes. Volume-based features (OB grading) are automatically adjusted on instruments without volume data. Indicator

Fair Value Gap Signals [UAlgo]Fair Value Gap Signals is a price action indicator that detects bullish and bearish Fair Value Gaps and then tracks how price behaves inside those gaps over time. Instead of only drawing static imbalance boxes, the script treats each FVG as a stateful object with live metrics, lifecycle states, mitigation logic, and optional rejection signals. This makes it useful for traders who want both structural FVG mapping and real time interaction analysis after the gap is created.
The indicator runs on price ( overlay=true ) and automatically identifies classic 3 candle FVG formations. Each detected gap is stored in an internal object with its own box, CE midline, metric bars, status, and signal label handling. As price revisits a gap, the script measures how deeply price penetrates the zone, how much volume is accumulated during tests, and how strong the test candles are in terms of directional body expansion (velocity style scoring).
A key design goal of this script is practical decision support. It can show:
Fresh gaps
Testing behavior
Filled or invalidated gaps
Rejection events (potential reversal signals)
Live VVD style metrics (Velocity, Volume, Depth / Safety) inside the FVG
It also includes an ATR filter to ignore small gaps, visibility limits to keep charts clean, optional CE midline plotting, and alert conditions for major gap events.
🔹 Features
🔸 1) Automatic Bullish and Bearish FVG Detection
The script detects standard 3 candle Fair Value Gaps using simple price displacement logic:
Bullish FVG when current low is above high from two bars ago
Bearish FVG when current high is below low from two bars ago
When a gap is confirmed, it is stored as a custom Gap object and immediately drawn on the chart with its own box, CE midline, and metric containers.
🔸 2) Stateful FVG Lifecycle Tracking
Each gap is tracked through multiple statuses instead of being treated as a static box:
Fresh
Testing
Tested
Rejected
Filled
This allows the indicator to model how price interacts with a gap over time and not just where the gap originally formed.
🔸 3) Configurable Mitigation Method (Close or Wick)
Users can choose how FVG mitigation is confirmed:
Close means invalidation requires a close through the far boundary
Wick means a wick touch through the far boundary is enough
This is a very useful option because traders often use different mitigation definitions depending on instrument and timeframe.
🔸 4) ATR Based Gap Size Filter
An optional ATR filter removes smaller gaps that may be insignificant in volatile conditions. When enabled, the script ignores bullish or bearish FVGs whose size is smaller than the current ATR value (using the chosen ATR length).
This helps reduce noise and keeps the display focused on stronger imbalances.
🔸 5) CE Midline (Consequent Encroachment) Support
Each FVG can display a dotted midline representing the center of the gap (Consequent Encroachment). This gives traders an additional reference inside the imbalance and is commonly used as a reaction level in ICT style workflows.
The CE line can be turned on or off with a dedicated input.
🔸 6) VVD Metrics Inside Each Gap (Velocity, Volume, Depth)
One of the strongest features of this script is the live metric visualization inside every active gap. The indicator tracks and displays three bar style metric boxes:
Velocity
Volume
Depth (rendered as a safety style score from penetration depth)
These metrics update as price tests the gap and provide a quick visual estimate of test quality, participation, and penetration risk.
🔸 7) Rejection Signal Detection with Context
When price enters a gap and then rejects from it with sufficient test volume, the script can print a directional signal label. Bullish gaps can generate Buy or Strong Buy labels and bearish gaps can generate Sell or Strong Sell labels.
Signal strength is influenced by the velocity metric, and the tooltip includes extra details such as velocity score, volume score, safety score, and test count.
🔸 8) Test Counting and Multi Test Awareness
The indicator keeps track of how many times a gap has been tested. This can help traders distinguish first touch behavior from repeated interactions that may weaken the setup.
The test count can also be displayed as text inside the main FVG box when metrics are enabled.
🔸 9) Visibility Control for Cleaner Charts
To avoid clutter, the script limits how many active bullish and bearish gaps are visually displayed at once using Max Visible FVGs . It scans from newest to oldest and only shows the most recent valid gaps per side.
Older or non visible gaps still exist in logic and continue updating internally, but their visuals are hidden.
🔸 10) Smart Object Cleanup and Retained Signal Labels
The script enforces an internal gap limit and removes older gap objects when needed. Gap boxes, CE lines, and metric boxes are deleted during cleanup, while rejection labels are intentionally allowed to remain on the chart for historical context.
This gives users a cleaner display while preserving past signal markers.
🔸 11) Alert Conditions for Key FVG Events
Built in alert conditions are provided for:
New FVG formed
FVG testing (price enters a gap)
FVG filled (mitigated / invalidated)
FVG rejection signal (potential reversal)
This makes the script suitable for active monitoring across multiple charts or watchlists.
🔹 Calculations
1) Bullish and Bearish FVG Detection Logic
The script uses classic 3 candle gap conditions:
bool fvgBull = low > high
bool fvgBear = high < low
Interpretation:
A bullish FVG exists when the current candle low leaves a gap above the high from two bars ago.
A bearish FVG exists when the current candle high leaves a gap below the low from two bars ago.
When detected, the script creates a Gap object and stores:
Top boundary
Bottom boundary
Direction
Origin index
Status and metrics
Visual objects (main box, metric boxes, midline, label handle)
2) ATR Filter for Minimum Gap Size
If the ATR filter is enabled, the script compares gap size with ATR and rejects undersized gaps:
float atrVal = ta.atr(atrLength)
float gapSizeBull = low - high
float gapSizeBear = low - high
if fvgBull and gapSizeBull < atrVal
fvgBull := false
if fvgBear and gapSizeBear < atrVal
fvgBear := false
This creates a volatility adjusted threshold for FVG relevance.
3) Gap Object Initialization and Visual Construction
When a new gap is created, the setup method initializes both state and visuals:
Main FVG box
CE midline
Three metric boxes (Vel, Vol, Dpt)
The main box is drawn from the origin index to a small forward projection:
g.paramBox := box.new(left = idx, top = top, right = bar_index + 5, bottom = bottom, ...)
The CE line is placed at the midpoint:
float midY = (top + bottom) / 2
The metric area is split into three horizontal segments inside the gap height so each metric can expand in width over time.
4) Gap Status Model and State Transitions
Each gap starts as Fresh . As price interacts with the gap, the script can move it through:
Testing when price enters the zone
Tested when price leaves after a test
Rejected when rejection conditions are met
Filled when mitigation occurs
This logic is implemented inside the update() method, which runs every bar for each stored gap.
5) Test Detection and First Touch Handling
The script avoids counting the forming bar as a test:
bool canTest = bar_index > g.index + 1
A gap is considered under test when the current candle range overlaps the gap:
bool isInside = canTest and (h >= g.bottom and l <= g.top)
When price first enters a fresh gap:
if g.status == "Fresh"
g.status := "Testing"
g.testCount := 1
g.testStartVolume := volume
eventCode := 1
This event code is later used for the FVG Testing alert condition.
6) Velocity Metric Calculation
Velocity is a bar quality style score calculated during gap tests. It combines body dominance and a directional bonus:
float bodyRatio = math.abs(close - open) / barRange
Directional bonus:
Bullish gap gets bonus if the test candle closes bullish
Bearish gap gets bonus if the test candle closes bearish
float currentVelocity = math.min(bodyRatio + directionBonus, 1.0)
The gap stores the maximum velocity observed across all tests:
if currentVelocity > g.maxVelocity
g.maxVelocity := currentVelocity
Interpretation:
Higher velocity suggests stronger directional response while testing the gap.
7) Volume Metric Calculation
During tests, the script accumulates test volume:
if isInside
g.testVolume += volume
Later, it compares the accumulated test volume to an expected volume estimate:
float expectedVol = volAvg * math.max(1, (bar_index - g.index) / 2)
float volScore = math.min(g.testVolume / expectedVol, 1.0)
This creates a normalized volume score used in both the metric bar length and the rejection label tooltip.
8) Depth Metric and Safety Score Calculation
Depth tracks how far price penetrates into the gap during tests.
For bullish gaps:
Depth is measured from gap top downward when price dips below the top boundary.
For bearish gaps:
Depth is measured from gap bottom upward when price rises above the bottom boundary.
Examples:
if g.isBullish
if l < g.top
currentDepth := g.top - l
else
if h > g.bottom
currentDepth := h - g.bottom
The maximum penetration depth is stored:
if currentDepth > g.maxDepth
g.maxDepth := currentDepth
The displayed metric is a safety style score:
float depthRatio = g.maxDepth / gapSize
float safetyScore = math.max(0.0, 1.0 - depthRatio)
Interpretation:
Deeper penetration reduces safety score and may imply weaker rejection quality.
9) Fill / Mitigation Logic (Close or Wick)
A gap is marked Filled when price crosses the far boundary in the inverse direction, according to the selected mitigation method:
if mitType == "Close"
filledInverse := g.isBullish ? (close < g.bottom) : (close > g.top)
else
filledInverse := g.isBullish ? (l < g.bottom) : (h > g.top)
When filled:
Status becomes Filled
Gap is deactivated
Event code becomes 2
Gap visuals are deleted
This event code feeds the FVG Filled alert condition.
10) Rejection Signal Logic
Rejection is checked only while the gap is active and price is inside the gap. The script also requires enough accumulated test volume:
if isInside and g.testVolume > volAvg * 0.5
Rejection condition:
Bullish gap rejection if price probes below the gap top and closes back above the gap top
Bearish gap rejection if price probes above the gap bottom and closes back below the gap bottom
bool rejected = g.isBullish ? (l < g.top and close > g.top) : (h > g.bottom and close < g.bottom)
When rejection is confirmed:
Gap status becomes Rejected
Optional signal label is drawn (Buy, Strong Buy, Sell, Strong Sell)
Event code becomes 3
This event code feeds the FVG Rejection Signal alert condition.
11) Signal Strength and Tooltip Metrics
When a rejection signal is printed, the script builds a tooltip with normalized scores:
Velocity score from maxVelocity
Volume score from testVolume versus expectedVol
Safety score from gap penetration depth
Test count
It also upgrades the signal text to Strong Buy or Strong Sell when max velocity exceeds 0.6:
if g.maxVelocity > 0.6
icon := g.isBullish ? "Strong Buy" : "Strong Sell"
This provides a compact label with deeper context available on hover.
12) Visibility Limiting and Render Hiding
The script iterates through gaps from newest to oldest and shows only the most recent active bullish and bearish gaps up to maxVisible per side. Non visible gaps are not deleted, but their visuals are hidden by setting colors and text to na .
This is useful for traders who want a focused view of current opportunities without losing older gap state tracking in the background.
13) Metric Bar Rendering Logic
Each metric box grows horizontally from the gap origin according to a normalized score:
Velocity length from maxVelocity
Volume length from volScore
Depth / Safety length from safetyScore
Example:
int len1 = int(math.max(1, maxWidth * velScore))
g.rankBox1.set_right(g.index + len1)
If metric display is disabled, the script hides the metric boxes and text while keeping the gap logic active.
14) Array Cleanup and Object Management
The script enforces a strict gap storage limit with GAP_LIMIT . When exceeded, the oldest gap is removed and its visuals are deleted:
if gaps.size() > GAP_LIMIT
gaps.cleanup()
The cleanup method deletes:
Main gap box
CE midline
Velocity metric box
Volume metric box
Depth metric box
Rejection info labels are intentionally preserved for historical review.
15) Alert Conditions
The script exposes four alert conditions:
alertcondition(fvgBull or fvgBear, "New FVG Formed", ...)
alertcondition(anyTesting, "FVG Testing", ...)
alertcondition(anyFilled, "FVG Filled", ...)
alertcondition(anySignal, "FVG Rejection Signal", ...)
These alerts are driven by the live event codes returned from each gap's update() call and make the indicator suitable for workflow automation. Indicator

ICT Unicorn Model [UAlgo]ICT Unicorn Model is a chart overlay indicator that automates a practical interpretation of the ICT “Unicorn” concept by combining two core components: a Market Structure Shift style Breaker Block (BB) and a Fair Value Gap (FVG). The script first builds a rolling pivot map using configurable left and right pivot bars, then monitors those pivots for structure breaks that qualify as bullish or bearish breaker blocks. Separately, it detects 3 candle FVG imbalances with a minimum size filter. A Unicorn is confirmed when a newly printed FVG overlaps an active breaker block of the same direction.
The output is built for real trading workflows and chart readability. Breaker blocks and FVGs can exist independently, but when they align, the script highlights the overlap region as a Unicorn zone and labels it. All zones extend forward in time and are automatically removed when mitigation or invalidation conditions are met. Optional session filtering is included to restrict detection to a specific trading window for killzone style usage.
Educational tool only. Not financial advice.
🔹 Features
🔸 1) Pivot Based Structure Mapping
The indicator uses built-in pivot detection to create a reliable swing framework. Both pivot highs and pivot lows are stored as structured objects that keep track of pivot time, bar index, pivot price, pivot direction, and whether that pivot has already been “broken” to prevent repeated processing. This pivot map becomes the backbone of the breaker block engine, allowing the script to reference meaningful swing points instead of reacting to minor noise.
🔸 2) Breaker Block Detection via Market Structure Shift Logic
Breaker blocks are created when price breaks through an unbroken pivot in a way that signals a directional shift in structure.
Bullish Breaker Block: price closes above an unbroken pivot high, then the script validates the context by locating two pivot lows around that pivot high and requiring a lower low relationship between them (LL style confirmation in this implementation). Once confirmed, a bullish breaker block zone is stored using the pivot candle’s full range.
Bearish Breaker Block: price closes below an unbroken pivot low, then the script validates the context by locating two pivot highs around that pivot low and requiring a higher high relationship between them (HH style confirmation in this implementation). Once confirmed, a bearish breaker block zone is stored using the pivot candle’s full range.
🔸 3) Fair Value Gap Detection with Minimum Size Filter
The FVG engine detects classic 3 candle price imbalances:
Bullish FVG: current low is above high from two bars ago.
Bearish FVG: current high is below low from two bars ago.
A minimum FVG size filter is applied using raw price points so you can ignore tiny gaps that are usually filled immediately. This makes the script easier to adapt across different markets and timeframes.
🔸 4) Unicorn Confirmation via Directional Overlap
A Unicorn is confirmed only when a newly printed FVG overlaps an active breaker block and both are in the same direction. The overlap test is a standard price interval intersection check, and the direction match ensures bullish FVGs only confirm bullish unicorns and bearish FVGs only confirm bearish unicorns.
When a Unicorn is confirmed, the script draws a dedicated Unicorn zone covering the combined overlap footprint and prints a simple Bull or Bear label directly on the chart.
🔸 5) Optional Session Filter for Killzone Style Workflows
A session filter can restrict detection to a specific time window. If enabled, the script only runs breaker block detection, FVG detection, and Unicorn confirmation while the current bar is inside the selected session. This is useful when you only want signals during higher participation windows.
🔸 6) Automatic Forward Extension, Mitigation, and Cleanup
All zones behave as live objects:
Breaker block boxes extend forward until invalidation.
FVG boxes extend forward until mitigation.
Unicorn boxes extend forward until the associated FVG mitigation condition is met.
When a zone is mitigated or invalidated, its box and label objects are deleted and removed from internal arrays. This keeps the chart clean and prevents stale zones from accumulating.
🔸 7) Object and Memory Management for Chart Stability
The script uses arrays of custom types (Pivot, BreakerBlock, FVG, Unicorn) and enforces internal history limits to reduce clutter and object growth. Older items are shifted out when limits are exceeded, and graphical objects are deleted when no longer valid to maintain stable chart performance.
🔹 Calculations
1) Time Filter (Session Gate)
If the time filter is disabled, detection runs on every bar. If enabled, detection only runs when the chart time is inside the selected session.
in_session = not use_time_filter or time(timeframe.period, time_session) != 0
Interpretation:
If use_time_filter is false, in_session is always true.
If use_time_filter is true, time() returns non-zero only while the bar is inside the session.
2) Pivot Detection and Pivot Object Storage
Pivot highs and lows are detected using PulseWire pivot functions with user-defined left and right bars. Pivots are confirmed after right_bars bars, so the stored pivot time and bar index are offset by right_bars to align the pivot to the originating candle.
ph = ta.pivothigh(high, left_bars, right_bars)
pl = ta.pivotlow(low, left_bars, right_bars)
When a pivot is found:
array.unshift(pivots, Pivot.new(time , bar_index , ph, true, false, high , low ))
The pivot list is capped to keep the script lightweight:
if array.size(pivots) > 20
array.pop(pivots)
3) Bullish Breaker Block Detection
A bullish breaker is triggered when price closes above an unbroken pivot high. The script then searches for pivot lows around that pivot high and requires a lower low relationship between them. If this context check passes, the pivot is marked as broken and a bullish breaker block is stored.
if p.isHigh and not p.isBroken and close > p.price
...
if foundLL
p.isBroken := true
array.push(active_bbs, BreakerBlock.new(p.time, p.index, p.highPrice, p.lowPrice, true, true, na))
Breaker block zone definition is derived from the pivot candle:
Top = pivot candle high
Bottom = pivot candle low
4) Bearish Breaker Block Detection
A bearish breaker is triggered when price closes below an unbroken pivot low. The script then searches for pivot highs around that pivot low and requires a higher high relationship between them. If this context check passes, the pivot is marked as broken and a bearish breaker block is stored.
if not p.isHigh and not p.isBroken and close < p.price
...
if foundHH
p.isBroken := true
array.push(active_bbs, BreakerBlock.new(p.time, p.index, p.highPrice, p.lowPrice, false, true, na))
5) Fair Value Gap Detection and Sizing
Bullish FVG requires current low to be above high .
Bearish FVG requires current high to be below low .
A minimum size filter is applied in points:
bool isBullishFVG = low > high and (low - high ) >= fvg_min_volume
bool isBearishFVG = high < low and (low - high) >= fvg_min_volume
FVGs are stored with their start anchored to bar_index and time , matching the gap’s originating structure:
if isBullishFVG
array.push(active_fvgs, FVG.new(time , bar_index , low, high , true, false, na))
if isBearishFVG
array.push(active_fvgs, FVG.new(time , bar_index , low , high, false, false, na))
6) Overlap Rule for Unicorn Confirmation
A Unicorn requires overlap plus direction agreement. The overlap is calculated as an interval intersection:
method overlaps(BreakerBlock this, FVG fvg) =>
bool isOverlapping = (fvg.bottom <= this.top) and (fvg.top >= this.bottom)
isOverlapping and (this.isBullish == fvg.isBullish)
Interpretation:
The FVG range must intersect the breaker block range, and both must be bullish or both bearish.
7) Unicorn Zone Construction
When a new FVG prints, the script compares it against all active breaker blocks. If an overlap is found, it creates a Unicorn zone and a Bull or Bear label. The Unicorn box boundaries are computed using min and max edges between the BB and FVG:
float topEdge = math.min(bb.top, latestFVG.top)
float bottomEdge = math.max(bb.bottom, latestFVG.bottom)
The Unicorn zone is then drawn and extended forward.
8) Mitigation and Invalidation Logic
Breaker Block invalidation
Bullish BB invalidates if close goes below BB bottom.
Bearish BB invalidates if close goes above BB top.
if (bb.isBullish and close < bb.bottom) or (not bb.isBullish and close > bb.top)
bb.isActive := false
if not na(bb.bbBox)
box.delete(bb.bbBox)
array.remove(active_bbs, i)
FVG mitigation
Bullish FVG mitigates if close goes below FVG bottom.
Bearish FVG mitigates if close goes above FVG top.
if (fvg.isBullish and close < fvg.bottom) or (not fvg.isBullish and close > fvg.top)
fvg.isMitigated := true
if not na(fvg.fvgBox)
box.delete(fvg.fvgBox)
array.remove(active_fvgs, i)
Unicorn mitigation
Unicorn zones are removed when the associated FVG mitigation condition is met:
bool isMitigated = (uni.isBullish and close < uni.fvg.bottom) or (not uni.isBullish and close > uni.fvg.top)
if isMitigated
box.delete(uni.uniBox)
label.delete(uni.uniLabel)
array.remove(unicorns, i)
9) Forward Extension and Internal Limits
Boxes are extended on each bar by updating right = bar_index + 5 to keep them projected slightly forward. Arrays are capped to control history size and object usage:
if array.size(active_bbs) > 50
array.shift(active_bbs)
if array.size(active_fvgs) > 50
array.shift(active_fvgs)
if array.size(unicorns) > 50
array.shift(unicorns) Indicator

Delta Ladder Order Flow [UAlgo]Delta Ladder Order Flow is an overlay order flow visualizer that builds a per bar delta ladder using lower timeframe candles as an intrabar proxy. For each recent bar, the script pulls the underlying lower timeframe open, high, low, close, and volume arrays, then distributes volume into discrete price buckets. Each bucket accumulates estimated buy volume and sell volume, producing a ladder that resembles a footprint style view.
The display focuses on three core outputs:
A delta heatmap ladder where each price level is colored by net delta dominance
A Point of Control highlight that marks the highest total volume level inside the bar
A stacked imbalance detector that scans diagonally across levels to identify aggressive one sided participation and optionally projects that stack forward
The system is designed with stability controls for real world chart conditions. It includes dynamic scaling to prevent excessive level counts on high range bars, object budgeting through bars to draw limits, and text filtering to reduce clutter.
🔹 Features
1) Intrabar Resolution via Lower Timeframe Data
The ladder is constructed using request.security_lower_tf. You select an Intrabar Resolution timeframe that must be lower than the chart timeframe. The script then receives arrays of LTF candles for each chart bar and uses them as a proxy for footprint style aggregation.
This approach provides a practical order flow approximation on PulseWire charts without requiring native tick level data.
2) Ladder Aggregation with Tick Size Multiplier
Price levels are aggregated using the symbol mintick multiplied by a user multiplier. Increasing the multiplier produces thicker ladder steps and fewer levels. Decreasing it produces finer granularity but increases the number of boxes drawn.
This control is critical for balancing detail versus performance across different symbols and volatility regimes.
3) Dynamic Scaling to Prevent High Range Bar Overload
A single volatile bar can contain too many price steps if the granularity is too fine. To prevent crashes, the script estimates how many steps would be required for the bar and increases the effective step size when the raw step count exceeds Max Levels per Bar.
This keeps rendering stable even during high volatility events while still maintaining a consistent ladder representation.
4) Buy, Sell, and Neutral Volume Attribution
Each LTF candle’s direction is inferred from its open and close:
Close above open is treated as buy side volume
Close below open is treated as sell side volume
Close equal open is treated as neutral and split evenly between buy and sell
Volume is then distributed across the price buckets covered by the LTF candle range so that wide candles spread their influence across multiple levels.
5) Delta Heatmap Ladder with Intensity Scaling
Each price bucket computes delta as buy volume minus sell volume and total volume as the sum of both. Ladder cells are colored positive or negative based on delta sign, and transparency is scaled by how dominant the delta is relative to the maximum total volume level inside that bar. This yields a compact heatmap where strong imbalances visually stand out.
A square root curve is applied to intensity to improve mid tone visibility without making everything fully opaque.
6) Point of Control Highlight
The ladder tracks the price level with the highest total volume and marks it as the Point of Control. When enabled, the POC row uses a dedicated border color and a stronger border width so the acceptance anchor is immediately visible.
7) Stacked Imbalance Detection and Projection
The script can detect stacked diagonal imbalances. It compares volume across adjacent price levels using a diagonal logic similar to footprint tools:
Bullish diagonal checks buy volume at a level versus sell volume at the level below
Bearish diagonal checks sell volume at a level versus buy volume at the level above
An imbalance requires the winning side to exceed the losing side by the configured Imbalance Ratio and also exceed a minimum volume threshold to filter low volume noise. When consecutive imbalanced levels reach the Stacked Levels count, the stack is marked and optionally extended forward as a zone.
Stack members also override normal heatmap coloring and are rendered more solid for emphasis.
8) Clean Visual Controls
Several options support readability:
Bars to Draw limits workload and object count
Show Delta Values can be toggled on or off
Min Delta to Show Text filters small prints
Ladder Width percent controls how wide the ladder is relative to the bar space
Text size can be adjusted for different chart zoom levels
Box outline can be hidden by default for a cleaner footprint aesthetic
🔹 Calculations
1) Intrabar data acquisition (lower timeframe arrays)
The script requests arrays of LTF OHLCV values for each chart bar using request.security_lower_tf.
ltf_open = request.security_lower_tf(syminfo.tickerid, tf_input, open)
ltf_close = request.security_lower_tf(syminfo.tickerid, tf_input, close)
ltf_high = request.security_lower_tf(syminfo.tickerid, tf_input, high)
ltf_low = request.security_lower_tf(syminfo.tickerid, tf_input, low)
ltf_vol = request.security_lower_tf(syminfo.tickerid, tf_input, volume)
These arrays contain the lower timeframe candles that make up each chart bar. Each chart bar index has its own embedded array.
2) Base tick step (bucket size control)
Bucket size starts from mintick multiplied by Tick Size Multiplier.
var float base_tick_step = syminfo.mintick * tick_size_mult
This is the baseline price increment used to build the ladder levels.
3) Last bar execution model (performance design)
The script only builds and draws ladders when barstate.islast is true. It then reconstructs the last N bars using an index offset.
if barstate.islast
int start_idx = math.max(0, bar_index - bars_to_draw + 1)
for i = start_idx to bar_index
int offset = bar_index - i
float arr_o = ltf_open
float arr_c = ltf_close
float arr_h = ltf_high
float arr_l = ltf_low
float arr_v = ltf_vol
This design dramatically reduces CPU and memory load compared to updating every bar.
4) Dynamic scaling per bar (anti crash protection)
For each bar, the script estimates how many price steps would be needed using the current bucket size. If that count exceeds Max Levels per Bar, it increases the step size only for that bar.
float bar_h = high
float bar_l = low
float bar_range = bar_h - bar_l
float raw_steps = bar_range / base_tick_step
int scaler = 1
if raw_steps > max_levels_per_bar
scaler := int(math.ceil(raw_steps / max_levels_per_bar))
float current_tick_step = base_tick_step * scaler
Result:
Calm bars use fine granularity
High range bars are automatically compressed into fewer buckets
5) LTF candle direction classification (buy, sell, neutral)
Each LTF candle is classified using its open and close. Neutral candles split volume evenly.
bool is_buy = c > o
bool is_sell = c < o
bool is_neutral = c == o
This is a heuristic proxy for aggressor side. It is not true bid ask data.
6) Align LTF candle range to bucket grid
The candle low and high are rounded to the current tick step so bucket prices align cleanly.
float low_aligned = math.round(l / current_tick_step) * current_tick_step
float high_aligned = math.round(h / current_tick_step) * current_tick_step
7) Step counting and volume per step
The script computes how many bucket levels the candle touches and divides volume equally across them.
int steps = int(math.round((high_aligned - low_aligned) / current_tick_step)) + 1
if steps > 500
steps := 500
float vol_per_step = v / steps
This means wide candles distribute volume across more ladder cells, while tight candles concentrate volume into fewer cells.
8) Writing volume into the ladder map (PriceLevel storage)
Each chart bar owns a DeltaLadder with a map of price to PriceLevel. Each PriceLevel stores buy and sell volume. Volume is added step by step.
type PriceLevel
float price
float buy_vol = 0.0
float sell_vol = 0.0
type DeltaLadder
int bar_idx
map levels
float min_price = 10000000.0
float max_price = 0.0
float max_vol_level = 0.0
float poc_price = na
float poc_vol = 0.0
The add method updates volumes and also tracks max volume and POC:
method add_volume(DeltaLadder this, float price, float vol, bool is_buy, bool is_neutral) =>
if not this.levels.contains(price)
this.levels.put(price, PriceLevel.new(price))
PriceLevel lvl = this.levels.get(price)
if is_neutral
lvl.buy_vol += vol * 0.5
lvl.sell_vol += vol * 0.5
else if is_buy
lvl.buy_vol += vol
else
lvl.sell_vol += vol
float t = lvl.total()
if t > this.max_vol_level
this.max_vol_level := t
if t > this.poc_vol
this.poc_vol := t
this.poc_price := price
The main loop calls this method for each bucket level touched by each LTF candle:
for p = 0 to steps - 1
float level_price = low_aligned + (p * current_tick_step)
ladder.add_volume(level_price, vol_per_step, is_buy, is_neutral)
9) Delta and total volume formulas
Delta and total are defined as methods on PriceLevel.
method delta(PriceLevel this) =>
this.buy_vol - this.sell_vol
method total(PriceLevel this) =>
this.buy_vol + this.sell_vol
These values drive both coloring and POC selection.
10) Stacked imbalance detection (diagonal footprint logic)
Prices are sorted so neighbor comparisons are correct. A stack_map stores whether each price belongs to a bullish or bearish stacked run.
float prices = ladder.levels.keys()
array.sort(prices)
map stack_map = map.new()
Diagonal comparisons:
Bullish diagonal compares BuyVol at level i with SellVol at level below i minus 1
Bearish diagonal compares SellVol at level i with BuyVol at level above i plus 1
Bullish check includes a zero handling rule:
if i > 0
float p_below = array.get(prices, i-1)
PriceLevel lvl_below = ladder.levels.get(p_below)
if lvl_below.sell_vol == 0
if lvl.buy_vol > imb_min_vol
direction := 1
else
if lvl.buy_vol > lvl_below.sell_vol * imb_ratio and lvl.buy_vol > imb_min_vol
direction := 1
Bearish check includes symmetric logic:
if i < array.size(prices) - 1
float p_above = array.get(prices, i+1)
PriceLevel lvl_above = ladder.levels.get(p_above)
if lvl_above.buy_vol == 0
if lvl.sell_vol > imb_min_vol
direction := -1
else
if lvl.sell_vol > lvl_above.buy_vol * imb_ratio and lvl.sell_vol > imb_min_vol
direction := -1
Runs are tracked and only accepted if the number of consecutive levels meets the stacked requirement:
if math.abs(i - run_start_idx) >= stack_count
for k = run_start_idx to i - 1
stack_map.put(array.get(prices, k), run_dir)
The script also draws a projected zone for the detected stack band:
box.new(right_time, p_top + current_tick_step/2, right_time + 1000 * 60 * 60 * 24, p_bot - current_tick_step/2,
xloc=xloc.bar_time, border_width=0, bgcolor=color.new(c_stack, 85), extend=extend.right)
11) Heatmap intensity and transparency mapping
For each price level, intensity is computed as abs(delta) relative to the maximum total volume level in the bar, then curved and mapped into transparency.
float intensity = ladder.max_vol_level > 0 ? math.abs(delta) / ladder.max_vol_level : 0
intensity := math.min(intensity, 1.0)
float curved_intensity = math.sqrt(intensity)
float transp = 97 - (curved_intensity * 57)
Stacked members force stronger visibility:
if stack_map.contains(p)
intensity := 1.0
transp := 30
12) POC marking in the drawing pass
POC is detected during volume accumulation, then used in rendering to upgrade the border style for that cell.
bool is_poc = show_poc and (p == ladder.poc_price)
color border_c = is_poc ? col_poc : col_outline
int border_w = is_poc ? 2 : 1
13) Delta text rendering filter
Text labels are optional and can be filtered by a minimum absolute delta threshold.
if show_text and math.abs(delta) >= text_threshold
string txt = str.tostring(delta, format.volume)
label.new(int((left_time + right_time)/2), p, txt,
xloc=xloc.bar_time, style=label.style_none,
textcolor=txt_col, size=text_size)
Indicator

Bookmap Footprint Imbalance BubblesFootprint Imbalance Bubbles (Bookmap Style)
Overview
This indicator brings Bookmap-style order flow visualization directly to your PulseWire charts. Instead of standard candles, it detects and plots "Bubbles" at specific price levels where aggressive buying or selling has occurred.
These bubbles represent Volume Imbalances —moments where aggressive market orders overwhelmed limit orders by a significant ratio (e.g., 300% more buying than selling). The size or transparency of the bubble indicates the magnitude of the volume, allowing you to spot "Whales", liquidity sweeps, and understand quality of a price move.
⚠️ Important Requirement
This script uses footprint charts.
To use this indicator, you may need a PulseWire plan that supports Footprint Charts (typically Essential, Plus, or Premium). If your plan does not support footprint data, the indicator MAY NOT LOAD.
Footprint charts only have history accurate up to a certain extent(~5 days based on my testing). Replay mode will only be accurate during this timeframe, replaying further will result in unreliable footprint data, resulting in unreliable bubbles.
Key Features
1. Imbalance Detection
The script scans inside every candle at the tick level (Footprint data). It flags price levels where:
Aggressive Buyers > Sellers (by a user-defined ratio, e.g., 3x).
Aggressive Sellers > Buyers.
The total volume at that level exceeds a noise filter.
2. Dynamic Auto-Scaling
Auto-Scale Mode: The indicator automatically detects the largest volume bubble currently on your screen and scales all other bubbles relative to it. This ensures you always see the relative importance of trades, regardless of whether the asset is liquid (like BTC) or illiquid.
3. Two Visual Modes
Size Scaling (Classic): Bubbles grow larger as volume increases.
Transparency Scaling (Heatmap): Bubbles stay a fixed size but become more solid/opaque as volume increases.
4. POC (Point of Control)
Optionally plots a stepped line showing the Point of Control (highest volume price) for each bar, helping you track where value is migrating.
Settings Guide
General
Ticks per Row: Controls the granularity. 1 is the most detailed (tick-by-tick). Higher numbers (e.g., 5 or 10) group ticks together, useful for high-price assets like NQ or BTC.
Bubble Filters
Imbalance Ratio: The strength required to trigger a bubble. Default 3.0 means Buy Volume must be 3x Sell Volume.
Min Volume Filter: The minimum total volume required to show a bubble at all. Use this to hide "noise" and focus on significant activity.
Visual Modes
Auto-Scale Max Volume: Highly recommended. It adjusts the bubble definition based on the current chart view.
Manual Max Volume: If Auto-Scale is off, this defines what volume is required to create a "Huge" bubble.
Indicator

Indicator

Smart Gap Concepts [MarkitTick]💡 This indicator automates the identification and classification of price gaps, commonly known as Fair Value Gaps (FVG) or Imbalances, by integrating market structure and volume analysis. Unlike standard gap detectors that simply highlight empty space on a chart, this script applies algorithmic filters to categorize gaps into three distinct phases of market movement: Breakaway, Runaway, and Exhaustion. This helps traders understand the potential context of a move rather than just seeing a support or resistance zone.
● Originality and Utility
The primary innovation of this tool is its dynamic classification system. It moves beyond visual detection by checking the "why" behind the gap. By referencing Swing Highs and Swing Lows (Market Structure) alongside Volume efficiency, it determines if a gap represents a breakout, a trend continuation, or a climatic end to a move. Additionally, the script features an automated mitigation tracking system that removes gaps from the chart once price has re-tested the midpoint, ensuring the visual workspace remains clean and relevant to current price action.
● Methodology
The script operates on a multi-stage logic engine:
• Gap Detection
It first identifies the core imbalance where the Low of the current bar does not overlap with the High of the bar two periods prior (for bullish gaps), ensuring the intervening candle represents a strong displacement.
• Structural Analysis (Breakaway Gaps)
The script monitors Pivot Highs and Lows. If a gap occurs simultaneously with a close beyond a key structural Pivot, it is classified as a "Breakaway Gap." This signals the potential start of a new trend.
• Volume and Time Analysis (Exhaustion Gaps)
To identify potential reversals, the script looks for "Trend Maturity." If a gap forms after a long duration since the last pivot and is accompanied by a volume spike (defined by the Volume Spike Multiplier), it is labeled as an "Exhaustion Gap."
• Continuation (Runaway Gaps)
If a gap is valid but meets neither the Breakaway nor Exhaustion criteria, it is considered a "Runaway Gap," typically found in the middle of an established trend.
• Dynamic Cleanup
The script tracks the midpoint of every active gap. If price creates a lower low (for bullish gaps) or higher high (for bearish gaps) beyond this midpoint, the gap is considered mitigated and is removed from the screen.
📖 How to Use
Traders can utilize the color-coded classifications to gauge market intent:
Breakaway (Default Blue): Watch these zones for potential trend initiations. These are often high-probability areas for a retest entry after a structure break.
Runaway (Default Orange): These indicate strong momentum. They can be used to trail stop-losses or add to winning positions, as price should ideally not close below these gaps in a healthy trend.
Exhaustion (Default Red): Be cautious when these appear. They suggest the current move is overextended and a reversal or complex pullback may be imminent.
• Exhaustion Gap : A Practical Case Study
• Breakaway Gap: A Practical Case Study
• Runaway Gap : A Practical Case Study
⚙️ Inputs and Settings
Min Gap Size (Points): Filters out insignificant gaps smaller than this threshold.
Structure Lookback: Defines the sensitivity of the Pivot detection (Swing High/Low).
Volume Avg Length & Multiplier: Determines what qualifies as a "Volume Spike" for exhaustion logic.
Trend Maturity: The minimum number of bars required to consider a trend "old" enough for an exhaustion signal.
Visual Settings: Custom colors for each gap type and box extension length.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Indicator

Liquidity Void and Repair EngineLiquidity Void & Repair Engine
OVERVIEW
The Liquidity Void & Repair Engine is a high-fidelity institutional order flow tool designed to identify and track "Market Imbalances" or "Fair Value Gaps" (FVG). Unlike standard gap indicators that clutter the chart with every minor price jump, this engine uses Volatility-Adjusted Range Mapping to isolate high-conviction voids where price moved so rapidly that liquidity was left "unfilled."
The standout feature of this tool is its Active Repair Logic. The engine doesn't just draw static boxes; it monitors price action in real-time to determine when an imbalance has been "healed" by subsequent trading volume, providing a dynamic look at where the market has "unfinished business."
TECHNICAL LOGIC & ORIGINALITY
This script is published Open Source to contribute to the Pine Script community’s understanding of dynamic object management and order flow visualization.
ATR-Relative Filtering: To ensure only significant voids are plotted, the script uses a user-defined ATR (Average True Range) multiplier. This filters out market noise and focuses on institutional "impulse" moves.
Dynamic Box Management: Utilizing the Pine Script box array system, the script manages memory efficiently by updating existing objects rather than creating redundant ones.
The "Repair" Algorithm: The script tracks the high and low of every active void. When price action fully traverses the coordinates of a void, the script "seals" the box, visually marking the moment of liquidity equilibrium.
HOW TO USE
1. Identifying the "Magnet" (The Void)
When price moves aggressively, it leaves a "hole" in the auction.
Bullish Voids (Green): These represent areas where price surged so fast that buyers may still have unfilled orders sitting below. These act as Magnets for pullbacks.
Bearish Voids (Red): These represent areas where price plummeted, leaving a vacuum of selling pressure. These act as Magnets for relief rallies.
2. Trading the "Repair" Process
The Engine tracks how the market "repairs" these holes:
Partial Fill: If price enters a box but doesn't cross it, the "Magnet" is still active.
Full Repair: When a box is "sealed" (stops extending right), it indicates the imbalance is gone. If price "Seals" a green box and then bounces, it confirms the zone as Valid Institutional Support.
3. Confluence with the Trend
Continuation: In a strong uptrend, look for price to drop into a Green Bullish Void and find support. This is often the "Golden Entry" for trend followers.
Reversal Confirmation: If price ignores a Red Bearish Void and blasts right through it (sealing it instantly), it signals a massive shift in market regime and extreme bullish conviction.
USER SETTINGS
Lookback Period: How far back the engine searches for un-repaired gaps.
Min Gap Size (ATR %): Increase this to see only the "Major" institutional gaps; decrease it for a more granular intraday look.
Visual Styles: Fully customizable colors and transparency to match any chart theme (Dark/Light).
NOTES & DISCLAIMER
This script is a visualization of historical price imbalances and is intended for educational purposes only. It does not provide trade signals, entry/exit points, or financial advice. All trading involves risk. Indicator

FVG Heatmap [Hash Capital Research]FVG Map
FVG Map is a visual Fair Value Gap (FVG) mapping tool built to make displacement imbalances easy to see and manage in real time. It detects 3-candle FVG zones, plots them as clean heatmap boxes, tracks partial mitigation (how much of the zone has been filled), and summarizes recent “fill speed” behavior in a small regime dashboard.
This is an indicator (not a strategy). It does not place trades and it does not publish performance claims. It is a market-structure visualization tool intended to support discretionary or systematic workflows.
What this script detects
Bullish FVG (gap below price)
A bullish FVG is detected when the candle from two bars ago has a high below the current candle’s low.
The zone spans from that prior high up to the current low.
Bearish FVG (gap above price)
A bearish FVG is detected when the candle from two bars ago has a low above the current candle’s high.
The zone spans from the current high up to that prior low.
What makes it useful
Heatmap zones (clean, readable FVG boxes)
Bullish zones plot below price. Bearish zones plot above price.
Partial fill tracking (mitigation progress)
As price trades back into a zone, the script visually shows how much of the zone has been filled.
Mitigation modes (your definition of “filled”)
• Full Fill: price fully trades through the zone
• 50% Fill: price reaches the midpoint of the zone
• First Touch: price touches the zone one time
Optional auto-cleanup
Optionally remove zones once they’re mitigated to keep the chart clean.
Fill-Speed Regime Dashboard
When zones get mitigated, the script records how many bars it took to fill and summarizes the recent environment:
• Average fill time
• Median fill time
• % fast fills vs % slow fills
• Regime label: choppy/mean-revert, trending/displacement, or mixed
How to use
Use FVG zones as structure, not guaranteed signals.
• Bullish zones are often watched as potential support on pullbacks.
• Bearish zones are often watched as potential resistance on rallies.
The fill-speed dashboard helps provide context: fast fills tend to appear in more rotational conditions, while slow fills tend to appear in stronger trend/displacement conditions.
Alerts
Bullish FVG Created
Bearish FVG Created
Notes
FVGs are not guaranteed reversal points. Fill-speed/regime is descriptive of recent behavior and should be treated as context, not prediction. On realtime candles, visuals may update as the bar forms. Indicator

Imbalance Heatmap (Free) – pc75A clean, efficient visualisation of liquidity voids, 3-bar imbalances, and price inefficiency zones.
This indicator highlights where the market left gaps in the order flow — areas price often revisits to rebalance.
Imbalances are displayed as stacked horizontal “heatmap strips,” making it easy to see:
Where aggressive buying/selling left a void
Whether multiple voids overlap (stronger zones)
Whether price is likely to return to fill the imbalance
How old a void is (older zones are marked differently)
This is a refined v6 rewrite based on a script I liked, completely modernised with cleaner logic, better performance, and optional labels.
🔍 Features
3-bar liquidity void detection (ICT-style logic)
Bullish imbalance when price displaces upward with no wick overlap
Bearish imbalance for downward displacement
✔ Heatmap-style visualisation
Each imbalance is sliced into multiple thin horizontal bands to create a visual density effect.
✔ Stacking intelligence
If a new void overlaps previous ones, the heatmap is drawn brighter, showing areas where the market left multiple inefficiencies.
✔ “Void xN” labels
Optional labels show how many overlapping voids existed at the moment the imbalance formed.
✔ Automatic deletion when filled
As soon as price trades back through a slice, that slice is removed.
This keeps the chart clean and focuses only on active inefficiencies.
✔ Smart ageing
Older voids are marked with a subtle border so you can distinguish freshly formed inefficiencies from historical ones.
✔ Alerts
Set alerts for when price taps a stacked imbalance zone (“Void x2” and above).
⚙ Inputs & Customisation
ATR threshold (optional)
Minimum tick size gap
Number of heatmap slices
Bullish / bearish toggles
Label toggles
Colour and transparency configuration
Max slice memory for performance
💡 How to Use
Imbalance zones often behave as:
Magnets → price gravitates toward them
Support/resistance → structure respects inefficiencies
Continuity points → used with market structure shifts
Targets → for both scalpers and swing traders
Strong (stacked) voids typically represent areas of institutional displacement, where the market is more likely to return for rebalancing.
📢 Notes
This is the free version.
Educational only — not financial advice. Indicator

Indicator

Effort HeatmapThe Effort Heatmap visualizes where meaningful, same-direction volume occurred inside an imbalance during strong directional movement.
Instead of analyzing total bar volume or traditional volume-at-price distributions, this tool reconstructs a simplified internal volume profile using lower-timeframe data.
When a Fair Value Gap forms during a high-volume displacement, the script highlights the portions of the imbalance candle where directional effort was concentrated and projects those regions forward as a heatmap.
The purpose of this indicator is not to predict price or represent institutional activity, but to offer a visual way to study how the market delivered volume inside a move that created an imbalance.
How It Works
1. Lower-Timeframe Volume Extraction
The indicator retrieves open, close, and volume data from a selected lower timeframe.
Only sub-candles that move in the same direction as the previous bar are considered, ensuring the heatmap reflects directional effort—not mixed volume.
2. Candle Body Binning
The FVG candle is divided into multiple horizontal bins.
Each lower-timeframe sub-candle contributes volume proportionally to the bins it overlaps, creating a vertical volume distribution for that bar.
3. Imbalance (FVG) Detection
A simple 3-bar displacement logic detects bullish or bearish imbalances.
An optional Z-Score filter ensures the heatmap only forms when volume is relatively elevated compared to recent history.
4. Heatmap Projection
When a qualifying imbalance occurs:
• The FVG bar’s volume distribution is normalized
• Only areas with relatively elevated volume are displayed
• Colored heatmap boxes are created and extend forward
• These boxes remain until price trades into or through them
This allows traders to observe how price interacts with past zones of concentrated directional effort.
What Makes It Different
Most volume tools focus on fixed session profiles, market-wide volume-at-price calculations, or bar-level volume totals.
The Effort Heatmap instead reconstructs a per-bar vertical volume distribution using lower-timeframe price action and displays it only when displacement occurs.
Rather than treating the candle as a single block of volume, the indicator highlights where inside the candle body volume was delivered while moving in the displacement direction.
This creates a unique visualization of directional effort that conventional profiles, OB/FVG indicators, and classic oscillators do not show.
How to Use It
1. Apply to any timeframe: The indicator works on all chart timeframes, but gains more detail when higher timeframes are used in combination with lower-timeframe volume data.
2. Identify displacement moments: When a bullish or bearish FVG forms with a high volume Z-Score, the heatmap will appear.
3. Observe the heatmap structure:
Each horizontal band represents the relative concentration of same-direction volume inside the previous candle.
4. Watch how price interacts with these zones:
Heatmap areas extend until price touches or trades through them, at which point they stop extending and are finalized.
5. Combine with your own analysis:
These areas can be used to study...
...how past directional volume clusters influence current movement
...structural reactions to zones of prior effort
...which parts of a displacement candle were most active
The indicator is a visual study tool, not a signal generator.
Settings
• Volume Source Timeframe
Chooses the lower timeframe used to reconstruct internal volume. Smaller timeframes give more detail; larger timeframes give smoother profiles.
• Z-Score Lookback
Controls how many bars are used to measure relative volume. Larger values make the volume filter stricter.
• Z-Score Threshold
Minimum relative-volume strength required to draw a heatmap. Higher values show only high-effort moves.
• Volume Filter (%)
Removes weaker bins based on how much volume they contain compared to the strongest one. Higher percentages = fewer but more meaningful zones.
• Bullish / Bearish Colors
Sets the base color for heatmap boxes depending on direction.
Indicator

Quantura - Fair Value GapIntroduction
“Quantura – Fair Value Gap” is a precision-engineered institutional concept indicator designed to automatically identify, visualize, and manage Fair Value Gaps (FVGs) across any market or timeframe. It enables traders to observe price inefficiencies, potential liquidity voids, and retracement areas that often act as magnets for price rebalancing.
Originality & Value
Unlike many public FVG scripts that only highlight candle gaps, this indicator integrates dynamic filters and adaptive logic to determine the strength and reliability of each gap. It merges overlapping zones intelligently and optionally extends valid imbalances forward for ongoing reference.
Its value lies in:
Dynamic statistical filtering based on gap standard deviation.
Optional volume confirmation for high-confidence FVGs.
Automatic merging of overlapping or adjacent gaps for clean visualization.
Support for both bullish and bearish imbalances.
Signal alerts when gaps are filled or rebalanced by price.
Functionality & Core Logic
Detects Fair Value Gaps by comparing candle-to-candle price displacement.
Applies a Gap Filter (standard deviation-based) to qualify valid gaps.
Optionally validates gaps formed under significant volume conditions.
Draws color-coded boxes to mark bullish (discount) and bearish (premium) inefficiencies.
Monitors each FVG until price fills the gap, at which point the box is visually closed.
Provides optional signal markers (“▲” or “▼”) when rebalancing occurs.
Parameters & Customization
Gap Filter: Sets the minimum statistical deviation required for a valid FVG. Higher values detect fewer, stronger gaps.
Volume Filter: Toggles additional validation using relative volume strength.
Volume Sensitivity: Adjusts how much above-average volume must be present to confirm a gap.
Bullish/Bearish Colors: Customize color schemes for imbalance zones.
Extend Gaps: Optionally extend open gaps forward for better confluence tracking.
Signals: Enables or disables gap-fill signal markers.
Visualization & Display
Bullish FVGs: Appear in blue-tinted boxes, indicating potential demand-side inefficiencies.
Bearish FVGs: Appear in red-tinted boxes, representing potential supply-side inefficiencies.
Overlapping zones are merged automatically to maintain clarity.
Filled gaps remain visible for historical context, allowing for post-event analysis.
Optional signal arrows display when price returns to rebalance an FVG.
Use Cases
Identify institutional inefficiencies and liquidity voids.
Detect premium and discount levels in trending markets.
Combine with market structure or order block indicators for confluence.
Track when price rebalances inefficiencies to refine entry/exit points.
Build FVG-based algorithmic strategies that rely on structural imbalance resolution.
Limitations & Recommendations
The indicator detects structural imbalances but does not predict future direction or guarantee profitability.
Volume filters may behave differently across brokers due to data-source differences.
Use alongside structure or liquidity tools for enhanced decision-making.
Extreme volatility or illiquid assets may generate temporary invalid gaps.
Markets & Timeframes
Compatible with all markets (crypto, forex, equities, indices, futures) and all timeframes. Recommended for multi-timeframe confluence analysis — e.g., detecting higher-timeframe FVGs and refining lower-timeframe entries.
Author & Access
Developed 100% by Quantura. Published as a Open-source script indicator. Access is free.
Compliance Note
This description adheres fully to PulseWire’s House Rules and Script Publishing Requirements . It provides a detailed explanation of originality, core logic, limitations, and appropriate use — with no unrealistic or misleading performance claims. Indicator

Volume Surprise [LuxAlgo]The Volume Surprise tool displays the trading volume alongside the expected volume at that time, allowing users to spot unexpected trading activity on the chart easily.
The tool includes an extrapolation of the estimated volume for future periods, allowing forecasting future trading activity.
🔶 USAGE
We define Volume Surprise as a situation where the actual trading volume deviates significantly from its expected value at a given time.
Being able to determine if trading activity is higher or lower than expected allows us to precisely gauge the interest of market participants in specific trends.
A histogram constructed from the difference between the volume and expected volume is provided to easily highlight the difference between the two and may be used as a standalone.
The tool can also help quantify the impact of specific market events, such as news about an instrument. For example, an important announcement leading to volume below expectations might be a sign of market participants underestimating the impact of the announcement.
Like in the example above, it is possible to observe cases where the volume significantly differs from the expected one, which might be interpreted as an anomaly leading to a correction.
🔹 Detecting Rare Trading Activity
Expected volume is defined as the mean (or median if we want to limit the impact of outliers) of the volume grouped at a specific point in time. This value depends on grouping volume based on periods, which can be user-defined.
However, it is possible to adjust the indicator to overestimate/underestimate expected volume, allowing for highlighting excessively high or low volume at specific times.
In order to do this, select "Percentiles" as the summary method, and change the percentiles value to a value that is close to 100 (overestimate expected volume) or to 0 (underestimate expected volume).
In the example above, we are only interested in detecting volume that is excessively high, we use the 95th percentile to do so, effectively highlighting when volume is higher than 95% of the volumes recorded at that time.
🔶 DETAILS
🔹 Choosing the Right Periods
Our expected volume value depends on grouping volume based on periods, which can be user-defined.
For example, if only the hourly period is selected, volumes are grouped by their respective hours. As such, to get the expected volume for the hour 7 PM, we collect and group the historical volumes that occurred at 7 PM and average them to get our expected value at that time.
Users are not limited to selecting a single period, and can group volume using a combination of all the available periods.
Do note that when on lower timeframes, only having higher periods will lead to less precise expected values. Enabling periods that are too low might prevent grouping. Finally, enabling a lot of periods will, on the other hand, lead to a lot of groups, preventing the ability to get effective expected values.
In order to avoid changing periods by navigating across multiple timeframes, an "Auto Selection" setting is provided.
🔹 Group Length
The length setting allows controlling the maximum size of a volume group. Using higher lengths will provide an expected value on more historical data, further highlighting recurring patterns.
🔹 Recommended Assets
Obtaining the expected volume for a specific period (time of the day, day of the week, quarter, etc) is most effective when on assets showing higher signs of periodicity in their trading activity.
This is visible on stocks, futures, and forex pairs, which tend to have a defined, recognizable interval with usually higher trading activity.
Assets such as cryptocurrencies will usually not have a clearly defined periodic trading activity, which lowers the validity of forecasts produced by the tool, as well as any conclusions originating from the volume to expected volume comparisons.
🔶 SETTINGS
Length: Maximum number of records in a volume group for a specific period. Older values are discarded.
Smooth: Period of a SMA used to smooth volume. The smoothing affects the expected value.
🔹 Periods
Auto Selection: Automatically choose a practical combination of periods based on the chart timeframe.
Custom periods can be used if disabling "Auto Selection". Available periods include:
- Minutes
- Hours
- Days (can be: Day of Week, Day of Month, Day of Year)
- Months
- Quarters
🔹 Summary
Method: Method used to obtain the expected value. Options include Mean (default) or Percentile.
Percentile: Percentile number used if "Method" is set to "Percentile". A value of 50 will effectively use a median for the expected value.
🔹 Forecast
Forecast Window: Number of bars ahead for which the expected volume is predicted.
Style: Style settings of the forecast.
Indicator

IMB zones, alerts, 8 EMAs, DO lvlThis indicator was created to be a combined indicator for those who use DO levels, IMBs, and EMAs in their daily trading, helping them by providing a script that allows them to customize these indicators to their liking.
Here you can set the IMBs, DO levels, and EMAs. Its special feature is that it uses alerts to indicate which IMB zones have been created, along with the invalidation line for the new potential IMB.
The program always calculates the Daily Opening (DO) level from the opening of the broker, and you can set how many hours the line should be drawn.
Help for use:
There are 3 types of alerts:
- Use the "Bullish IMB formed" alert if you are looking for Bull IMBs.
- Use the "Bearish IMB formed" alert if you are looking for Bear IMBs.
- Use the "Either IMB" alert if you are looking for Bull and Bear IMBs.
Tip: Set the alert type "Once per bar close" if you do not want to set new alerts after an IMB is formed.
IMBs:
- Customizable IMB quantity (1-500 pcs)
- Zone colors and borders can be customized
- Potential IMB line can be customized
EMAs:
- You can set and customize 8 EMA lengths
- Only the current and higher timeframe EMAs are displayed
Daily Open Level:
- Displays today's Daily Open level
- Note: The DO level does not work in Replay mode
Last OFR:
"Show True OFR" checkbox added.
It displays the latest OFR, and hides the old ones. Indicator

Indicator

Machine Learning-Inspired Supply & Demand Zones [AlgoPoint]This indicator is a Smart Supply & Demand Zone tool, developed with principles inspired by Machine Learning (ML). It intelligently filters out market noise, allowing you to focus only on the most significant zones where institutional order flow is likely present.
💡 How It Works: Why Is This Indicator "Smart"?
Unlike traditional indicators that only measure simple price movements, this script uses an algorithm that asks the same critical questions an experienced market analyst would to qualify a zone:
- 1. Price Imbalance: How fast and aggressively did the price leave the zone? Our algorithm measures the body size of the "departure candle" relative to the current market volatility (ATR). A zone is only considered if it was formed by an explosive move that is statistically significant, indicating a major imbalance between buyers and sellers.
- 2. Volume Confirmation: Did the "smart money" participate in this move? The script checks if the volume on the departure candle was significantly higher than the recent average volume. A spike in volume confirms that the move was backed by institutional interest, adding strength and validity to the zone.
- 3. Valid Pivot Structure: Did the zone originate from a meaningful swing high or low? The algorithm first identifies a valid pivot structure, ensuring that zones are not drawn from insignificant or random price fluctuations.
Only when a potential zone passes these three critical tests—our "quality filter"—is it drawn on your chart.
🚀 Features & How to Use
Using the indicator is straightforward. You will see two primary types of boxes on your chart:
* 🟥 Red Box (Supply Zone): An area of potential resistance where selling pressure is likely to be strong. Look for potential shorting opportunities as the price approaches this zone.
* 🟩 Green Box (Demand Zone): An area of potential support where buying pressure is likely to be strong. Look for potential long opportunities as the price pulls back into this zone.
Dynamic Zone Management
This indicator is not static; it lives and breathes with the market:
- Fresh Zone: A newly formed zone appears in its full, vibrant color. These are the highest-probability zones as they have not yet been re-tested.
- Broken / Flipped Zone: You have full control over what happens when a zone is broken! In the settings, you can choose:
- Delete Zone: The zone will be removed completely when the price closes through it.
- Show as Broken (Flip): When broken, the zone will turn gray, stop extending, and remain on your chart. This is extremely useful for identifying Support/Resistance Flips, where a broken demand zone becomes new resistance, or a broken supply zone becomes new support.
⚙️ Settings & Customization
Fine-tune the indicator to match your personal trading style via the settings menu:
- Breakout Behavior: The most powerful feature. Choose between Delete Zone and Show as Broken (Flip) to customize your chart.
- Zone Finding Logic: Control the indicator's sensitivity.
- Selective: Requires both strong imbalance and high volume. Finds fewer, but higher-quality, zones.
- Moderate: Requires either strong imbalance or high volume. Finds more potential zones.
- Sensitivity Settings: Adjust the ATR Multiplier and Volume Multiplier to make the criteria for a "strong" zone stricter or looser.
Indicator
