The Ultimate Indicator by @JustinPerezTrades**Combined LuxAlgo Indicator**
**SMC + HTF PO3 + Opening Range Breakouts & Targets**
This is a single, all-in-one PulseWire indicator that merges three popular LuxAlgo tools:
1. **Smart Money Concepts (SMC)** – Market structure, order blocks, fair value gaps, equal highs/lows, premium/discount zones, etc.
2. **HTF PO3** – Higher-timeframe candle projections with open/high/low/close mapping and volume delta.
3. **Opening Range Breakouts & Targets (ORB)** – Opening range, breakout signals, measured targets, and session moving average.
Everything runs on one chart with organized input groups so you can turn features on/off independently.
---
### What Each Section Does
#### 1. Smart Money Concepts (SMC)
- **Internal & Swing Structure** → Shows BOS (Break of Structure) and CHoCH (Change of Character).
- **Order Blocks** → Internal and Swing order blocks (bullish/bearish).
- **Equal Highs / Equal Lows** → Liquidity levels.
- **Fair Value Gaps (FVG)** → Imbalance zones.
- **Strong/Weak Highs & Lows** → Current swing extremes labeled.
- **Premium / Discount / Equilibrium Zones** – Based on the current swing range.
- **Multi-Timeframe Highs & Lows** (Daily / Weekly / Monthly).
- Optional candle coloring based on internal trend bias.
#### 2. HTF PO3
- Projects higher-timeframe candles to the right of the chart.
- Shows Open, High, Low, Close levels with dashed connectors from the live chart.
- Displays running volume **Delta** for the current HTF candle.
- Useful for seeing where the higher timeframe is currently building its candle.
#### 3. Opening Range Breakouts & Targets (ORB)
- Draws the Opening Range (default 30-minute, or custom session).
- Marks OR High, OR Low, and midpoint.
- Breakout signals (▲ / ▼) with optional Daily Bias filter.
- Automatic measured targets based on a percentage of the Opening Range width.
- Adaptive or Extended target display.
- Optional session-based Moving Average that resets every day at the Opening Range start.
---
### How to Use the Indicator
#### Step 1 – Add to Chart
1. Open PulseWire Pine Editor.
2. Paste the full combined script (make sure it starts with `//@version=6` and has **no** markdown backticks or notes at the top/bottom).
3. Click **Save** → **Add to chart**.
#### Step 2 – Organize the Inputs
The settings are clearly grouped:
| Group Name | What it controls |
|-------------------------------------|--------------------------------------|
| **SMC - Smart Money Concepts** | Overall SMC mode & style |
| **SMC - Real Time Internal Structure** | Internal BOS/CHoCH |
| **SMC - Real Time Swing Structure** | Swing BOS/CHoCH + swing points |
| **SMC - Order Blocks** | Internal & Swing OBs |
| **SMC - EQH/EQL** | Equal Highs / Lows |
| **SMC - Fair Value Gaps** | FVG settings |
| **SMC - Highs & Lows MTF** | Daily/Weekly/Monthly levels |
| **SMC - Premium & Discount Zones** | Premium / Equilibrium / Discount |
| **HTF PO3 - Higher Timeframe Settings** | HTF timeframe, candles shown, offset |
| **HTF PO3 - Visual Style** | Colors, labels, delta |
| **ORB - Historical Display** | Keep or clear previous sessions |
| **ORB - Opening Range** | OR timeframe |
| **ORB - Custom Range** | Custom session times |
| **ORB - Breakout Signals** | Signal style & bias filter |
| **ORB - Targets** | Target % and display mode |
| **ORB - Session Moving Average** | Optional MA |
| **ORB - Style** | Colors and line styles |
#### Step 3 – Recommended Starting Setup
**For most traders:**
- **SMC**
- Mode: `Historical`
- Show Internal Structure: On
- Show Swing Structure: On
- Internal Order Blocks: On (size 5)
- Equal High/Low: On
- Fair Value Gaps: Off (or On if you use them)
- Premium/Discount Zones: On
- **HTF PO3**
- HTF Timeframe: `60` (or `240` / `D` depending on your style)
- Candles to Show: `1` or `2`
- Show Price Labels: On
- Show Running Delta: On
- **ORB**
- Time Period: `30` (or match your market’s opening range)
- Show Breakout Signals: On
- Signal Bias: `No Bias` (or `Daily Bias` if you want stricter signals)
- Show Targets: On
- Target % of Range: `50`
- Target Display: `Adaptive`
#### Step 4 – Practical Workflow
1. **Mark the Opening Range** first (ORB section).
2. Wait for a breakout of OR High or OR Low → look for the signal.
3. Use **SMC structure** to confirm the direction (BOS / CHoCH).
4. Check if price is interacting with an **Order Block** or **Fair Value Gap**.
5. Glance at the **HTF PO3** projection to see where the higher timeframe candle is currently trading relative to its open.
6. Use Premium / Discount zones to decide whether you are buying in discount or selling in premium.
---
### Tips & Best Practices
- Start with fewer features turned on. Too many lines/boxes can clutter the chart.
- Use the **Present** mode in SMC if you only want the most recent structure (cleaner look).
- The HTF PO3 candles are drawn to the **right** of the current bar — they are projections, not historical candles.
- ORB targets are measured moves based on the Opening Range width. Adjust the % to match the instrument’s typical volatility.
- The session MA only works properly on intraday timeframes (it resets at the start of the Opening Range).
---
### Alerts Available
All original SMC alerts are included:
- Internal / Swing BOS & CHoCH (bullish & bearish)
- Order Block breakouts
- Equal Highs / Lows
- Fair Value Gaps
You can set alerts on any of these from the PulseWire alert menu. Indicator

PO3 Matrix+ (M1D)PO3 Matrix+ (M1D)
Projects the recent candles of a chosen higher timeframe as a compact candle matrix beside live price, then marks the liquidity events, structure and PD array context that develop on that timeframe — taken swings, structure shifts, fair value gaps, previous-day levels, and cross-market divergence. The intent is to read higher-timeframe conditions without leaving the execution chart, and to keep every drawn element sourced from the same data so nothing drifts out of step.
── HOW IT IS BUILT ──
The selected higher timeframe is pulled once, as a snapshot of its recent candles, and every element is drawn on the last bar from that one source. Dividers, high/low rails, quadrants, sweeps, gaps and structure all read the same array, so they cannot disagree with each other. The forming candle is accumulated from chart bars, so it updates live without repainting its history.
Level lines are origin-anchored: each one begins at the candle that actually printed the extreme, not at the bar where the level happened to be calculated. Derived midlines (equilibrium, the inner quartiles) have no originating candle, so they run from the period open instead.
── WHAT IT DRAWS ──
PO3 CANDLE MATRIX — the selected higher timeframe's recent candles, projected to the right of price with time dividers on the live chart and a per-candle high/low rail. A countdown above the block shows the timeframe in use and the time left on the forming candle. The PD array context is mirrored onto the block at its own horizontal scale, and each event carries a compact direction marker there, so the block reads as a standalone view of what that timeframe is showing.
CANDLE EQUILIBRIUM — the true 50 percent of each completed candle in the block, as a reference the following candle can retrace into.
CURRENT-RANGE QUADRANTS — the forming candle's high, 75 percent, equilibrium, 25 percent and low projected across price as a live premium and discount reference.
LIQUIDITY SWEEPS — only swing liquidity is marked. A level qualifies when it is a swing high or swing low that a later candle raids and then closes back inside: wick beyond, body back within. A candle that simply trades past its neighbour is not a sweep and is not marked.
SMT DIVERGENCE — the correlated market is read on the same higher-timeframe grid, so the two align candle for candle. A SMT is marked when your chart takes a swing but the peer fails to take its matching swing, meaning the move lacked cross-market participation. The peer auto-pairs across equity indices, precious metals and BTC against ETH, in matching contract sizes, and can be overridden with any symbol. It deliberately does not guess a peer for markets where the correlation is too loose for a divergence to mean anything; with no pairing, no SMT is drawn. A SMT is invalidated in real time once price trades back through the extreme that formed it, and is then either faded or removed.
MARKET STRUCTURE SHIFT — a true swing broken by a body close. A swing here means a level price actually turned at: a swing low sits at the change from a down candle to an up candle, a swing high at the change from an up candle to a down one. A low that merely sits under its neighbours while price kept running the same way is not a swing and is never used, which is what separates this from a plain pivot break. The first candle to CLOSE beyond the swing's full wick — body, not wick — marks the shift; later closes past the same level are continuation and are not marked. An optional setting requires a liquidity raid to precede the shift, for the classic sweep-then-shift sequencing: a buyside raid before a bearish shift, a sellside raid before a bullish one.
FAIR VALUE GAPS (BISI+ / SIBI-) — detected on the higher-timeframe snapshot, so they are multi-timeframe by construction. Only fully formed gaps are drawn; a gap still forming on the live candle is ignored until it completes. Each zone moves through four states: live, active, inverted, or spent. A gap closed clean through has inverted — the old support is now resistance, or the reverse — and it stays inverted, flipped and redrawn in the inversion colour, for as long as that break holds. No retest is required, because a retest is where the level gets traded rather than what makes it valid. Closing back through in the original direction takes the gap back; the zone is spent, and fades but stays on the chart as history rather than disappearing.
PREVIOUS-DAY LEVELS — previous high, low and equilibrium, drawn from session start and dimming once taken. Three definitions of the day are offered because they genuinely differ on futures: the symbol's own daily candle, midnight to midnight New York, or the regular-hours session only. Regular hours are taken from the instrument itself rather than a fixed clock, so index futures, metals and everything else each use their own session. The label carries the source date, so a level that is several days old after a weekend reads as intentional.
CONTEXT TABLE — day, AMD phase, forming-candle bias, premium or discount, higher-timeframe direction, last sweep, market structure shift, fair value gap, previous-day status, and a session-close countdown. SMT is drawn on the chart and the block but does not have its own table row.
── SETTINGS WORTH KNOWING ──
The higher timeframe must be above the chart timeframe; the script says so on the chart if it is not.
Session handling is read from the instrument, not hardcoded, so the regular-hours option and the session countdown are correct on index futures, metals and anything else without configuration. Instruments that trade around the clock have no regular session, and the countdown says so rather than inventing one.
Every drawn element can be turned on or off on its own, and the chart labels and the compact markers on the projected block are controlled separately, so the block can be kept clean while the chart stays annotated. Label size, colour, vertical clearance, which side of a line a label sits on, and the marker glyph style are all adjustable.
Fair value gap sensitivity is measured against the average range of the visible higher-timeframe candles, so it scales per instrument rather than being a fixed distance. Raise the minimum height and displacement to keep only the larger gaps.
Market structure shift has an optional displacement requirement, off by default. Turn it on if you want the shifting candle to also expand or leave a gap, which reduces how often it marks.
Sweeps, gaps and structure marks each have a maximum shown, so the chart stays contained rather than accumulating history indefinitely. Gap zones also declutter against each other: two translucent zones stacked on the same prices multiply into a solid block, so a zone overlapping one already drawn beyond an adjustable tolerance is skipped and the most recent gap in that price band is the one kept. The same idea applies to stacking: two same-direction zones separated by only a thin seam read as one inefficiency wearing two boxes, so the older one is removed and the newest kept. Zones facing opposite directions are never removed for sitting close together — they are genuinely different reads.
── NOTES ──
Detection runs on completed higher-timeframe candles. The forming candle updates live, but a gap or a structure mark is only considered once the candles that define it have closed.
SMT is not available in bar replay. Replay rewinds the chart symbol only, so the correlated symbol keeps returning its live data and the two grids no longer line up; the table reports Misaligned and no divergence is drawn. That is the alignment guard working, not a fault. Every other feature reads from the chart symbol and replays normally.
Everything drawn is context. There are no entry or exit instructions, no directional calls, and no performance claims of any kind. It reports what has happened on the higher timeframe.
This is a market-analysis tool, not financial advice. Past market behaviour does not indicate future results. Test any tool thoroughly and trade your own plan.
Indicator

