Inversion FVG Multi-Timeframe draws fair value gaps and their inversions on MT4 and MT5,
tracking nine timeframes at once on a single chart. The part worth explaining is what it
refuses to draw.

The middle candle has to close past the gap
Most FVG code tests one thing: is the low of candle 3 above the high of candle 1? If yes,
there's a gap, draw a box. That's the textbook definition, and it's also why your chart
fills up with boxes that mean nothing. Three candles can drift apart on almost no
movement and still satisfy it.
This one adds a second condition. The middle candle must also close beyond the far
side of the gap:
bullish: low[i] > high[i-2] AND close[i-1] > high[i-2]
bearish: high[i] < low[i-2] AND close[i-1] < low[i-2]
So the gap needs a body behind it, not three candles that happened to separate. You get
noticeably fewer boxes. The ones you get were made by something.
There's an ATR filter on top. The gap has to be wider than ATR times your multiplier,
default 1x, on a fixed 14-period ATR that isn't exposed as an input. If a quiet pair
gives you nothing, that multiplier is the dial to turn down.
FVG, then iFVG
The two halves work like this.
A gap forms and gets a box, aqua for bullish, orange-red for bearish. While it stands,
price can reach into it โ the box picks up an (m) for mitigated and stays where it is.
Then price closes clean through to the other side. The gap is finished as a gap, and the
indicator makes a second box out of it, anchored at the bar of the break, in green or
purple. That's the inversion, and its direction is flipped: a bullish gap that gets
closed through becomes a bearish zone.
| Colour | Meaning | |
|---|---|---|
| FVG up / down | aqua / orange-red | the gap itself, still unbroken |
| iFVG up / down | green / purple | what the gap became after price closed through |
(m) suffix |
โ | price has reached into that zone since |
The two boxes sit side by side rather than on top of each other: the gap box ends where
the inversion begins, so you can see the handover on the chart. Both carry the timeframe
in their label, so an H4 zone on your M15 chart says H4.
Nine timeframes, one panel
The panel starts with your chart's own timeframe ticked, and that's what you see first.
Tick another and its zones appear alongside, labelled with their own timeframe. Untick it
and they go away.

Show HTF only is on by default and drops any timeframe below the one your chart is on,
which is why ticking M15 on an H1 chart does nothing until you turn it off. That's the
right default โ the reason to run a multi-timeframe tool is the frame above yours โ but
it's the thing people get stuck on.
A separate set of Use TF * inputs decides what gets calculated at all. MN1 is off there
by default; the other eight are on.
What nine timeframes cost
Each timeframe keeps its own cache of the last 600 bars and its own two lists of zones,
capped at 20 each way. The cap isn't an input. So the indicator tracks at most 360 zones
and the oldest fall off the back.
That's plenty in practice. Worth knowing because a zone that scrolled off is gone rather
than hidden, and reloading won't bring it back either, since the cache only reaches 600
bars deep.
Mitigation, three ways
Mitigation Method decides when an inversion zone counts as touched:
- Close โ the bar closes inside the zone.
- Wick โ the wick reaches in. Fires earliest and most often.
- AVG โ the bar closes past a percentage of the way through, set by
Percentage value if mitigation method is avg, default 50.
Repainting, honestly
The calculation loop stops one bar short of the current one, on every timeframe:
for(int i = start; i < sop - 1; i++)
A zone is built from closed bars and never moves afterwards. Scroll back and what you see
is what it would have shown you at the time.
The one thing that moves is the right edge of a live box, which stretches to the current
time so the zone stays visible as price walks along. That's drawing, not recalculation.
Nothing about where a box sits, or whether it's mitigated, depends on the forming bar.
Alerts follow the same rule: they fire on the close of a bar on that timeframe, so an H4
alert arrives at the H4 close and not before.
MT4 and MT5 draw the same thing
Both builds share the logic and the defaults, and the panel behaves identically. Here's
the MT4 side of the same market, for comparison with the H4 chart at the top.

What it doesn't do
- No indicator buffers. Everything is chart objects. You can't read it from an EA
withiCustom, and nothing shows in the Data Window. - No arrows, no entries, no stop levels. It marks zones. What you do at one is yours.
- ATR length and the 20-zone cap aren't inputs. Fixed at 14 and 20.
- The oldest unbroken gap stays on screen forever, stretching from wherever it formed
to now. Correct, and it does make the left edge of a busy chart untidy.
Alerts
Notification type covers popup, email, push and Telegram. Telegram needs the bot token,
the channel id and the filename it writes through, one file per symbol if you run it on
several charts at once.
Messages name the timeframe and the event: "at H4: Bullish FVG filled (Bearish iFVG
created)". Four events fire per direction โ gap mitigated, gap filled and inverted,
inversion mitigated โ and only for timeframes you have ticked. On a busy chart with
everything on this can talk a lot, so start with two.
What changed in 1.06
Four fixes, all of them things you'd have run into.
AVG mitigation was lopsided. One of the two directions tested for a close below the
zone instead of past the halfway line, so bullish and bearish zones marked themselves
mitigated at completely different depths. They match now.
The BISI and SIBI labels never appeared on the gaps they describe. Both were checking
for candle bodies pointing the opposite way to the imbalance they name.
Nothing was drawn until you ticked a panel button, including on the timeframe you were
looking at, and since that button also gates alerts the indicator was silent as well.
Your chart's timeframe is ticked from the start now.
On a symbol whose history hadn't loaded yet, it drew nothing at all and never
recovered. The price cache used a sleep to wait for history, which a MetaTrader indicator
isn't allowed to do; the call ended the indicator part-way through startup, after the
terminal had already logged it as loaded. It now returns without waiting and refills the
cache on later ticks until the whole window is there.
Questions you'll have
Does Inversion FVG Multi-Timeframe repaint? No, on closed bars. Zones are built from
bars that have already closed and never move afterwards. The right edge of a live box
extends to the current time, which is drawing rather than recalculation.
Why is my chart empty? On 1.06 it shouldn't be โ your chart's own timeframe is ticked
on the panel at startup. If a timeframe you tick shows nothing, it's probably below your
chart's, so turn off Show HTF only.
MT4? Both platforms are included, one download each. Same logic, same defaults, same
version number.
What's the difference between an FVG and an iFVG here? The FVG is the gap while it
still stands. The iFVG is the box made after price closes clean through it, anchored at
the break and flipped in direction, on the idea that a level which failed one way tends
to get defended the other.
Can I read it from an Expert Advisor? Not with iCustom. It writes chart objects, not
indicator buffers, so there's nothing for an EA to copy.
Inversion FVG Multi-Timeframe best settings for scalping? Two timeframes rather than
nine, the ATR multiplier around 0.5 to 0.7 so M5 and M15 gaps qualify, and mitigation on
Wick so you hear about a touch rather than a close. A starting point, not a
recommendation.
Why do I get fewer gaps than my other FVG indicator? The extra close condition on the
middle candle, plus the ATR filter. Both are doing what they're there for. Drop the ATR
multiplier first if you want more.
Both platform builds are included with a subscription. This listing makes no
profitability claim: the indicator marks zones on a chart, and nothing about a zone tells
you what a trade will do. You won't find a win rate table here, and I'd be careful with
any indicator listing that has one.