OPEN-SOURCE SCRIPT
Updated FVG Crossfire

GENERAL OVERVIEW:
FVG Crossfire identifies and plots the exact price bands where a bullish and a bearish imbalance have overlapped. These overlap bands, called crossfire zones, are the only objects the indicator draws. Ordinary Fair Value Gaps are tracked in the background as inputs, but a standalone gap is never rendered on the chart; a zone is created only when a fresh FVG overlaps an older, still-unfilled FVG of the opposite direction. From that point the zone remains on the chart, reversing direction each time an opposing FVG overlaps it, recording each transition with a star counter, marking every retest with an arrow, and being removed only when price trades fully through it.

What is the theory behind the indicator?
A Fair Value Gap records a price imbalance: price moved quickly enough that a gap was left between the wicks of the surrounding candles. The problem is that FVGs are common. On a fast chart dozens print every session, most of them noise, and drawing them all obscures the few levels that actually matter.
FVG Crossfire is built on a stricter criterion: the event worth displaying is the overlap. When a new imbalance prints in the opposite direction directly on top of an older, still-unfilled one, that price band is no longer one-sided; buyers have left an imbalance there, and now sellers have as well (or the reverse). That overlap marks a contested level, one the market has already reacted to from both directions.
The sequence often continues. Each additional opposing FVG flips the zone again, and because a flip keeps only the portion of the zone where the imbalances actually overlap, the contested band becomes tighter and more precise with each transition. What remains is a narrow, repeatedly tested level with a visible history, which is among the strongest forms of support or resistance an imbalance structure can produce.
The FVG Crossfire indicator includes 5 main features:
CROSSFIRE ZONE DETECTION:
🔹What Is a Crossfire Zone?
A crossfire zone is the price band shared by two opposite imbalances: an older, still-unfilled Fair Value Gap and a newly formed FVG in the opposite direction that printed on top of it. The zone covers only the overlap, and it takes the direction and color of the newer FVG, the most recent side to print. An optional "origin funnel" draws converging lines from the older gap into the zone, so the source of the overlap remains visible.