EZ FVG By PymanderPymander’s EZ Fair Value Gap is an advanced FVG and IFVG tool built to find meaningful imbalance zones while filtering out weaker market noise.
Unlike basic gap finders that simply draw every three-candle imbalance, EZ FVG evaluates gap size, displacement, volume, trend, VWAP, market structure, liquidity sweeps, and market regime. Each zone receives a quality score and classification, helping traders focus on the strongest opportunities.
Key features include:
* Bullish and bearish FVG detection
* Automatic IFVG conversion
* Quality scoring and zone classifications
* First-retest and reaction tracking
* Multi-timeframe FVG detection
* Optional risk-to-reward filtering
* Mitigation, invalidation, and expiration tracking
* Map, Trade, Elite, and Focus modes
* Custom alerts and an active-zone dashboard
EZ FVG is more than a box-drawing indicator—it is a complete zone-quality and reaction engine designed to provide cleaner charts, stronger context, and more selective setups.
Use it alongside proper risk management and a tested trading plan. Best of luck in the markets, traders—trade patiently and protect your capital.
Feedback and reviews are greatly appreciated. Please share your experience and suggestions for future updates.
Best of luck traders! Indicator

Inversion Fair Value Gaps [iFVG] (Zeiierman)█ Overview
Inversion Fair Value Gaps (Zeiierman) identifies when traditional Fair Value Gaps (FVGs) fail and transition into powerful inversion zones.
A regular Fair Value Gap represents an imbalance where price moved aggressively in one direction, leaving behind inefficient trading. While many traders expect these gaps to act as support or resistance, not every imbalance survives. Some are broken, absorbed, and eventually become areas where the opposite side of the market gains control.
This indicator continuously tracks every valid bullish and bearish FVG. When price successfully closes through an existing FVG and later forms an opposing FVG within the user-defined pairing window, the overlapping imbalance is converted into an Inversion Fair Value Gap (iFVG).
Rather than treating every FVG equally, the indicator focuses on failed imbalances that demonstrate a genuine shift in market order flow.
⚪ FVG Detection
The indicator continuously scans price using the classic three-candle Fair Value Gap model.
A Bullish FVG forms when:
• Price leaves an upside imbalance.
• The third candle creates a gap above the first candle.
A Bearish FVG forms when:
• Price leaves a downside imbalance.
• The third candle creates a gap below the first candle.
Unlike many FVG indicators, every detected gap remains internally tracked so it can later evolve into an inversion.
⚪ Inversion Fair Value Gap Detection
Once an FVG is created, it enters an internal memory system.
If price later closes completely through that imbalance, the FVG is considered broken. Rather than immediately discarding it, the indicator temporarily remembers the remaining imbalance.
If an opposing FVG forms before the memory expires, both structures are combined into a new Inversion Fair Value Gap.
Bullish iFVG
• Bearish FVG is broken.
• Bullish FVG forms shortly afterwards.
• The overlapping imbalance becomes bullish support.
Bearish iFVG
• Bullish FVG is broken.
• Bearish FVG forms shortly afterwards.
• The overlapping imbalance becomes bearish resistance.
This process filters out many ordinary FVGs and highlights only those that demonstrate a meaningful transition in buying or selling pressure.
█ How It Works
⚪ Fair Value Gap Detection
The script continuously searches for valid bullish and bearish three-candle imbalances.
Each detected FVG is validated using:
• Minimum gap size.
• Optional fractal confirmation.
• ATR-based filtering.
Only valid gaps enter the internal tracking system.
bullGap = bullW or bullB
bearGap = bearW or bearB
bullValid = bullGap and bullSz >= gapAtr * minGap
bearValid = bearGap and bearSz >= gapAtr * minGap
⚪ Memory & Inversion Detection
Every valid FVG is stored until one of two events occurs:
• Price never breaks the gap, and it eventually expires.
• Price breaks the gap and an opposing FVG forms before the pairing window ends.
When both conditions are satisfied, the overlapping imbalance becomes a confirmed iFVG. This allows the indicator to detect genuine reversals rather than simply highlighting every imbalance.
⚪ Zone Management
Each zone continuously updates its internal state.
A zone may transition through several stages:
• Active
• Tested
• Mitigated
• Frozen
• Removed
Depending on user settings, mitigated zones can either disappear or remain on the chart as historical context.
⚪ Dynamic Zone Merging
Nearby live zones of the same direction can optionally be merged into a single visual area. This reduces chart clutter while preserving the original internal detection logic. The merged display affects visualization only.
⚪ Distance Filtering
Charts containing hundreds of historical zones can quickly become difficult to read.
The indicator can automatically hide zones that are farther than a user-defined ATR distance from the current price. Hidden zones continue to exist internally and become visible again if price returns. This improves chart clarity without affecting detection, memory, or alerts.
█ How to Use
⚪ Bullish iFVG Retest
After a bullish iFVG forms, price retraces back into the inversion zone before finding support and continuing higher.
Rather than chasing the initial breakout, traders can wait for the retest and look for long confirmation as price reacts from the bullish iFVG.
⚪ Bearish iFVG Retest
After a bearish iFVG forms, price retraces back into the inversion zone before finding resistance and continuing lower.
Instead of entering during the initial breakdown, traders can wait for the retest and look for short confirmation as price reacts from the bearish iFVG.
█ Settings
Minimum FVG Size: Minimum ATR-adjusted size required before a Fair Value Gap is accepted.
Enable Fractal Filter: Requires FVGs to form near confirmed swing highs or lows.
Fractal Length: Controls how large a swing must be before it is confirmed.
Maximum Distance From FVG: Maximum allowed distance between the confirmed swing and the FVG.
Pairing Window: Number of bars a broken FVG remains eligible to form an iFVG.
Delete Mitigated Zones: Removes mitigated zones or freezes them as historical references.
Mitigation Level: Select whether mitigation occurs at the 50% level or after a full fill.
Mitigation Source: Uses wick touches or candle closes to confirm mitigation.
Filter Distant Zones: Hides zones that are far away from the current price.
Maximum Distance From Price: Maximum ATR distance before zones become hidden.
Merge Nearby Zones: Visually combines nearby live zones of the same type.
Maximum Merge Distance: Controls how close zones must be before they merge visually.
Fade With Age: Gradually fades older zones while keeping newer zones more prominent.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

Inversion FVG (iFVG) by EonMetricsInversion FVG (iFVG) by EonMetrics
🔶 WHAT IT DOES
A "fair value gap" (FVG) is a three-candle pattern where price moved so fast that the wicks of the first and third candle never overlapped — leaving a void on the chart that the market skipped over. While an FVG is fresh, traders typically expect a bullish gap to act as support and a bearish gap as resistance.
This indicator focuses on the moment that expectation FAILS — and on how it fails. An inversion FVG (iFVG) happens when price displaces through an existing gap with enough force to print a NEW fair value gap in the opposite direction, overlapping the old one. The inversion zone drawn by this script is the COMMON GROUND of those two opposing gaps — the price area where both imbalances intersect. That is where one side got trapped: broken demand turns into supply, broken supply turns into demand, and the market tends to defend that exact area when price returns to it.
It is a structure-annotation tool: it shows you where these events happen and how significant they were. It deliberately does not give buy/sell signals, entries, targets, stops, or win-rate statistics.
🔶 HOW THIS SCRIPT IS DIFFERENT
Most inversion-FVG tools use a simple rule: when a candle closes through a gap, the whole gap is recolored and called inverted. This script uses a stricter, structural definition, and adds level-management logic around it:
1. Two gaps required, intersection drawn. A slow drift through an FVG does not create an inversion here. The traversal must be violent enough to leave a fresh FVG in the opposite direction, and the zone drawn is only the overlap of the two gaps — the exact prices where the old imbalance and the new one coincide — not the whole original gap.
2. Spent levels never invert. The first candle close through the far side of a gap opens a short pairing window. If no opposing gap confirms within it, the level is considered spent and permanently dropped. Levels that price has already chopped through several times can never produce a late, meaningless inversion zone.
3. Levels are remembered independently of what you see. A gap's box may be mitigated and removed from the chart, yet its price range keeps working invisibly as a candidate level for a configurable number of bars. The displacement that flips a level often arrives well after the gap was first touched — display and detection are deliberately separated.
4. Partial consumption. When an opposing gap overlaps only part of a remembered level, only that part is consumed; the remainder stays available. A small opposing gap therefore cannot "steal" a large level from a later, proper displacement. One inverting gap can flip several remembered levels at once, and the resulting zones never overlap each other.
5. Two-condition strength grading. An inversion is tagged STRONG only when the inverting gap is both large relative to volatility AND backed by elevated volume on its displacement candle — size or volume alone is not enough.
🔶 HOW IT DETECTS EACH EVENT (THE EXACT METHOD)
1. Regular FVG: on every closed bar the script checks the classic three-candle condition — for a bullish gap, the current bar's low must be above the high from two bars ago (mirrored for bearish). Gaps smaller than a chosen multiple of ATR (a standard volatility unit, measured at the moment the gap forms) are ignored. By default these regular gaps stay INVISIBLE — they are tracked in the background purely as raw material for inversions, so the chart shows only what the tool is about: the inversion zones. One switch reveals them as a quiet context layer if you want to see what may flip next.
2. Regular FVG expiry (display): each displayed gap lives until price mitigates it, by your rules — at its 50% midpoint or only on a full fill, touched by any wick or requiring a candle close. Mitigated gaps disappear, or stay frozen as reference if you prefer. This controls only what you SEE.
3. Level memory (detection): independently of the display, every detected gap's price range is remembered for a set number of bars from its creation (Inversion Memory). A remembered level dies early if price closes through its far side and no opposing gap confirms within the pairing window (Pairing Window After Break) — that level is spent.
4. Inversion (iFVG): when a fresh gap forms in the OPPOSITE direction of a remembered level and their price ranges overlap, the inversion fires:
- The drawn zone is the intersection of the two full gaps: its top is the lower of the two gap tops, its bottom is the higher of the two gap bottoms.
- An overlap thinner than the Min FVG Size threshold neither draws a zone nor consumes the level.
- The zone is colored by its new role: support (a bearish gap was displaced upward through) or resistance (a bullish gap was displaced downward through).
- The zone is drawn starting from the ORIGINAL gap's origin, so you see the full history of the level — from the moment the imbalance first appeared, through the displacement that flipped it.
- The zone's age counter, retest and expiry logic are anchored at the inversion moment, not at the original gap.
5. Strong grading: the NEW (inverting) gap is measured. If its height is at least a chosen multiple of ATR AND the volume of its displacement candle exceeds the 20-bar volume average by a chosen multiplier, the inversion is tagged STRONG — the old gap was taken out with conviction on real participation, not by low-volume drift.
6. Inversion zone life: each iFVG shows its 50% equilibrium line (the consequent encroachment level), an age counter in bars, fires an alert on the first retest from outside, and expires by the same mitigation rules as regular gaps (50% or full, wick or close) once price trades through it against its new role.
Everything is evaluated on closed bars only, so zones, colors and labels do not repaint.
🔶 HOW TO ACTUALLY USE IT (STEP BY STEP)
1. Out of the box you see only inversion zones — that is the point of the tool. If you also want the raw material (regular gaps that may flip later), enable "Show Regular FVGs" and they appear as quiet green/red context boxes.
2. When a colored inversion zone appears, read its meaning: orange resistance = former demand that got displaced through downward; cyan support = former supply that got displaced through upward.
3. Give more weight to zones tagged STRONG — the inverting gap was large and backed by elevated volume, which traders treat as a more meaningful role-flip than a quiet leak.
4. The first return of price into the zone is the moment most iFVG traders wait for (there is a dedicated retest alert). Watch how price reacts there — rejection confirms the new role, a pass-through negates it.
5. The gray line inside each zone is its 50% midpoint (EQ) — many traders use it as the precise reaction level rather than the zone edges.
6. The age counter (e.g. "34b") tells you how long a zone has existed since its inversion — fresh zones are generally considered more reliable than stale ones, and you can enable fading to de-emphasize old zones automatically.
7. Combine with your own analysis of trend and higher-timeframe levels. The indicator describes structure; it does not predict.
If you want the full life cycle of REGULAR fair value gaps (creation, strength grading and retest alerts while they still act in their original direction), that is what our free Smart FVG indicator does — this tool picks up where it ends, at the moment a gap fails and flips. Both use the same visual language, so they pair naturally.
🔶 EVERY SETTING EXPLAINED
🔵Visualization group
- Bullish FVG / Bearish FVG — colors of the quiet regular-gap context layer.
- iFVG Support / iFVG Resistance — colors of the inversion zones.
- Show Regular FVGs — off by default: only inversion zones are displayed. Turn on to also see the not-yet-inverted gaps as context (hidden gaps are still tracked, so inversions keep firing either way).
- Show 50% Line (EQ) / EQ Line Color — the midpoint line inside each zone.
- Width Mode — how zones extend to the right: Dynamic (to the current bar), Fixed (a set number of bars), or Extended (infinitely).
- Fixed Width (bars) — zone width when Fixed mode is selected.
- Min FVG Size (x ATR) — the smallest height that registers, applied twice: to every new gap AND to the common ground of the two gaps (an overlap thinner than this neither draws a zone nor consumes the level); 0 disables both checks.
BEFORE ATR
AFTER ATR
🔵Mitigation group
- Delete Mitigated Zones — remove finished zones, or freeze them on the chart as reference.
- Mitigation Level — a zone is finished when price reaches its 50% midpoint, or only on a full fill.
- Mitigation Confirmation — what must reach that level: any wick, or a candle close.
- Inversion Memory (bars) — how long each detected gap's range stays eligible to form inversions, counted from the gap's creation and independent of when its box disappears from the chart. Larger = more inversions detected, including from older levels.
- Pairing Window After Break (bars) — once price CLOSES through the far side of a remembered gap, the opposing gap must confirm within this many bars for the inversion to count. If it does not, the level is treated as spent and dropped.
🔵Imbalance Age group
- Show Age Label — the bar counter inside each zone.
- Fade Old Zones / Max Age for Full Fade — gradually de-emphasize stale zones.
🔵Strong Inversion group
- Mark Strong Inversions — enables the two-condition strength check.
- Min Inverting Gap Size (x ATR) — condition 1: how large the inverting gap must be relative to volatility. Note this grades the STRONG tag only; it does not filter which zones appear (that is Min FVG Size).
- Min Volume (x SMA 20) — condition 2: how elevated the displacement candle volume must be versus its 20-bar average.
- Show 'STRONG' Tag — the text tag on qualifying zones.
🔵Labels group
- Show Labels / Label Text Color — master switch and color for all in-zone text.
- Label Offset (bars left of price) — keeps each zone's label trailing near the current bar so it stays readable, instead of sitting far back at the zone's left edge; 0 pins it on the current bar.
🔶 ALERTS
New iFVG Support / New iFVG Resistance / New STRONG iFVG / iFVG Retest / iFVG Mitigated — standard PulseWire alert conditions. Select "Once Per Bar Close" when creating alerts for non-repainting behavior.
🔶 WHAT THIS TOOL DELIBERATELY DOES NOT DO
No buy or sell signals, no take-profit or stop-loss levels, no win-rate dashboard. Detecting a structural pattern is not the same as having a tradable edge, and presenting pattern marks as trade signals would overstate what any indicator of this kind can honestly claim. Use it as a lens for reading market structure, together with your own judgment.
Indicator

SMT - NDOG - NWOG - CBDR - FLOUT - Z DAYHere is a simple breakdown of how it works and how to use it:
1. Z-Day Profile (The "Coiled Spring")
What it is: A Z-Day is an ICT concept representing a day of extreme consolidation where the market essentially goes nowhere (zero net change). How the script tracks it: The script calculates the Average Daily Range (ADR) over the last 14 days. If a trading day finishes and its total range was less than 50% of the normal ADR, the script stamps a yellow "Z-DAY" label at the start of the next day. How to use it: When you see a Z-Day label, expect massive, violent expansion (trend days) to occur shortly after, as institutional energy has been tightly coiled.
2. SMT Divergence (Smart Money Tool)
What it is: SMT spots fake moves or underlying strength/weakness by comparing two assets that should move together (like NQ and ES). How the script tracks it: You enter a correlated ticker in the settings (e.g., CME_MINI:ES1!). The script pulls that asset's data in the background. It then tracks swing highs and lows on both charts simultaneously. How to use it: If your current chart makes a Lower Low (sweeping liquidity), but the hidden SMT chart makes a Higher Low, the script flags this as a Bullish SMT. It means the down-move on your chart is likely a fake stop-hunt, and price is preparing to reverse upward.
3. Price Action Gaps (NDOG & NWOG)
What it is: Voids in price caused by the market closing and reopening. These gaps act as algorithmic magnets. How the script tracks it:
NDOG (New Day Opening Gap): Tracks the gap between the 5:00 PM EST close and the 6:00 PM EST reopen.
NWOG (New Week Opening Gap): Tracks the gap between Friday's close and Sunday's reopen. How to use it: The script draws colored boxes over these gaps and extends them endlessly to the right. The box will only disappear once price completely overlaps and "fills" the gap, allowing you to use them as high-probability draw-on-liquidity targets.
4. Dealer Ranges & Projections (CBDR & Asian)
What it is: Institutions accumulate orders during specific quiet hours (Dealer Ranges), and then manipulate or expand price outward based on those ranges. How the script tracks it:
It boxes the absolute High and Low printed during the CBDR (Central Bank Dealers Range, 14:00-20:00 NY time).
It boxes the absolute High and Low printed during the Asian Range (20:00-00:00 NY time).
How to use it: The exact moment the Asian Range finishes at midnight, the script measures the height of the CBDR box. It then projects Fibonacci Standard Deviation lines (+1, +2, -1, -2) out into the future. You use these dashed lines as algorithmic take-profit targets for the new trading day.
It also calculates the Flout, which combines the CBDR and Asian ranges together, cuts them in half, and projects dotted lines for alternate target projections. Indicator

PD Arrays MatrixThis script is arguably the most comprehensive script in this workspace. It acts as an algorithmic footprint scanner, actively mapping the entire spectrum of ICT "Premium/Discount Arrays" on your chart in real-time.
Because charting all these footprint concepts can get incredibly cluttered, it features a built-in memory management system, a Lookback Period optimizer (to only track recent data), and toggle switches for every single array type in the settings menu.
Here is exactly what the script detects, draws, and manages:
1. Fair Value Gaps (FVGs) & Consequent Encroachment (CE)
BISI (Buyside Imbalance Sellside Inefficiency): A Bullish FVG. Drawn as a green box when a massive up-move leaves a 3-candle gap.
SIBI (Sellside Imbalance Buyside Inefficiency): A Bearish FVG. Drawn as a red box during a massive down-move.
CE (Consequent Encroachment): It automatically calculates and draws a dotted midline perfectly through the 50% equilibrium mark of every active FVG, which algos use for precise mitigation.
2. Inversion FVGs (IFVG)
The script actively monitors the life-cycle of every FVG. If a Bullish FVG fails to support price and a candle closes completely below it, the script intelligently flips its polarity.
It turns into a Bearish Resistance zone (colored red/gray) labeled IFVG, extending into the future.
3. Balanced Price Ranges (BPR)
A highly sensitive algorithmic signature. If the script detects that a new Bearish FVG has formed and perfectly overlaps the price range of an older Bullish FVG, it highlights that specific overlapping zone in yellow. This acts as a massive magnet/rejection zone for future price action.
4. Volume Imbalance (VI)
Detects microscopic inefficiencies. If two consecutive candles gap up or down so heavily that their bodies do not overlap at all, but their wicks do touch, the script draws a small purple VI zone between the bodies.
5. Order Blocks (OB)
To filter out low-probability order blocks, the script mathematically enforces the Displacement Rule. It will only flag an institutional down-candle (+OB) or up-candle (-OB) if it immediately precedes a move impulsive enough to leave behind an FVG.
6. Breaker Blocks (+BRK/-BRK) & Mitigation Blocks (MB)
The script monitors the life-cycle of Order Blocks! When an Order Block fails and price breaks aggressively through it, the algorithm checks the previous swing structure:
Did price sweep liquidity (a higher high / lower low) before breaking the OB? If yes, it flips the failed OB into a Breaker Block, turning support into resistance.
Did price fail to sweep liquidity? If yes, it flips it into a Mitigation Block.
7. Rejection Blocks
It scans the chart for unusually long institutional wicks (specifically, wicks that are more than double the size of the candle body and statistically significant relative to the ATR).
When found, it draws a block from the open/close of the candle body out to the extreme tip of the wick, highlighting where institutional accumulation or distribution took place off-screen. Indicator

FVG/IFVG [CRODL]█ OVERVIEW
This indicator detects Fair Value Gaps (FVGs) on up to five timeframes at once, tracks every gap it draws, and invalidates each one automatically the moment price fills it. A filled gap can be deleted, kept on the chart cut off at the candle that filled it, or flipped into an Inversion Fair Value Gap (iFVG) - the same zone watched with the opposite bias. What makes the script useful is that it manages the full life cycle of every zone in one tool: detect, track, fill-check on every bar, invert, and expire - across multiple timeframes, with a choice of close-based or wick-based fill logic, and without repainting committed zones.
█ CONCEPTS
Fair Value Gap (FVG)
An FVG is a three-candle imbalance, a concept popularized in ICT / "smart money" style trading. A bullish FVG forms when the low of the third candle stays above the high of the first candle: price moved up so fast that the middle candle left a slice of untraded space behind it. A bearish FVG is the mirror image - the high of the third candle stays below the low of the first. The space between those two levels is the zone this script draws. Traders typically watch unfilled gaps as areas price may revisit ("rebalance") before continuing.
Inversion Fair Value Gap (iFVG)
An iFVG is a gap that failed. When price closes through a bullish FVG instead of respecting it, many traders treat that same zone as resistance afterwards - a support/resistance flip applied to imbalances. This script performs the flip automatically: the box changes to the iFVG colors and label, and the inversion zone remains active until price trades back through its far side, at which point it is removed as well.
█ HOW IT WORKS
Detection
On every enabled timeframe the script tests the last three confirmed candles. A bullish gap is registered when the low of the newest candle is above the high of the oldest one; a bearish gap when the high of the newest candle is below the low of the oldest one. The gap is committed the moment its third candle closes, and the box is anchored at the middle candle where the imbalance was created.
Higher-timeframe data
Higher-timeframe candles are requested on confirmed bars only, using bar offsets (the publication-safe request technique recommended by PineCoders). No future data is accessed, and committed zones print in the same place historically and in real time — they do not repaint.
Live preview
With "Wait for candle close to identify FVGs" turned OFF, a provisional box is drawn while the third candle is still forming. It expands and contracts with the developing high/low, becomes permanent only if the gap survives the candle close, and is removed if the wick closes the gap first. Turn the setting ON if you prefer to see confirmed gaps only.
Invalidation engine
Every active zone is stored internally and re-checked on every chart bar:
• A bullish FVG is filled when price breaks below the BOTTOM of its zone.
• A bearish FVG is filled when price breaks above the TOP of its zone.
• "Close" mode requires a confirmed candle close beyond the level; "Wick" mode triggers on a single touch.
When a gap fills it is either deleted (default), kept on the chart truncated at the fill candle, or inverted into an iFVG - depending on your settings. An iFVG is then invalidated by the same Close/Wick rule, mirrored to its new direction.
█ SETTINGS AND HOW TO USE IT
• Timeframes - the chart timeframe plus up to four higher ones (15m / 1h / 4h / 1D by default). "Hide FVGs from timeframes lower than the chart" keeps the chart clean when you move up a timeframe.
• Filled FVG Type - Close (stricter) or Wick (more sensitive).
• Show FVG / Show iFVG - display fresh gaps, inversion zones, or both.
• Delete Boxes after fill - ON shows only zones that are still valid; OFF keeps a visual history of filled gaps, each cut off where it was filled.
• Extend Boxes + Label Distance - stretch active zones to the right edge of the chart with floating labels.
• Per-timeframe label text, plus full color and border control for FVG and iFVG boxes.
• Max bars back - how much history to scan (performance guard).
Typical use: treat unfilled gaps as potential reaction zones in the direction of the prevailing move, look for multi-timeframe confluence (for example a 15m gap sitting inside a 4h gap), and watch iFVGs as flip zones after a gap fails. The script marks and manages zones - it does not generate buy or sell signals. Combine it with your own market-structure analysis and risk management.
█ ALERTS
Alert conditions are included: Bullish FVG created, Bearish FVG created, FVG inverted bearish (a bullish gap was invalidated), and FVG inverted bullish (a bearish gap was invalidated).
█ NOTES AND LIMITATIONS
• Invalidation is evaluated against chart-timeframe candles. On a low timeframe a higher-timeframe gap can therefore be invalidated by a lower-timeframe close - this makes mitigation responsive, but it means the exact moment a higher-timeframe zone disappears can differ slightly depending on the chart timeframe you are viewing.
• With "Wait for candle close" OFF, the preview box on the still-forming candle keeps updating until that candle closes. This is by design and only affects the live, unconfirmed candle - committed zones never change.
• Up to 500 boxes and labels are kept on the chart; beyond that, the oldest zones are recycled first.
This is an educational tool, not financial advice. Past behavior of price around these zones does not guarantee future results.
Indicator