🔹What Is a Fair Value Gap?
For background: an FVG is a three-candle pattern where the middle candle moves so strongly that a gap is left between the first candle and the third: the low of candle three above the high of candle one (bullish), or the high of candle three below the low of candle one (bearish). In this indicator FVGs are inputs, not output: they are detected and tracked entirely in the background, and one that never overlaps an opposite gap is discarded without ever being drawn.
🔹Why Are Crossfire Zones Important?
A single gap indicates one-sided aggression at a price. A crossfire zone indicates that both sides were aggressive at the same prices and disagreed. These contested bands tend to attract price repeatedly, which makes them stronger candidates for support, resistance, and reaction trades than any single gap. And because only overlaps are drawn, every object on the chart is already a filtered, higher-significance level.
🔹How Crossfire Zones Are Detected:
Every candle close, the engine scans the last three candles for a new FVG (gaps smaller than your minimum size are skipped, and candles around daily or weekly session breaks are excluded so overnight gaps don't create false patterns). Each stored gap is also tracked as later candles fill it (by wick or by close, depending on the setting), and a fully filled gap is dropped from the pool. When a fresh FVG confirms, it is compared against every waiting opposite gap: wherever it overlaps the unfilled part of one, a crossfire zone is created on the overlap and the origin funnel appears. Every FVG participates exactly once; after creating (or flipping) a zone it is consumed, so one price move never produces duplicate zones. Live zones extend to the right edge of the chart, and an optional "Combine" mode merges same-direction zones that overlap in price into one bigger zone.

🔹Settings: Base FVG Group (the detection engine)
🔹Settings: Crossfire Zone Group
ZONE FLIPPING & FLIP COUNTER:
🔹What Is a Zone Flip?
If a live crossfire zone is overlapped by another FVG in the opposite direction, the zone flips: the current box is frozen in place and a new, opposite-colored box continues from that point. Read left to right, a flipped zone forms a timeline of directional control over that price band.

🔹Why Do Flips Matter?
Every flip is another change of direction at the same level, evidence that the market continues to react to that price. And because each flip keeps only the part of the zone that the new FVG actually overlapped, the contested band tightens with every flip. A zone that has flipped three times is a narrow, precise, repeatedly contested level, exactly the kind of area worth planning trades around.
🔹How the Flip Counter Works:
Each live zone shows a star counter on its edge at the latest candle: green stars touching the bottom edge of bullish zones, red stars touching the top edge of bearish zones. One star means the zone has formed once, two stars means one flip, and so on; zones with five or more entries display a compact count instead (for example "6 ★"). There is no limit on flips; the chain only ends when the zone is fully mitigated.
RETEST DETECTION:
🔹What Is a Retest?
A retest is price leaving a live crossfire zone and then coming back to touch it again. The indicator marks every single retest: a small green ▲ below the candle that re-entered a bullish zone, a small red ▼ above the candle that re-entered a bearish zone.

🔹Why Are Retests Important?
The retest is usually the tradeable moment. A contested zone holding on a return visit is the confirmation many traders wait for before entering, and repeated successful retests indicate the level continues to hold.
🔹How Retests Are Detected:
On every candle close, the indicator checks whether the candle touched the zone (any wick contact counts) while the previous candle did not. Each fresh re-entry counts; price must leave the zone before the next retest can register, so a candle sitting inside the zone for several bars only counts once. Every retest can also fire an alert.
🔹Settings:
ZONE MITIGATION:
🔹What Is Zone Mitigation?
A crossfire zone is complete (fully mitigated) when price trades all the way through it: through the bottom of a bullish zone, or through the top of a bearish zone. At that point the zone and its whole flip history are removed from the chart, or kept and faded out if you prefer to study them.

🔹Why Does Mitigation Matter?
A zone that price has completely passed through has served its purpose: the imbalance on both sides is resolved. Removing finished zones keeps the chart focused on levels that still matter, while the optional faded view lets you review how past zones resolved.
🔹How Mitigation Is Detected:
You choose what counts as trading through the far side: any wick, or only a candle close. Until that happens, the zone stays live no matter how many times it flips or gets retested.
🔹Settings:
ALERTS:
FVG Crossfire covers the full life of a zone with four alert events, each with its own on/off switch. Create one alert on the indicator using "Any alert() function call" and every enabled event will come through with the symbol and timeframe in the message:
IMPORTANT NOTES:
UNIQUENESS:
Most FVG tools draw every gap and leave the trader to determine which ones matter; inversion (IFVG) tools go one step further and record a single change of direction. FVG Crossfire does not draw ordinary gaps at all. It uses them purely as inputs and puts only one thing on the chart: the price bands where opposite imbalances have overlapped, and it then tracks the full lifecycle of each contested level. Zones flip an unlimited number of times, each previous state freezes into a left-to-right timeline, the band tightens to the true overlap on every flip, a star counter records the number of transitions, every individual re-entry is flagged with a retest arrow and alert, and the level is only removed when price fully trades through it. The result is not another gap plotter: it is a filtered map of where opposing imbalances keep forming at the same prices, how many transitions each level has recorded, and exactly how tight the contested band has become.

FVG Crossfire identifies and plots the exact price bands where a bullish and a bearish imbalance have overlapped. These overlap bands, called crossfire zones, are the only objects the indicator draws. Ordinary Fair Value Gaps are tracked in the background as inputs, but a standalone gap is never rendered on the chart; a zone is created only when a fresh FVG overlaps an older, still-unfilled FVG of the opposite direction. From that point the zone remains on the chart, reversing direction each time an opposing FVG overlaps it, recording each transition with a star counter, marking every retest with an arrow, and being removed only when price trades fully through it.
What is the theory behind the indicator?
A Fair Value Gap records a price imbalance: price moved quickly enough that a gap was left between the wicks of the surrounding candles. The problem is that FVGs are common. On a fast chart dozens print every session, most of them noise, and drawing them all obscures the few levels that actually matter.
FVG Crossfire is built on a stricter criterion: the event worth displaying is the overlap. When a new imbalance prints in the opposite direction directly on top of an older, still-unfilled one, that price band is no longer one-sided; buyers have left an imbalance there, and now sellers have as well (or the reverse). That overlap marks a contested level, one the market has already reacted to from both directions.
The sequence often continues. Each additional opposing FVG flips the zone again, and because a flip keeps only the portion of the zone where the imbalances actually overlap, the contested band becomes tighter and more precise with each transition. What remains is a narrow, repeatedly tested level with a visible history, which is among the strongest forms of support or resistance an imbalance structure can produce.
The FVG Crossfire indicator includes 5 main features:
- FVG CROSSFIRE FEATURES
- Crossfire Zone Detection
- Zone Flipping & Flip Counter
- Retest Detection
- Zone Mitigation
- Alerts
CROSSFIRE ZONE DETECTION:
🔹What Is a Crossfire Zone?
A crossfire zone is the price band shared by two opposite imbalances: an older, still-unfilled Fair Value Gap and a newly formed FVG in the opposite direction that printed on top of it. The zone covers only the overlap, and it takes the direction and color of the newer FVG, the most recent side to print. An optional "origin funnel" draws converging lines from the older gap into the zone, so the source of the overlap remains visible.
🔹What Is a Fair Value Gap?
For background: an FVG is a three-candle pattern where the middle candle moves so strongly that a gap is left between the first candle and the third: the low of candle three above the high of candle one (bullish), or the high of candle three below the low of candle one (bearish). In this indicator FVGs are inputs, not output: they are detected and tracked entirely in the background, and one that never overlaps an opposite gap is discarded without ever being drawn.
🔹Why Are Crossfire Zones Important?
A single gap indicates one-sided aggression at a price. A crossfire zone indicates that both sides were aggressive at the same prices and disagreed. These contested bands tend to attract price repeatedly, which makes them stronger candidates for support, resistance, and reaction trades than any single gap. And because only overlaps are drawn, every object on the chart is already a filtered, higher-significance level.
🔹How Crossfire Zones Are Detected:
Every candle close, the engine scans the last three candles for a new FVG (gaps smaller than your minimum size are skipped, and candles around daily or weekly session breaks are excluded so overnight gaps don't create false patterns). Each stored gap is also tracked as later candles fill it (by wick or by close, depending on the setting), and a fully filled gap is dropped from the pool. When a fresh FVG confirms, it is compared against every waiting opposite gap: wherever it overlaps the unfilled part of one, a crossfire zone is created on the overlap and the origin funnel appears. Every FVG participates exactly once; after creating (or flipping) a zone it is consumed, so one price move never produces duplicate zones. Live zones extend to the right edge of the chart, and an optional "Combine" mode merges same-direction zones that overlap in price into one bigger zone.
🔹Settings: Base FVG Group (the detection engine)
- Base FVG mitigation: whether wicks or only candle closes fill a waiting gap before it can participate in an overlap.
- Min FVG gap (% of price): ignore gaps below this size; 0 keeps every gap.
- Show origin funnel: draw the converging lines from the source gap into its zone.
- Border, Style, Colors: visual control of the funnel; color transparency sets the fill strength.
🔹Settings: Crossfire Zone Group
- Lookback (candles): zones are only built inside the most recent N candles (default 3000); every zone created in the window is shown.
- Border, Style, Midline: outline and optional equilibrium line for each zone.
- Bullish / Bearish colors: transparency sets the zone fill strength.
- Combine overlapping zones: merge same-color zones that overlap in price.
ZONE FLIPPING & FLIP COUNTER:
🔹What Is a Zone Flip?
If a live crossfire zone is overlapped by another FVG in the opposite direction, the zone flips: the current box is frozen in place and a new, opposite-colored box continues from that point. Read left to right, a flipped zone forms a timeline of directional control over that price band.
🔹Why Do Flips Matter?
Every flip is another change of direction at the same level, evidence that the market continues to react to that price. And because each flip keeps only the part of the zone that the new FVG actually overlapped, the contested band tightens with every flip. A zone that has flipped three times is a narrow, precise, repeatedly contested level, exactly the kind of area worth planning trades around.
🔹How the Flip Counter Works:
Each live zone shows a star counter on its edge at the latest candle: green stars touching the bottom edge of bullish zones, red stars touching the top edge of bearish zones. One star means the zone has formed once, two stars means one flip, and so on; zones with five or more entries display a compact count instead (for example "6 ★"). There is no limit on flips; the chain only ends when the zone is fully mitigated.
RETEST DETECTION:
🔹What Is a Retest?
A retest is price leaving a live crossfire zone and then coming back to touch it again. The indicator marks every single retest: a small green ▲ below the candle that re-entered a bullish zone, a small red ▼ above the candle that re-entered a bearish zone.
🔹Why Are Retests Important?
The retest is usually the tradeable moment. A contested zone holding on a return visit is the confirmation many traders wait for before entering, and repeated successful retests indicate the level continues to hold.
🔹How Retests Are Detected:
On every candle close, the indicator checks whether the candle touched the zone (any wick contact counts) while the previous candle did not. Each fresh re-entry counts; price must leave the zone before the next retest can register, so a candle sitting inside the zone for several bars only counts once. Every retest can also fire an alert.
🔹Settings:
- Retest markers: show or hide the ▲/▼ arrows.
ZONE MITIGATION:
🔹What Is Zone Mitigation?
A crossfire zone is complete (fully mitigated) when price trades all the way through it: through the bottom of a bullish zone, or through the top of a bearish zone. At that point the zone and its whole flip history are removed from the chart, or kept and faded out if you prefer to study them.
🔹Why Does Mitigation Matter?
A zone that price has completely passed through has served its purpose: the imbalance on both sides is resolved. Removing finished zones keeps the chart focused on levels that still matter, while the optional faded view lets you review how past zones resolved.
🔹How Mitigation Is Detected:
You choose what counts as trading through the far side: any wick, or only a candle close. Until that happens, the zone stays live no matter how many times it flips or gets retested.
🔹Settings:
- Zone mitigation: Wick or Close.
- Show mitigated zones: keep finished chains on the chart, frozen and dimmed.
ALERTS:
FVG Crossfire covers the full life of a zone with four alert events, each with its own on/off switch. Create one alert on the indicator using "Any alert() function call" and every enabled event will come through with the symbol and timeframe in the message:
- New crossfire zone: two opposite FVGs overlapped and a new zone was created.
- Zone flipped: a live zone changed direction (bullish ↔ bearish).
- Zone retested: price re-entered a live zone after being outside it (fires on every re-entry).
- Zone mitigated: a zone was fully traded through and completed.
IMPORTANT NOTES:
- Plain FVGs are never drawn. Gaps are tracked in the background, and a gap only becomes visible, through its origin funnel, at the moment it produces a crossfire zone. Every object drawn on the chart is already an overlap.
- All detections are evaluated on candle close. Zones, flips, retests, and mitigations are confirmed events; they do not repaint.
- Background gaps are filled on a three-candle delay. This is deliberate: the same impulsive move that creates the new FVG is often the move that fills the old one, and without the delay the overlap could never be detected.
- Each FVG participates exactly once. After creating or flipping a zone it is consumed, so one price move never produces duplicate zones.
- A flip requires the new FVG to overlap the currently visible zone, and the flipped zone keeps only the overlapping part; zones tighten as they flip.
- A retest requires price to leave the zone first. Consecutive candles inside the zone count as one visit.
- Candles around daily and weekly session breaks are excluded from gap detection so overnight gaps don't create false patterns.
- Internal drawing limits keep the script within PulseWire's object budget; on extremely gap-dense charts the oldest zones are released first.
UNIQUENESS:
Most FVG tools draw every gap and leave the trader to determine which ones matter; inversion (IFVG) tools go one step further and record a single change of direction. FVG Crossfire does not draw ordinary gaps at all. It uses them purely as inputs and puts only one thing on the chart: the price bands where opposite imbalances have overlapped, and it then tracks the full lifecycle of each contested level. Zones flip an unlimited number of times, each previous state freezes into a left-to-right timeline, the band tightens to the true overlap on every flip, a star counter records the number of transitions, every individual re-entry is flagged with a retest arrow and alert, and the level is only removed when price fully trades through it. The result is not another gap plotter: it is a filtered map of where opposing imbalances keep forming at the same prices, how many transitions each level has recorded, and exactly how tight the contested band has become.
Release Notes
- Update name
- Remove added space
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Access Flux Charts' exclusive indicators: fluxcharts.com/
Join our Discord community:
Join our Discord community:
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Access Flux Charts' exclusive indicators: fluxcharts.com/
Join our Discord community:
Join our Discord community:
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