Fair Value Gaps + Inversion FVG [Quantum Algo]Fair Value Gaps + Inversion FVG
█ OVERVIEW
Most FVG indicators stop at drawing boxes. This one tracks the complete lifecycle of every gap — fresh → midline-tested → filled → INVERTED → retested — and automates the part of the model that traders actually trade: the Inversion Fair Value Gap (IFVG).
A Fair Value Gap is a 3-candle imbalance left behind when price moves too fast for two-sided trade to occur. Price frequently returns to these zones. But when price closes through a gap instead of respecting it, the zone does not die — it flips polarity. A violated bullish gap becomes resistance; a violated bearish gap becomes support. The first retest of that inverted zone is one of the cleanest entry models in the Smart Money Concepts framework, and this script detects, restyles, and signals it automatically.
█ FEATURES
Gap detection
— Bullish and bearish FVGs detected on confirmed bars only (non-repainting).
— ATR minimum-size filter removes insignificant micro-gaps.
— Optional displacement filter: the middle candle must be a genuine expansion bar (range greater than a configurable multiple of ATR), keeping only gaps created by aggressive participation.
Volume strength score
Every gap is stamped with a 0–100 score comparing the displacement candle's volume against its 20-bar average. A 90% gap and a 20% gap are not the same zone — now you can see the difference at a glance.
Consequent Encroachment (CE)
Each gap carries its 50% midline. The first touch of the CE is detected, the gap is visually dimmed to separate tested zones from fresh ones, and an alert is available.
Inversion engine (IFVG)
— A close through the gap converts it into an inverted zone with distinct styling.
— The first retest of an inverted zone prints an on-chart signal (long model for inverted bearish gaps, short model for inverted bullish gaps).
— A close back through the far side invalidates and removes the zone.
— Inversion can be disabled, in which case gaps simply fill and are removed or frozen (wick-fill or close-fill modes).
Multi-timeframe mode
Display gaps from one higher timeframe directly on your chart as dashed boxes. HTF gaps are built exclusively from closed higher-timeframe bars, so they do not repaint.
Dashboard
A compact panel shows active bullish gaps, bearish gaps, inverted zones, plus the nearest demand level below price and the nearest supply level above it.
Alerts
Eight alert conditions cover the full lifecycle: new bullish/bearish gap, CE touch, fill, bullish/bearish inversion, and long/short IFVG retest.
█ HOW DETECTION WORKS
A bullish FVG forms when the current bar's low sits entirely above the high from two bars earlier — the zone spans that void. A bearish FVG is the mirror image. Detection runs only on bar close, so a gap that appears never disappears or redraws. Lifecycle state changes (CE touches, fills, inversions, retests) are likewise evaluated on confirmed bars.
█ HOW TO USE IT
1. Classic continuation: in a trend, wait for price to retrace into a fresh high-strength gap aligned with the trend; the CE midline is the standard entry refinement.
2. Inversion reversal: when a gap is closed through, stop looking for the old reaction — wait for the retest of the inverted zone in the new direction. The on-chart IFVG markers identify exactly this moment.
3. Multi-timeframe confluence: enable HTF mode and prioritize chart-timeframe signals that occur inside a higher-timeframe gap.
4. Use the dashboard's nearest demand/supply readout for quick situational awareness of where the next reaction zones sit.
Works on all symbols and timeframes. Crypto and index futures tend to produce the cleanest gaps on 5m–1H; forex gaps are more frequent on 15m and above.
█ SETTINGS
Detection — minimum gap size (× ATR), displacement filter, maximum zones kept on chart.
Mitigation & Inversion — inversion on/off, fill source (close or wick), removal of filled gaps, retest signals.
Multi-Timeframe — HTF on/off and timeframe selection.
Visuals — colors for bullish / bearish / inverted zones, fill transparency, CE line, labels, dimming of tested gaps, dashboard.
█ NOTES
— All state changes occur on closed bars; the developing bar can always change until it closes.
— This is an analysis tool for mapping imbalance and inversion zones, intended as a confluence layer within a complete trading plan. It is not a standalone buy/sell system.
█ DISCLAIMER
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading involves substantial risk of loss. Past behavior does not guarantee future results. Always do your own research and apply sound risk management. Indicator

IFVG Sniper Entry Engine [trade_w_samet]🎯 IFVG Sniper Entry Engine
IFVG Sniper Entry Engine is a clean, focused, and structured Inversion Fair Value Gap analysis indicator designed to help traders study filtered IFVG conditions directly on the price chart.
This script focuses on one main concept:
IFVG-based entry visualization.
It is not designed to be a complex all-in-one trading system.
It is not designed to show every possible Fair Value Gap.
It is not designed to generate constant chart noise.
Instead, the goal of IFVG Sniper Entry Engine is to detect filtered Inversion Fair Value Gap events, display clean IFVG+ / IFVG- labels, and visualize a simple active trade projection using one entry level, one stop-loss level, and one take-profit level.
The indicator includes:
• Inversion Fair Value Gap detection
• Filtered IFVG selection
• Bullish IFVG+ and bearish IFVG- chart labels
• Thin blue bullish IFVG lines
• Thin red bearish IFVG lines
• Adjustable IFVG label size
• ATR-based stop-loss projection
• Selectable take-profit RR from 1R to 6R
• Active TP / SL visual box
• One-active-trade-at-a-time logic
• Confirmed-candle IFVG processing
• IFVG invalidation handling
• Simple dashboard
• Professional alert conditions
The purpose of this script is to help users visually study where an FVG has inverted and whether that inversion may create a structured review point on the chart.
It should be treated as a chart-analysis and educational decision-support tool.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable trades.
It does not execute broker orders.
It does not replace personal analysis, risk management, or trade validation.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, IFVG Sniper Entry Engine does the following:
• Detects bullish and bearish Fair Value Gaps.
• Stores valid hidden FVG zones in memory.
• Watches for price to invert those zones.
• Confirms bullish IFVG when a bearish FVG is broken upward.
• Confirms bearish IFVG when a bullish FVG is broken downward.
• Applies an optional IFVG quality filter.
• Draws only filtered IFVGs on the chart.
• Displays IFVG+ for bullish IFVG events.
• Displays IFVG- for bearish IFVG events.
• Projects one active entry, stop-loss, and take-profit box.
• Allows only one active trade projection at a time.
• Removes the active TP/SL box after TP or SL is reached.
• Tracks basic visual trade outcome statistics in the dashboard.
• Provides alert conditions for IFVG entries and IFVG formations.
The script is intentionally built to be simple and focused.
It does not include multiple take-profit levels.
It does not include machine-learning optimization.
It does not include hidden performance promises.
It does not attempt to predict the future.
It provides a structured way to visualize filtered IFVG events and their projected trade model.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind IFVG Sniper Entry Engine is based on Inversion Fair Value Gaps.
A Fair Value Gap represents an imbalance area created when price moves aggressively enough to leave a gap-like inefficiency between candles.
An Inversion Fair Value Gap occurs when price later breaks through a previously formed FVG in the opposite direction.
This can be useful for traders who study:
• market imbalance
• failed displacement zones
• price repricing behavior
• continuation after inversion
• possible shift in directional pressure
• clean chart-based trade planning
The script does not treat every FVG as important.
Instead, it stores FVGs and waits for inversion behavior.
Then it filters the IFVG event using quality conditions such as gap size, candle body strength, candle range, and clean break logic.
The goal is not to show more signals.
The goal is to reduce noise and highlight cleaner IFVG conditions.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
IFVG Sniper Entry Engine is not intended to be used as a blind buy/sell system.
The script is structured as a visual review workflow:
Fair Value Gap forms
→ FVG is stored in memory
→ price later breaks through the opposite side
→ inversion is detected
→ IFVG quality filter is checked
→ IFVG+ or IFVG- is displayed
→ active entry / SL / TP projection is drawn
→ trade box extends while active
→ result is tracked visually
→ box is removed after TP or SL
Each part has a specific purpose.
The FVG memory system stores imbalance zones.
The inversion logic checks whether price has broken the opposite side of the stored zone.
The filter system attempts to reduce weaker IFVG events.
The entry model gives a simple visual planning level.
The ATR stop-loss model creates a consistent risk reference.
The RR setting controls the projected target distance.
The dashboard summarizes the current state.
The alert system helps monitor confirmed events.
This makes the script a structured IFVG review tool, not a guaranteed trade signal generator.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The script first detects normal bullish and bearish Fair Value Gaps.
A bullish FVG is detected when the current candle structure leaves an imbalance above the candle from two bars earlier.
A bearish FVG is detected when the current candle structure leaves an imbalance below the candle from two bars earlier.
Once a raw FVG is detected, the script stores:
• top of the FVG
• bottom of the FVG
• original FVG direction
• age of the FVG
• gap size relative to ATR
• candle body ratio
• candle range relative to ATR
These values are stored internally and are later used when an inversion happens.
The script then waits for price to break through the stored FVG in the opposite direction.
For a bullish IFVG:
A previously bearish FVG must be broken upward.
For a bearish IFVG:
A previously bullish FVG must be broken downward.
When inversion is detected, the script checks whether the IFVG passes the selected filter mode.
Only filtered IFVGs are displayed on the chart.
━━━━━━━━━━━━━━━━━━━━━━
🔵 BULLISH IFVG+ LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bullish IFVG+ appears when a previously bearish Fair Value Gap is inverted to the upside.
In practical terms, the script looks for a stored bearish FVG and then checks whether price closes above the top boundary of that FVG.
If the selected filter conditions are satisfied, the script draws:
• a thin blue IFVG line
• an IFVG+ label
• a bullish active trade projection if no trade is already active
The bullish trade projection uses:
• entry level
• ATR-based stop-loss below entry
• selected RR-based take-profit above entry
This does not mean price must continue upward.
It only means the script detected a bullish IFVG condition based on its internal rules.
━━━━━━━━━━━━━━━━━━━━━━
🔴 BEARISH IFVG- LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bearish IFVG- appears when a previously bullish Fair Value Gap is inverted to the downside.
In practical terms, the script looks for a stored bullish FVG and then checks whether price closes below the bottom boundary of that FVG.
If the selected filter conditions are satisfied, the script draws:
• a thin red IFVG line
• an IFVG- label
• a bearish active trade projection if no trade is already active
The bearish trade projection uses:
• entry level
• ATR-based stop-loss above entry
• selected RR-based take-profit below entry
This does not mean price must continue downward.
It only means the script detected a bearish IFVG condition based on its internal rules.
━━━━━━━━━━━━━━━━━━━━━━
💎 IFVG FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes an IFVG filter system to reduce chart noise.
This is important because not every inversion is meaningful.
The filter system can be set to:
Off
Loose
Balanced
Strict
Custom
Off mode shows all detected IFVG events.
Loose mode allows more IFVGs and uses lower quality requirements.
Balanced mode is the default middle-ground setting.
Strict mode requires stronger IFVG conditions and will show fewer signals.
Custom mode allows the user to manually control the filter thresholds.
The filter evaluates:
• minimum gap size relative to ATR
• minimum candle body ratio
• minimum candle range relative to ATR
• clean break buffer relative to ATR
This creates a more selective IFVG workflow.
The filter does not guarantee better future outcomes.
It only controls how strict the script is before displaying an IFVG.
━━━━━━━━━━━━━━━━━━━━━━
📏 GAP / ATR FILTER
━━━━━━━━━━━━━━━━━━━━━━
The gap filter measures the original Fair Value Gap size relative to ATR.
This helps avoid very small imbalance zones that may not be meaningful on the selected chart.
A larger minimum gap requirement makes the indicator more selective.
A smaller minimum gap requirement allows more IFVGs.
The default Balanced setting uses a moderate gap requirement.
Users can adjust this in Custom mode.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ BODY RATIO FILTER
━━━━━━━━━━━━━━━━━━━━━━
The body ratio filter measures the candle body compared to the full candle range.
This helps evaluate whether the candle that created the FVG had meaningful directional pressure.
A stronger body ratio requirement can reduce weaker candles.
A lower body ratio requirement allows more setups.
This is not a prediction tool.
It is only a candle-quality filter.
━━━━━━━━━━━━━━━━━━━━━━
📊 RANGE / ATR FILTER
━━━━━━━━━━━━━━━━━━━━━━
The range filter measures the candle’s full range relative to ATR.
This helps the script avoid very small candles that may not represent meaningful displacement.
A higher range/ATR requirement makes the script more selective.
A lower range/ATR requirement increases the number of visible IFVGs.
The value should be adjusted based on symbol volatility and timeframe.
━━━━━━━━━━━━━━━━━━━━━━
🧼 CLEAN BREAK FILTER
━━━━━━━━━━━━━━━━━━━━━━
The clean break filter requires price to break beyond the IFVG boundary by an ATR-based buffer.
This helps avoid very small boundary touches.
For bullish IFVGs, price must close above the stored FVG top plus the clean break buffer.
For bearish IFVGs, price must close below the stored FVG bottom minus the clean break buffer.
The clean break buffer can be controlled in Custom mode.
A higher buffer makes the inversion requirement stricter.
A lower buffer allows more IFVG events.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
When a filtered IFVG appears and no active trade is already open, the script creates a visual trade projection.
The entry can be based on:
IFVG Line
Confirmation Close
IFVG Line mode uses the selected IFVG line price as the projected entry reference.
Confirmation Close mode uses the candle close that confirmed the IFVG.
The entry is only a visual reference.
It is not a broker order.
It does not mean the user must enter a trade.
It is designed to help users review how the IFVG setup would look with a structured risk/reward model.
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP-LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
The stop-loss projection is based on ATR.
The main settings are:
ATR Length
SL ATR Multiplier
For bullish IFVG entries, the stop-loss is projected below the entry.
For bearish IFVG entries, the stop-loss is projected above the entry.
ATR is used because market volatility changes across symbols and timeframes.
A higher SL ATR multiplier creates a wider visual risk area.
A lower SL ATR multiplier creates a tighter visual risk area.
This stop-loss level is a visual projection only.
It does not place an order.
It does not guarantee that the level is appropriate for every trader or every market.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TAKE-PROFIT RR MODEL
━━━━━━━━━━━━━━━━━━━━━━
The script uses one take-profit level.
There are no TP1, TP2, or TP3 levels.
The take-profit is calculated from the projected risk distance.
Available RR options:
1R
2R
3R
4R
5R
6R
Default:
3R
For bullish IFVG entries, TP is projected above entry.
For bearish IFVG entries, TP is projected below entry.
The RR setting only controls the visual projected target distance.
It should not be interpreted as a recommendation or guarantee.
Users should decide whether the projected target makes sense based on their own analysis, market structure, liquidity, session, volatility, and risk plan.
━━━━━━━━━━━━━━━━━━━━━━
📦 ACTIVE TP / SL BOX SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a new valid IFVG entry appears, the script draws a clean active TP / SL visual model.
The visual model includes:
• TP box
• SL box
• entry line
• stop-loss line
• take-profit line
• ENTRY label
• SL label
• TP label
The TP/SL box remains visible only while the trade projection is active.
While the trade is active, the box extends to the right as new candles form.
When TP or SL is reached, the active trade box is removed from the chart.
This means historical TP/SL boxes are not kept.
The chart remains cleaner and only the active trade projection is visible.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The script includes one-active-trade-at-a-time logic.
If a trade projection is active, the script will not open another trade projection until the active one reaches TP or SL.
However, new filtered IFVG lines can still appear on the chart.
This design separates:
• IFVG detection
• trade projection permission
An IFVG can appear while a trade is active, but it will not create a new active TP/SL box.
The dashboard tracks blocked IFVG events internally.
This helps keep the chart structured and avoids multiple overlapping trade boxes.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TP / SL HANDLING
━━━━━━━━━━━━━━━━━━━━━━
If TP and SL are both touched on the same candle, the true intrabar sequence cannot be known from standard OHLC chart data.
This script uses a conservative assumption:
SL is counted first.
This avoids overly optimistic historical visual results when the actual intrabar order is unknown.
Users should understand that this is still a bar-based assumption.
It does not represent broker execution.
It does not include spread, slippage, commissions, order delay, or partial fills.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ IFVG LABELS
━━━━━━━━━━━━━━━━━━━━━━
The script uses simple IFVG labels:
IFVG+
IFVG-
IFVG+ represents a bullish Inversion Fair Value Gap.
IFVG- represents a bearish Inversion Fair Value Gap.
The label size can be adjusted from the settings.
Available label sizes:
Tiny
Small
Normal
Large
Huge
The default label size is Large.
This allows users to adjust visibility depending on chart zoom, monitor size, and visual preference.
━━━━━━━━━━━━━━━━━━━━━━
📍 IFVG LINE PRICE MODES
━━━━━━━━━━━━━━━━━━━━━━
The IFVG line can be drawn using different price references.
Available modes:
Broken Boundary
Confirmation Close
Midpoint
Broken Boundary mode draws the line at the boundary that was broken during inversion.
Confirmation Close mode draws the line at the candle close that confirmed the IFVG.
Midpoint mode draws the line at the midpoint of the original FVG zone.
Each mode gives a different way to visualize the IFVG reference level.
There is no universally best option.
Users should choose the line mode that best matches their own review method.
━━━━━━━━━━━━━━━━━━━━━━
🧹 IFVG INVALIDATION
━━━━━━━━━━━━━━━━━━━━━━
The script can automatically remove invalidated IFVG lines.
For bullish IFVGs, invalidation occurs when price closes back below the lower boundary of the IFVG zone.
For bearish IFVGs, invalidation occurs when price closes back above the upper boundary of the IFVG zone.
This helps keep the chart cleaner by removing IFVG levels that are no longer valid according to the script’s internal logic.
Users can disable this setting if they prefer to keep IFVG lines visible.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
The script includes a compact dashboard.
The dashboard displays:
• selected filter mode
• selected label size
• last signal direction
• active trade status
• selected RR
• latest entry level
• latest SL level
• latest TP level
• active box state
• filtered IFVG count
• trades / wins / losses
The dashboard is designed to provide a quick summary of the current script state.
It is not a full performance report.
It is not a replacement for PulseWire Strategy Tester.
It is a visual summary based on the script’s internal bar-based projection logic.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
IFVG Sniper Entry Engine includes alert conditions for:
Bullish IFVG Entry
Bearish IFVG Entry
Bullish IFVG+ formed
Bearish IFVG- formed
The entry alerts are triggered when a filtered IFVG creates a new active trade projection.
The IFVG formation alerts are triggered when filtered IFVG+ or IFVG- conditions appear.
Alerts are monitoring tools only.
They do not execute trades.
They do not place broker orders.
Users must confirm all alerts with their own analysis and risk management.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
A practical alert workflow:
1. Add IFVG Sniper Entry Engine to your chart.
2. Open PulseWire’s alert window.
3. Select the indicator as the alert condition.
4. Choose the desired alert type.
5. Select alert frequency according to your preference.
6. Use alerts for monitoring only.
7. Confirm each alert manually before making any trading decision.
Alerts may behave differently depending on timeframe, symbol, session, and real-time candle updates.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add IFVG Sniper Entry Engine to your chart.
2. Start with the default Balanced filter mode.
3. Review the visible IFVG+ and IFVG- labels.
4. Check whether the IFVG appears in a meaningful market context.
5. Review the active TP/SL projection if a trade model appears.
6. Use the selected RR level as a visual planning reference only.
7. Avoid treating every IFVG as a trade.
8. Combine the tool with your own market structure, liquidity, trend, session, and risk-management rules.
9. Use alerts for monitoring, not automatic execution.
10. Test the indicator on the exact markets and timeframes you personally study.
The indicator is best used as a structured IFVG review tool.
It should not be used as a blind execution system.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚙️ IFVG Engine
Hidden FVG Memory
Controls how many raw FVGs can be stored internally.
Max Hidden FVG Age
Controls how long a hidden FVG remains eligible for inversion.
Minimum FVG Size / Ticks
Sets the minimum raw FVG size using ticks.
Max Visible IFVG
Controls how many IFVG lines and labels can remain visible.
IFVG Line Length Bars
Controls how far the IFVG line extends to the right.
IFVG Line Price
Controls whether the IFVG line is drawn from Broken Boundary, Confirmation Close, or Midpoint.
Delete Invalidated IFVG
Removes IFVG lines when the script detects invalidation.
━━━━━━━━━━━━━━━━━━━━━━
💎 IFVG Filter
IFVG Filter Mode
Controls how selective the IFVG display logic is.
Available modes:
Off
Loose
Balanced
Strict
Custom
Custom Minimum Gap / ATR
Defines the minimum FVG gap size relative to ATR when Custom mode is selected.
Custom Minimum Body Ratio
Defines the minimum body-to-range ratio when Custom mode is selected.
Custom Minimum Range / ATR
Defines the minimum candle range relative to ATR when Custom mode is selected.
Custom Clean Break Buffer / ATR
Defines the ATR-based clean break buffer when Custom mode is selected.
━━━━━━━━━━━━━━━━━━━━━━
🎯 IFVG Entry Model
Entry Price
Controls whether entry is based on IFVG Line or Confirmation Close.
ATR Length
Defines the ATR length used for risk calculation.
SL ATR Multiplier
Controls the distance of the projected stop-loss.
Take Profit RR
Controls the projected take-profit distance.
Available RR values:
1R
2R
3R
4R
5R
6R
Initial TP / SL Box Length
Controls the initial box length when a new active trade projection appears.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Style
Bullish IFVG Blue
Controls the color of bullish IFVG+ lines and labels.
Bearish IFVG Red
Controls the color of bearish IFVG- lines and labels.
IFVG Label Size
Controls the size of IFVG+ and IFVG- labels.
Entry Line Color
Controls the entry line color.
SL Color
Controls the stop-loss box and line color.
TP Color
Controls the take-profit box and line color.
Dashboard Background
Controls the dashboard background color.
Dashboard Text
Controls the dashboard text color.
━━━━━━━━━━━━━━━━━━━━━━
📟 Dashboard
Show Dashboard
Shows or hides the compact dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
IFVG Sniper Entry Engine uses familiar market concepts such as:
• Fair Value Gaps
• Inversion Fair Value Gaps
• ATR-based risk projection
• risk/reward planning
• label-based visual mapping
• active trade visualization
• alert monitoring
These concepts are not unique by themselves.
The originality of this script lies in how they are organized into a clean IFVG workflow:
Raw FVG detection
→ hidden FVG memory
→ inversion confirmation
→ IFVG quality filter
→ IFVG+ / IFVG- display
→ one-active-trade rule
→ ATR stop-loss projection
→ selectable RR target
→ active-only TP/SL box
→ compact dashboard
→ alerts
This structure is designed to give users a focused way to review filtered IFVG conditions without unnecessary chart clutter.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
The script’s behavior depends heavily on settings.
Signal frequency and visual output may change based on:
• filter mode
• ATR length
• SL multiplier
• RR selection
• IFVG line mode
• minimum gap settings
• candle body settings
• range/ATR settings
• clean break buffer
• timeframe
• symbol volatility
• market session
• available historical bars
A setting that looks clean on one symbol may behave differently on another.
A setting that appears useful on one timeframe may not be useful on another.
Users should test the script on the exact markets and timeframes they personally study.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not replace risk management.
It does not execute trades.
It does not place broker orders.
It does not include broker slippage.
It does not include commissions.
It does not include spreads.
It does not include order delay.
It does not include partial fills.
It uses bar-based chart data.
Same-candle TP/SL order cannot be known from standard OHLC data.
The dashboard is not PulseWire Strategy Tester.
The TP/SL boxes are visual projections only.
Alerts are monitoring tools only.
Historical visual behavior does not ensure future behavior.
Filter settings do not guarantee better results.
One-active-trade logic is a visual management rule, not broker execution logic.
For these reasons, IFVG Sniper Entry Engine should be used as an educational decision-support and chart-analysis tool, not as a standalone trading strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• study IFVG concepts
• study Fair Value Gap inversions
• want cleaner IFVG chart visuals
• prefer filtered signals instead of every raw IFVG
• want a simple one-TP projection model
• want ATR-based risk visualization
• want one active trade projection at a time
• want active-only TP/SL boxes
• want IFVG+ and IFVG- labels
• want alert-based monitoring
• want a focused educational analysis tool
It may be less suitable for users who:
• want guaranteed buy/sell signals
• want a fully automated trading bot
• want many take-profit levels
• want every raw FVG displayed
• expect one setting to work on every market
• expect alerts to execute trades
• expect visual projections to match broker execution
• want an indicator that replaces personal decision-making
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For cleaner review:
• Start with the default Balanced filter mode.
• Use Strict mode if the chart is too noisy.
• Use Loose mode if the chart shows too few IFVGs.
• Use Custom mode only after understanding how each filter affects signal frequency.
• Review IFVGs together with market structure.
• Check whether the IFVG appears near meaningful liquidity or displacement context.
• Do not treat every IFVG+ or IFVG- as a trade.
• Use the TP/SL box as a visual planning tool only.
• Keep expectations realistic.
• Use alerts for monitoring, not automatic execution.
• Always apply independent analysis and risk management.
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
IFVG Sniper Entry Engine is published as an educational and visual market-analysis tool.
The purpose of this description is to explain:
• what the script does
• how IFVG conditions are detected
• how IFVG filters work
• how IFVG+ and IFVG- labels are created
• how the entry model is projected
• how the ATR stop-loss model works
• how the RR-based take-profit is calculated
• how the active TP/SL box behaves
• how the one-active-trade rule works
• what the dashboard shows
• what the alerts do
• what the limitations are
• how the indicator should and should not be used
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind buy/sell system.
It is best used as a visual framework for reviewing filtered Inversion Fair Value Gap conditions and projected risk/reward behavior.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
IFVG Sniper Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
No indicator can guarantee future results.
Markets are uncertain, conditions change, and historical behavior does not ensure future performance.
Every user is responsible for their own analysis, validation, risk management, position sizing, and trading decisions.
The IFVG+ labels, IFVG- labels, active TP/SL boxes, dashboard values, RR projections, stop-loss projections, and alerts are visual analysis tools only.
Use this script as a structured decision-support and visual review framework, not as a promise of profitability.
Indicator

ICT FVG_IFVG Engine 3m OptimisedThis indicator detects and tracks **Fair Value Gaps (FVGs)** and **Inversion Fair Value Gaps (IFVGs)** based on the Inner Circle Trader (ICT) methodology. It is built specifically around the **AM session (9:30–12:00 NY)** and **Silver Bullet windows (10:00–11:00 and 14:00–15:00 NY)**, firing real-time alerts when price returns to key entry levels.
The core signal is the **Consequent Encroachment (CE) tap** — price reaching the 50% midpoint (mean threshold) of a Fair Value Gap — which ICT teaches as the precision entry point within the gap. When this level is touched, the indicator fires a full alert with entry price, stop loss, take profit, R:R ratio, session tag, and quality tier.
---
## ICT Concepts Applied
**Fair Value Gap (FVG)**
A 3-candle price imbalance where the current bar's low is above the 2-bars-prior high (bullish) or the current bar's high is below the 2-bars-prior low (bearish). An optional ATR displacement filter ensures only gaps formed by real displacement candles are tracked.
**Consequent Encroachment (CE)**
The 50% midpoint of the FVG — also called the mean threshold. ICT teaches this as the primary entry reference within the gap, offering better risk-to-reward than entering at the gap edge.
**Inversion Fair Value Gap (IFVG)**
When price closes through the far edge of an FVG (a **body close**, not just a wick), the gap inverts its role — a bullish FVG becomes resistance, a bearish FVG becomes support. The next retest of the inverted zone is a trade in the new direction.
**First-Presented FVG (FPFVG)**
The first qualifying FVG of each session. ICT methodology emphasises this as the highest-quality setup of the session.
**Silver Bullet**
A specific ICT time window (10:00–11:00 AM and 2:00–3:00 PM New York time) within which the first FVG and its CE are considered premium setups.
**Liquidity Sweep (optional)**
A prerequisite where price raids a prior swing high or low (taking out resting orders) and then closes back inside the range before the displacement that creates the FVG. This forms the full ICT sequence: sweep → displacement → FVG → CE entry.
---
## Features
### Detection
- 3-candle FVG detection with configurable ATR displacement filter
- Optional liquidity sweep prerequisite (raid + rejection of prior swing)
- Tracks gaps until mitigated (full entry) or inverted (IFVG)
- Inversion confirmed by **candle body close** through the far edge — not a wick
### Session & Scope
- Configurable AM (default 9:30–12:00) and PM (1:30–4:00) session windows
- Silver Bullet windows: AM (10:00–11:00) and PM (2:00–3:00)
- Optional London Silver Bullet (3:00–4:00 AM NY)
- Three scope modes: All gaps | Session gaps only | First-presented + Silver Bullet
### Time-of-Day Quality Filter
Gaps are colour-coded by formation time based on historical win-rate data:
| Tier | Window | Visual |
|------|--------|--------|
| HIGH | 9:30–10:00 AM | Bright boxes |
| MED | 10:00–11:00 AM | Normal boxes (Silver Bullet) |
| LOW | 11:00 AM–12:00 PM | Dimmed boxes |
LOW-quality alerts and R:R zones are suppressed by default to reduce noise.
### Two-Tier Alert System
Every CE tap fires a rich alert message containing:
- Priority tier (`*** PRIORITY` for first-presented/SB, `SETUP` for others)
- Quality tier (`HIGH`, `MED`, or `LOW`)
- Ticker and timeframe
- Trade direction (`LONG` or `SHORT`)
- Exact CE entry level
- Stop loss level
- Take profit level
- R:R ratio
- Session tag (e.g. `1st AM`, `SB-AM`, `AM`)
- Current price
**Example alert message:**
```
*** PRIORITY | NQ 3 | LONG | CE 21245.00 | SL 21235.00 | TP 21275.00 | 1:3.0 | | px 21246.25
```
### R:R Zones
When a CE tap occurs, the indicator automatically draws:
- **Yellow dashed line** — Entry at CE
- **Red solid line** — Stop loss level with label
- **Green solid line** — Take profit level with label
- **Green fill zone** — CE to TP visual
- **Red fill zone** — CE to SL visual
Default levels are set to the backtest-optimised values for the 3-minute NQ chart (10-point stop / 30-point target). These are fully configurable.
### Dashboard (top-right table)
- Live session status for AM, PM, Silver Bullet AM/PM/London
- Time-quality tier indicator with win-rate reference per bucket
- Daily CE signal counter vs cap
- Current R:R settings reminder
---
## How to Use
**Step 1 — Add to chart**
Paste into Pine Editor, Save, then click *Add to chart*. The indicator works as an overlay on any symbol and timeframe.
**Step 2 — Choose your scope**
In *Settings → Scope*, select:
- **"In configured sessions only"** to track all AM/PM FVGs (more signals)
- **"First-presented + Silver Bullet"** for highest-quality only (fewer signals)
**Step 3 — Set your R:R levels**
In *Settings → R:R Levels*, enter your stop loss and take profit in points. Defaults are 10pt stop / 30pt TP — calibrated for the 3-minute NQ futures chart.
**Step 4 — Create alerts**
1. Right-click the chart → *Add alert*
2. Condition = this indicator → select one of:
- **"*** PRIORITY CE tap"** — First-presented and Silver Bullet gaps only
- **"SETUP CE tap"** — All other session gaps
- **"Any CE tap"** — Catch-all for both tiers
- **"Any ICT signal"** — Includes inversions and IFVG retests
3. Set trigger to *Once Per Bar Close* to match closed-bar detection and avoid repaint
**Step 5 — Read the chart**
- **Bright boxes** = HIGH quality (9:30–10:00 AM) — best setups
- **Normal boxes** = MED quality (Silver Bullet window)
- **Dimmed boxes** = LOW quality (11:00 AM+) — alerts suppressed by default
- **Yellow border** = First-presented FVG of the session
- **Orange box** = FVG has inverted → now an IFVG — trade the opposite direction
- **Green/Red zones** = R:R levels drawn at moment of CE tap
---
## Settings Reference
| Group | Setting | Description |
|-------|---------|-------------|
| Detection | ATR filter | Minimum gap size relative to ATR14 — filters out small gaps |
| Detection | Closed bars only | Prevents repainting — recommended ON |
| Liquidity Sweep | Require sweep | Makes the full ICT sequence mandatory before a gap qualifies |
| Scope | Which gaps to track | Controls how many gaps are tracked and drawn |
| Sessions | AM / PM / SB times | All configurable in NY time. DST is handled automatically |
| Quality Filter | Enable quality tiers | Colour-codes gaps by time-of-day win rate |
| Quality Filter | Suppress LOW alerts | Prevents alerts after 11:00 AM when win rates drop |
| Alerts | PRIORITY / SETUP | Toggle each alert tier independently |
| Alerts | Max CE per day | Daily signal cap — default 4, matching recommended session limit |
| R:R Levels | Stop / TP points | Draws SL and TP lines and fill zones on every CE tap |
---
## Alert Setup for Mobile Notifications
To receive push notifications to the PulseWire mobile app:
1. Create the alert as above
2. Under *Notifications*, enable **App notification**
3. Set trigger to *Once Per Bar Close*
For webhook/automation, the alert message is structured for easy parsing:
- Fields are `|`-separated
- Entry, SL, and TP are explicit price levels (not offsets)
---
## Notes & Disclaimers
- **Timeframe:** The indicator works on all timeframes. Default settings (10pt SL / 30pt TP) are calibrated for the **3-minute NQ futures chart** based on internal backtesting over 60 days of data. Adjust stop and target values to match your instrument's volatility and your preferred timeframe.
- **Repaint:** With *"Detect on closed bars only"* enabled (default), all signals are based on confirmed closed candles. Disabling this option allows earlier intrabar detection but will repaint before the bar closes.
- **Inversion logic:** Inversion is confirmed by a candle **body close** through the far edge of the gap, per ICT teaching. A wick alone does not qualify.
- **No financial advice:** This indicator is a technical analysis tool. All signals are for informational purposes only. Past performance of any pattern or level does not guarantee future results. Always use appropriate risk management and conduct your own analysis before entering any trade.
- **ICT methodology:** Fair Value Gaps, Silver Bullet, Consequent Encroachment, and related terminology are concepts taught by the Inner Circle Trader (ICT). This indicator is an independent technical implementation and is not affiliated with, endorsed by, or produced by ICT.
---
*Built with Pine Script v6.* Indicator

Indicator

Indicator

Elaris FVG Inversion ProElaris FVG Inversion Pro
Advanced Fair Value Gap & Inversion Mapping System
Elaris FVG Inversion Pro is a professional-grade market structure and imbalance visualization tool designed to help traders identify fair value gaps (FVGs), inversion fair value gaps (IFVGs), and potential reaction zones directly on the chart.
The indicator focuses on price inefficiencies created by aggressive directional movement and highlights areas where price may revisit, react, continue, or reverse.
Instead of displaying excessive noise, the system uses smart filtering logic, mitigation tracking, and optional trend confirmation to provide a cleaner and more structured view of market imbalance behavior.
━━━━━━━━━━━━━━━━━━
Core Features
━━━━━━━━━━━━━━━━━━
• Bullish & Bearish Fair Value Gap Detection
Automatically identifies three-candle imbalance structures in real time.
• Inversion Fair Value Gaps (IFVG)
Detects when previously established imbalance zones transition into potential reversal zones after invalidation.
• Non-Repainting Confirmed Detection
Signals and zones can be confirmed only after candle close to maintain stable historical plotting.
• Smart Gap Filtering
Optional ATR, volume, and EMA trend filters help reduce low-quality or insignificant zones.
• Dynamic Zone Management
Zones automatically extend forward and can be configured to expire or hide after mitigation.
• Mitigation Tracking
Supports multiple mitigation models including:
* Proximal
* Midpoint (50%)
* Distal
• Quality Scoring System
Each zone is evaluated using volatility and structure-based conditions to help prioritize stronger imbalances.
• Dark & Light Mode Compatible
Designed for clean visibility across different PulseWire chart themes.
• Professional Dashboard
Displays active bullish, bearish, and inversion zones along with trend-state information.
━━━━━━━━━━━━━━━━━━
How It Works
━━━━━━━━━━━━━━━━━━
Bullish FVG:
Forms when price leaves an upside imbalance between candles, potentially creating a future demand area.
Bearish FVG:
Forms when price leaves a downside imbalance, potentially acting as future supply.
IFVG:
Occurs when price invalidates an existing FVG and the zone transitions into a potential reversal area.
The indicator can be used for:
* Trend continuation setups
* Pullback entries
* Liquidity-based reactions
* Market structure analysis
* Confluence with support/resistance or liquidity concepts
━━━━━━━━━━━━━━━━━━
Best Practices
━━━━━━━━━━━━━━━━━━
Higher timeframe FVGs generally produce stronger reactions than lower timeframe gaps.
Using the optional EMA and volume filters may help improve signal quality during volatile or choppy market conditions.
For confirmation-based trading approaches, combine FVG reactions with structure breaks, momentum shifts, or liquidity sweeps.
━━━━━━━━━━━━━━━━━━
Notes
━━━━━━━━━━━━━━━━━━
This indicator is intended for technical analysis and educational purposes.
No indicator guarantees future performance, and traders should always apply proper risk management and independent confirmation before making trading decisions.
Indicator

Indicator

Indicator

Indicator

Ultimate FVG/NWOG By FreedomByChartsUltimate FVG/NWOG By FreedomByCharts
A clean, no-bloat FVG and NWOG indicator built around how I actually trade: chart timeframe + three independent higher timeframes + the New Week Opening Gap, all in one global colour scheme with sensible defaults and granular per-source control.
Why this one
Most FVG indicators on TV fall into one of two camps. Either they're stripped down to the bare chart-timeframe pattern with a single fill colour and a hardcoded mitigation rule, or they're bloated with theme presets, IPDA modes, half-finished features and ten settings groups you'll never use. This one is built the other way round: deep where it matters (mitigation logic, NWOG accuracy, display control), and stripped of everything that doesn't earn its place on the chart.
What's actually different:
Four mitigation modes, not one. Wick Filled (full), Body Filled (full), Wick 50%, Body 50%. Pick what matches your model — strict body close beyond the far side, or a partial wick into the midpoint, or anything between.
Independent box and line visibility per source. Box on, lines off. Lines on, box off. Top + bottom only, no middle. Mid line dotted, top and bottom solid. Whatever you want — five sources, each independent.
Mitigated FVGs become iFVGs. When an FVG gets mitigated its label flips from e.g. `1H` to `1H iFVG`, marking the zone as an inverted FVG — the same level can now act in the opposite direction. NWOG labels stay as `NWOG` since the inversion concept doesn't apply.
Mitigated zones can drop their lines automatically. Per-source toggle: keep the grey box for context, lose the line clutter. Active zones stay fully drawn.
Three HTFs at once, plus chart TF, plus NWOG. Run 1H, 4H, 1D simultaneously while the chart-TF FVGs print on whatever you're looking at. Each fully configurable. No request.security guesswork — the HTF tracking is explicit and aligned to the chart bars where each HTF period's high and low actually occurred.
NWOG done properly, including holiday weeks. The NWOG anchors to the close of the last 1H bar before the weekend (Friday on a normal week, Thursday on Easter / Good Friday week) and the open of Sunday's first 1H bar. No stale Friday-only state, no wrong-priced boxes anchored at the wrong bar after holiday closes.
Single global colour scheme. One bullish colour, one bearish colour, one mitigated grey. Applied uniformly across every source for a clean, professional look. NWOG can override its own bull/bear colours if you want it to stand out.
No display caps you have to work around. Set the unfilled count and mitigated count per source to whatever you actually want to see. Old zones get pruned automatically as new ones form.
What it draws
Chart FVGs — current timeframe, both bullish and bearish.
HTF1, HTF2, HTF3 — three configurable higher timeframes (defaults: 1H, 4H, 1D), all rendered on the current chart.
NWOG — the body gap between the close of the last 1H trading bar before the weekend and the open of Sunday's first 1H bar.
For each zone you get an optional coloured box (transparency adjustable), an optional top line, mid line, bot line (each with independent show/hide and Solid/Dashed/Dotted style), and an optional label showing the timeframe (auto-formatted as "1H", "4H", "1D", "NWOG", etc).
When a zone is mitigated, the box recolours to grey, the lines either go grey or hide entirely depending on the per-source toggle, and the label flips to show iFVG status (e.g. `1H` becomes `1H iFVG` — NWOGs keep their `NWOG` label). Mitigated zones stay visible for as many slots as you allow, then get pruned.
Mitigation methods explained
For a bullish FVG (zone below price), the chosen method tests whether price has come back down into the zone:
Wick Filled (full) — bar's low has reached the bottom of the zone. Default.
Body Filled (full) — bar's close has reached the bottom of the zone.
Wick 50% — bar's low has reached the midpoint.
Body 50% — bar's close has reached the midpoint.
Bearish zones (above price) test the opposite direction. Mitigation triggers an alert if you've enabled it for that source.
Alerts
Two alert flags per source: entry (price first touches the zone) and mitigation (price meets the mitigation criterion). Alert text identifies the source timeframe, direction (bull or bear) and the price.
Settings, top to bottom
Appearance — bull / bear / mitigated colours, box transparency, mitigated box transparency, line width, right-edge extension (default 0 = right edge sits at the current bar; raise it to extend further right), label text colour.
Mitigation — single global mitigation method dropdown.
Chart — enable, box / line visibility, line styles, unfilled and mitigated counts, mitigated-lines toggle, label settings, alerts.
HTF 1, HTF 2, HTF 3 — same controls as Chart plus a timeframe input.
NWOG — same controls as the others, plus optional NWOG-specific bull/bear colour overrides.
Notes on usage
For NWOG live detection use a 1H or smaller intraday chart. On 4H+ charts the bar boundaries don't land on the 18:00 NY moment cleanly so new NWOGs won't form.
HTF FVGs appear on the chart at the bar where their HTF period closed, anchored back to the chart bars where the relevant HTF candle highs and lows occurred — this gives a clean "stepped" visual at the zone's left edge that shows how it formed.
The right edge of every zone tracks the current bar in real time. Set "Extend right beyond current bar" higher if you prefer a fixed runway.
PulseWire caps total drawn objects at 500 lines / 500 boxes / 500 labels. With three lines per zone enabled across many sources at high display caps, you can hit those limits — drop the mid line first (it's off by default for that reason) and you double your headroom.
Built specifically for the way I trade GC futures on the 1H. Sharing because I haven't seen another FVG indicator that handles all three of these together: holiday-week NWOGs, four mitigation modes, and independent box/line control per source. Feedback welcome. Indicator

Indicator

Indicator

Indicator

EMA Inversion [MMT]The EMA Inversion indicator is a complete, trend-following price action system that bridges traditional moving average momentum with modern imbalance concepts (Fair Value Gaps and Inversions). It is designed to strictly identify high-probability pullback continuation setups while keeping your chart clean and optimized.
How the Strategy Works
This script looks for a specific sequence of events to trigger a valid entry:
Trend Alignment: The overarching trend is defined by the alignment of the Fast (33), Medium (50), and Slow (200) EMAs.
The Pullback: Price must pull back into the "Value Band" (the shaded area between the 33 and 50 EMAs).
The Imbalance: During this pullback, the script tracks the formation of Fair Value Gaps (FVGs).
The Inversion (Trigger): A signal is fired when price violently reverses out of the pullback, closing completely through the opposing FVG (turning it into an iFVG) while simultaneously closing back in the direction of the EMA trend.
Signal Triggers
🟢 Long Setup: Price is above all 3 EMAs. Price pulls back into the EMA band. A Bearish FVG is formed. Price then rallies, closing above the Bearish FVG (creating a bullish iFVG) AND closing back above the 33 EMA.
🔴 Short Setup: Price is below all 3 EMAs. Price pulls back into the EMA band. A Bullish FVG is formed. Price drops, closing below the Bullish FVG (creating a bearish iFVG) AND closing back below the 33 EMA.
Key Features
[* ]Decoupled FVG & iFVG Tracking : Unlike standard scripts that clutter your screen, this indicator utilizes independent, modular array management. You can set a strict limit on how many "Normal FVGs" and "Inverted FVGs" are drawn on your chart at one time, keeping your workspace incredibly clean.
Dynamic Extension Limits : Choose exactly how many bars you want your unmitigated imbalance boxes to extend to the right, or set it to 0 for indefinite extension until mitigated.
Visual Customization : Fully customize the colors, borders, and backgrounds for your EMAs, normal FVGs, and Inversion FVGs. The indicator visually flips the box colors the exact moment an inversion occurs.
Built-in Automation Alerts : The script includes pre-formatted JSON webhook alerts (ready for Node.js, Python, or 3rd-party execution services) to instantly route buy and sell signals to your live brokerage accounts.
Best Timeframes:
Works well across all intraday timeframes (1m, 3m, 5m, 15m), particularly for index futures (NQ/ES) and forex day trading.
Disclaimer: This script is for educational and technical analysis purposes only and does not constitute financial advice. Indicator

Volumetric Inverse Fair Value Gap (VIFVG) [UAlgo]Volumetric Inverse Fair Value Gap is an imbalance analysis tool that tracks the full lifecycle of a Fair Value Gap and then focuses on what happens after that gap fails. Instead of stopping at the initial gap detection, the script stores qualifying bullish and bearish FVGs, waits for price to invalidate them from the opposite side, and then converts those failed imbalances into active Inverse Fair Value Gaps.
The main idea is rooted in role reversal. A bullish Fair Value Gap may initially represent an area of inefficiency below price, but if price later trades through that gap in the opposite direction, the same zone can flip into a bearish inverse area. The same logic applies in reverse for bearish gaps that later fail to the upside. This script automates that transition and keeps the resulting IFVG visible on the chart as long as it remains active.
What makes this version more distinctive is the volumetric overlay inside the inverse zone. Once an IFVG is created, the script attaches three internal metrics to it. The first estimates bullish participation, the second estimates bearish participation, and the third measures relative volume strength using percentile rank. These values are then displayed inside the box as horizontal progress bars, turning the IFVG into both a structural level and a compact participation summary.
The indicator also supports a ghost box that preserves the original FVG location from the moment it was created until the moment it became inverse. This gives the user a clearer narrative of how the imbalance formed and where the role reversal occurred. Combined with the active box, the result is a visually informative workflow for traders who want to study failed imbalances, structure flips, and how strong the inversion candle was when the role change happened.
In practical use, the script can help identify zones where a former inefficiency has turned into a reaction area, while also showing whether the inversion event carried more bullish pressure, more bearish pressure, or unusually strong participation relative to recent volume history.
🔹 Features
🔸 Fair Value Gap Detection With ATR Filtering
The script first detects classic three candle FVG structures, then filters them using a minimum gap size expressed in ATR units. This helps reduce noise and removes smaller gaps that may be less meaningful.
🔸 Strict and Non Strict Detection Modes
Strict mode requires actual wick separation between the first and third candle. Non strict mode allows close based confirmation instead. This gives the user control over how precise the gap definition should be.
🔸 Pending FVG Lifecycle Tracking
Detected FVGs are not immediately turned into inverse zones. They are first stored as pending gaps and monitored until price later crosses them in the opposite direction.
🔸 Automatic FVG to IFVG Conversion
When price invalidates a pending gap from the opposite side, the script creates a new Inverse Fair Value Gap object and begins tracking it as an active zone.
🔸 Ghost Box Support
The original FVG can be preserved visually as a dashed ghost box from the creation time of the imbalance to the inversion time. This makes it easier to see the original gap and the later role reversal event together.
🔸 Volumetric Breakdown Inside the IFVG
Each active inverse gap includes three stacked internal bars:
estimated bullish participation,
estimated bearish participation,
and relative strength.
This gives the zone more context than a normal box alone.
🔸 Participation Estimation From Candle Anatomy
Bullish and bearish participation are estimated from the inversion candle’s structure and volume. This creates a practical volume split model that helps describe how the inversion occurred.
🔸 Strength Metric From Volume Percentile Rank
The script measures how strong the inversion candle’s volume is relative to the last one hundred bars. This is displayed as a separate strength bar inside the IFVG.
🔸 Live Box Expansion
As long as an IFVG remains active, its container extends forward in time. The internal volumetric bars and text labels are updated continuously so the zone remains clear and readable.
🔸 Automatic Invalidation
A bullish IFVG is removed if price closes below its bottom. A bearish IFVG is removed if price closes above its top. This keeps the display focused on still valid inverse zones.
🔸 Controlled History Size
The script limits how many active IFVGs remain on the chart. Older ones are removed once the display exceeds the selected history count.
🔹 Calculations
1) Defining the Pending Gap and Active IFVG Objects
type PendingFVG
float top
float btm
bool is_bull_gap
bool processed
int created_time
type IFVG
int start_time
int origin_time
float top
float btm
bool is_bull_ifvg
float pct_bull
float pct_bear
float pct_strength
box container
box ghost_box
box bg_bull
box bar_bull
box bg_bear
box bar_bear
box bg_str
box bar_str
label lbl_bull
label lbl_bear
label lbl_str
bool active
This is the structural foundation of the script.
A PendingFVG stores an imbalance that has been detected but has not yet inverted. It contains the gap boundaries, whether the original gap was bullish or bearish, whether it has already been processed into an inverse gap, and the time when it was created.
An IFVG stores the full active inverse gap state. In addition to the price boundaries and direction, it also stores the three internal metrics, the container box, the optional ghost box, the internal background and progress bars, the labels, and the active state.
So the script is not just drawing boxes. It is managing two linked object lifecycles:
pending FVGs,
and active inverse FVGs.
2) ATR Filter for Gap Significance
float atr_val = ta.atr(14)
The ATR value is used as the script’s minimum significance filter.
Instead of accepting every visible gap, the script compares gap size against a fraction of ATR. This is useful because a fixed price threshold would behave very differently across markets and timeframes, while ATR gives a volatility aware reference.
So ATR acts as the noise filter that decides whether a newly found gap deserves to be tracked.
3) Estimating Bullish and Bearish Participation
calc_metrics(float o, float h, float l, float c, float v) =>
float rng = h - l
float buy_v = 0.0
if rng == 0
buy_v := v * 0.5
else
if c >= o
buy_v := v * ((math.abs(c - o) + (math.min(o, c) - l)) / rng)
else
buy_v := v * ((h - math.max(o, c)) / rng)
float sell_v = v - buy_v
float total = buy_v + sell_v
float p_bull = total > 0 ? buy_v / total : 0
float p_bear = total > 0 ? sell_v / total : 0
float p_str = ta.percentrank(v, 100) / 100.0
This function is one of the most important parts of the whole script.
Its goal is to turn one candle into three interpretable metrics:
bullish share,
bearish share,
and strength.
First, the script measures the candle range. If the candle has zero range, volume is split evenly.
If the candle has a real range, the script estimates buying pressure differently depending on candle direction.
For bullish candles, buy volume is influenced by the candle body plus the lower section of the candle.
For bearish candles, buy volume is approximated from the remaining upper section.
The result is not true exchange level aggressor volume, but it is a practical candle anatomy based estimate of how much of the inversion bar behaved more like buying versus selling.
Then the script converts those raw buy and sell estimates into proportions:
p_bull
and
p_bear
Finally, it calculates p_str using the percentile rank of current volume over the last one hundred bars. That means the strength value is not just raw volume. It describes how relatively strong the inversion candle was compared with recent history.
4) Reading the Current Candle Metrics
= calc_metrics(open, high, low, close, volume)
This line applies the volumetric function to the current bar.
These three values are later attached to a new IFVG at the moment of inversion. So each active inverse gap inherits the participation and strength profile of the candle that caused the role reversal.
That is important conceptually. The internal bars inside the IFVG are not random decorations. They represent the inversion event itself.
5) Detecting Bullish and Bearish FVGs
bool bull_cond = strict_mode ? (low > high ) : (close > high )
bool bear_cond = strict_mode ? (high < low ) : (close < low )
This block defines the actual Fair Value Gap logic.
In strict mode:
a bullish gap exists only when the current low is above the high from two bars ago,
and a bearish gap exists only when the current high is below the low from two bars ago.
That means actual wick separation is required.
In non strict mode:
the script relaxes this and allows close based confirmation instead.
So the user can choose whether the script should only accept clean wick gaps or allow a softer close based definition.
6) Measuring the Gap Size
float gap_size = 0.0
if bull_cond and close > open
gap_size := low - high
if bear_cond and close < open
gap_size := low - high
bool is_significant = gap_size >= (atr_val * fvg_threshold_atr)
Once a candidate FVG is found, the script measures how large the gap actually is.
For bullish gaps, the size is the distance between the current low and the high from two bars ago.
For bearish gaps, the size is the distance between the low from two bars ago and the current high.
The script also adds a candle direction filter on the middle bar:
bullish gaps require the middle candle to be bullish,
and bearish gaps require the middle candle to be bearish.
Finally, the measured gap must be at least as large as:
ATR × threshold
This removes smaller gaps that may simply be noise.
7) Storing a Pending FVG
if is_significant
PendingFVG p = PendingFVG.new()
p.created_time := time
p.processed := false
if bull_cond
p.is_bull_gap := true
p.top := low
p.btm := high
else
p.is_bull_gap := false
p.top := low
p.btm := high
array.push(pending_fvgs, p)
If the gap is significant, the script stores it as a pending FVG.
The gap is not drawn yet as an inverse zone. Instead, it is placed into the pending list with:
its direction,
its boundaries,
its creation time,
and a flag showing it has not yet been processed.
This is important because an FVG only becomes an IFVG after it fails. The pending list is the waiting room for that future role reversal.
8) Detecting the Inversion Event
if array.size(pending_fvgs) > 0
for i = array.size(pending_fvgs) - 1 to 0
PendingFVG p = array.get(pending_fvgs, i)
if not p.processed
bool inverted = false
bool to_bull = false
if not p.is_bull_gap and close > p.top
inverted := true
to_bull := true
if p.is_bull_gap and close < p.btm
inverted := true
to_bull := false
This is the core IFVG transition logic.
A pending bearish FVG becomes a bullish IFVG if price closes above its top.
A pending bullish FVG becomes a bearish IFVG if price closes below its bottom.
That is the actual role reversal event. Price has invalidated the original imbalance from the opposite side, so the gap flips into an inverse form.
The to_bull flag determines the direction of the new inverse zone.
9) Creating the IFVG Object
if inverted
IFVG obj = IFVG.new()
obj.start_time := time
obj.origin_time := p.created_time
obj.top := p.top
obj.btm := p.btm
obj.is_bull_ifvg := to_bull
obj.pct_bull := curr_p_bull
obj.pct_bear := curr_p_bear
obj.pct_strength := curr_p_str
obj.active := true
obj.create_drawings()
array.push(active_ifvgs, obj)
p.processed := true
Once inversion is confirmed, the script creates the active IFVG.
The new object inherits:
the original FVG boundaries,
the original creation time,
the inversion start time,
and the new inverse direction.
It also stores:
the bullish participation percentage,
the bearish participation percentage,
and the strength percentage from the inversion candle.
So the IFVG is a structural object with a built in event profile. It tells the user not only where the failed gap is located, but also what the inversion bar looked like in participation terms.
10) Creating the Ghost Box and Main Container
if show_ghost
this.ghost_box := box.new(
left=this.origin_time,
top=this.top,
right=this.start_time,
bottom=this.btm,
border_color=color.new(c_border, 20),
border_width=1,
border_style=line.style_dashed,
bgcolor=c_ghost,
xloc=xloc.bar_time
)
this.container := box.new(
left=this.start_time,
top=this.top,
right=time,
bottom=this.btm,
border_color=c_border,
border_width=1,
bgcolor=color(na),
xloc=xloc.bar_time
)
This is the first part of the IFVG drawing engine.
If ghost mode is enabled, the script draws a dashed box from the original FVG creation time to the inversion time. This visually represents the original gap before it failed.
Then it creates the main IFVG container box starting from the inversion time and extending to the current bar.
So the chart can show both:
where the original gap existed,
and where the inverse zone now lives.
11) Building the Internal Volumetric Bar Areas
this.bg_bull := box.new(this.start_time, this.top, time, this.top, border_width=0, bgcolor=c_bg_dark, xloc=xloc.bar_time)
this.bar_bull := box.new(this.start_time, this.top, this.start_time, this.top, border_width=0, bgcolor=c_bull_bar, xloc=xloc.bar_time)
this.bg_bear := box.new(this.start_time, this.top, time, this.top, border_width=0, bgcolor=c_bg_dark, xloc=xloc.bar_time)
this.bar_bear := box.new(this.start_time, this.top, this.start_time, this.top, border_width=0, bgcolor=c_bear_bar, xloc=xloc.bar_time)
this.bg_str := box.new(this.start_time, this.top, time, this.top, border_width=0, bgcolor=c_bg_dark, xloc=xloc.bar_time)
this.bar_str := box.new(this.start_time, this.top, this.start_time, this.top, border_width=0, bgcolor=c_str_bar, xloc=xloc.bar_time)
Inside every IFVG, the script creates three horizontal rows.
Each row has:
a dark background box,
and a colored progress bar box.
The three rows represent:
bullish participation,
bearish participation,
and strength.
Initially these boxes are created with minimal size. Their real geometry is set later during updates.
So the IFVG is designed as a mini information panel embedded directly inside the zone.
12) Slicing the IFVG Into Three Metric Rows
float total_h = this.top - this.btm
float h_slice = total_h / 3
float y1 = this.top
float y2 = this.top - h_slice
float y3 = this.top - 2 * h_slice
float y4 = this.btm
This block divides the IFVG vertically into three equal sections.
The full height of the box is measured, then split into thirds:
the first slice for bullish participation,
the second slice for bearish participation,
the third slice for strength.
This makes the internal visualization clean and consistent regardless of zone height.
13) Converting Percentages Into Horizontal Width
int now = time
int dur = now - this.start_time
if dur <= 0
dur := timeframe.in_seconds() * 1000
int w_bull = math.round(dur * this.pct_bull)
int w_bear = math.round(dur * this.pct_bear)
int w_str = math.round(dur * this.pct_strength)
This is how the script turns percentages into visible progress bars.
The available horizontal width is the elapsed time from the IFVG start to the current bar. That duration becomes the maximum usable width.
Then each stored metric is multiplied by that duration:
bullish percentage controls the bullish bar width,
bearish percentage controls the bearish bar width,
strength percentage controls the strength bar width.
So the internal bars behave like proportion meters stretched across the live duration of the zone.
14) Updating the Bull, Bear, and Strength Bars
this.bg_bull.set_left(this.start_time)
this.bg_bull.set_right(now)
this.bg_bull.set_top(y1)
this.bg_bull.set_bottom(y2)
this.bar_bull.set_left(this.start_time)
this.bar_bull.set_right(this.start_time + w_bull)
this.bar_bull.set_top(y1)
this.bar_bull.set_bottom(y2)
this.bg_bear.set_left(this.start_time)
this.bg_bear.set_right(now)
this.bg_bear.set_top(y2)
this.bg_bear.set_bottom(y3)
this.bar_bear.set_left(this.start_time)
this.bar_bear.set_right(this.start_time + w_bear)
this.bar_bear.set_top(y2)
this.bar_bear.set_bottom(y3)
this.bg_str.set_left(this.start_time)
this.bg_str.set_right(now)
this.bg_str.set_top(y3)
this.bg_str.set_bottom(y4)
this.bar_str.set_left(this.start_time)
this.bar_str.set_right(this.start_time + w_str)
this.bar_str.set_top(y3)
this.bar_str.set_bottom(y4)
These blocks physically place the three metric layers inside the IFVG.
Each background row spans the full current width of the active zone.
Each colored bar spans only the proportional amount determined by the stored metric.
So if bullish participation is high, the bullish bar stretches farther across its row. If strength is low, the strength bar remains shorter.
This gives the zone an at a glance internal profile.
15) Updating the Text Labels
this.lbl_bull.set_xy(center_x, mid_bull)
this.lbl_bull.set_text(str.format("Bull: {0}%", math.round(this.pct_bull * 100)))
this.lbl_bear.set_xy(center_x, mid_bear)
this.lbl_bear.set_text(str.format("Bear: {0}%", math.round(this.pct_bear * 100)))
this.lbl_str.set_xy(center_x, mid_str)
this.lbl_str.set_text(str.format("Str: {0}%", math.round(this.pct_strength * 100)))
The script also prints the numerical values inside the three rows.
Each label is placed at the center of its row and updated with the rounded percentage value.
So the user sees both:
the visual bar length,
and the exact stored percentage.
This makes the IFVG readable even when box width is large or when color alone is not enough.
16) IFVG Invalidation Logic
bool broken = false
if this.is_bull_ifvg and close < this.btm
broken := true
if not this.is_bull_ifvg and close > this.top
broken := true
if broken
this.active := false
this.remove()
An active IFVG only remains valid while price stays on the correct side of its structure.
For bullish IFVG:
if close falls below the bottom, the zone is broken.
For bearish IFVG:
if close rises above the top, the zone is broken.
When that happens, the IFVG is marked inactive and all associated objects are deleted.
So the indicator is not just drawing inverse gaps indefinitely. It actively monitors whether they continue to behave as valid reaction zones.
17) Display Limit Management
while array.size(active_ifvgs) > show_last_n
IFVG d = array.shift(active_ifvgs)
d.remove()
This final block controls how many IFVGs remain visible.
If the number of active inverse gaps exceeds the selected display limit, the oldest one is removed from the front of the array and all of its drawings are deleted.
This keeps the chart focused on the most recent inverse gaps and prevents excessive visual clutter. Indicator
