OPEN-SOURCE SCRIPT
Liquidity & FVG Engine MTF [Pro]

Liquidity & FVG Engine MTF [Pro]
OVERVIEW
This tool watches price the way a discretionary ICT trader watches it: it keeps track of untouched swing highs and lows across several timeframes at once, flags the moment one of those levels actually gets taken out, and then looks for the Fair Value Gap that tends to show up right after that liquidity grab. Instead of forcing you to flip between chart timeframes to manually mark highs and lows, it does that bookkeeping for you and leaves a clean, readable map of what has been swept, what is still resting, and where price left a gap on its way through.
HOW IT THINKS
Every time a pivot high or low forms on any of the timeframes you enable (1H and 4H by default, with Daily, Weekly and a custom timeframe also available), the script stores it as a pending liquidity level and marks it with a dot. That level stays on the chart, untouched, until price actually interacts with it.
When price takes out a level, the indicator does three things at once. It fades the dot into a swept line so you can see exactly where and when liquidity was taken. It checks the impulse that caused the sweep for a Fair Value Gap, since sweeps and gaps tend to travel together in this kind of price action. And if no gap is found immediately, it keeps watching the next several candles for a reversal gap to form, on the theory that the real move often shows up a few bars after the initial grab, not on the sweep candle itself.
SESSION LIQUIDITY
On top of the swing based levels, the script builds its own Asia and London session ranges directly from the UTC session hours, independent of your broker's timezone or the exchange your chart is set to. The high and low of each session become liquidity levels in their own right, and get swept and reacted to exactly like any swing high or low.
MITIGATED FVGs, EXPLAINED
A gap does not disappear the moment price touches it. What this indicator calls "mitigated" is simply a Fair Value Gap that has been revisited by price after it formed. The box does not vanish when that happens. It turns grey, gets tagged "Mitigated", and is kept on your chart as history rather than being deleted.
The reason that matters is that a mitigated gap is not necessarily a dead gap. Some get tapped once and hold, becoming the base of the next leg. Others get tapped and sliced straight through. Keeping the grey boxes visible for a while lets you scroll back and actually see which behaviour happened at that location, instead of having the evidence erased the instant it stops being "active". You control how many of these grey boxes stay on your chart at once through the history setting, so you can keep as much or as little of that visual record as you want without cluttering the chart forever.
A PRACTICAL WAY TO USE IT
None of this is a signal generator that tells you to buy or sell. It is a map, and the way most people use a map like this is roughly the same three step read every time.
From there, how a person actually structures the trade is personal. Some will look to enter on the first retracement into that fresh gap, treating its edge as an entry zone with a stop beyond the sweep wick. Others prefer to wait for a shift in short term structure after the gap forms before committing, using the gap as confluence rather than as the trigger itself. Either way, the mitigated gap history is useful here too, since it lets you go back and study how price has behaved around similar gaps at similar levels earlier in the session, which is a quick way to build a feel for whether the pair or symbol you're trading tends to respect these zones cleanly or chop through them.
Treat every level and every gap as one piece of evidence, not a standalone signal. The most convincing setups tend to be where a session liquidity sweep, a higher timeframe level, and a fresh FVG all line up in the same place at the same time, rather than any single one of them appearing in isolation.
SETTINGS AT A GLANCE
ALERTS
Two alert conditions are built in. One fires the moment any liquidity level is swept. The other fires when a Fair Value Gap forms following a sweep. Both can be wired into TradingView's standard alert system so you do not have to watch the chart tick by tick.
A NOTE ON RISK
OVERVIEW
This tool watches price the way a discretionary ICT trader watches it: it keeps track of untouched swing highs and lows across several timeframes at once, flags the moment one of those levels actually gets taken out, and then looks for the Fair Value Gap that tends to show up right after that liquidity grab. Instead of forcing you to flip between chart timeframes to manually mark highs and lows, it does that bookkeeping for you and leaves a clean, readable map of what has been swept, what is still resting, and where price left a gap on its way through.
HOW IT THINKS
Every time a pivot high or low forms on any of the timeframes you enable (1H and 4H by default, with Daily, Weekly and a custom timeframe also available), the script stores it as a pending liquidity level and marks it with a dot. That level stays on the chart, untouched, until price actually interacts with it.
When price takes out a level, the indicator does three things at once. It fades the dot into a swept line so you can see exactly where and when liquidity was taken. It checks the impulse that caused the sweep for a Fair Value Gap, since sweeps and gaps tend to travel together in this kind of price action. And if no gap is found immediately, it keeps watching the next several candles for a reversal gap to form, on the theory that the real move often shows up a few bars after the initial grab, not on the sweep candle itself.
SESSION LIQUIDITY
On top of the swing based levels, the script builds its own Asia and London session ranges directly from the UTC session hours, independent of your broker's timezone or the exchange your chart is set to. The high and low of each session become liquidity levels in their own right, and get swept and reacted to exactly like any swing high or low.
MITIGATED FVGs, EXPLAINED
A gap does not disappear the moment price touches it. What this indicator calls "mitigated" is simply a Fair Value Gap that has been revisited by price after it formed. The box does not vanish when that happens. It turns grey, gets tagged "Mitigated", and is kept on your chart as history rather than being deleted.
The reason that matters is that a mitigated gap is not necessarily a dead gap. Some get tapped once and hold, becoming the base of the next leg. Others get tapped and sliced straight through. Keeping the grey boxes visible for a while lets you scroll back and actually see which behaviour happened at that location, instead of having the evidence erased the instant it stops being "active". You control how many of these grey boxes stay on your chart at once through the history setting, so you can keep as much or as little of that visual record as you want without cluttering the chart forever.
A PRACTICAL WAY TO USE IT
None of this is a signal generator that tells you to buy or sell. It is a map, and the way most people use a map like this is roughly the same three step read every time.
- Note which liquidity level is still sitting untouched nearby, on whichever timeframe you trust for bias. An untouched high or low is a magnet until it isn't.
- Wait for the sweep itself. A wick that pierces the level and a close that snaps back inside it is a very different event from a candle that just closes through and keeps going, so pay attention to which sweep mode you have configured and what actually happened on that candle.
- Look at what the indicator draws immediately after the sweep. A fresh, opposite direction Fair Value Gap appearing in the following bars is the classic follow through many ICT style traders look for as confirmation that the sweep was a genuine reversal event rather than the start of a continuation.
From there, how a person actually structures the trade is personal. Some will look to enter on the first retracement into that fresh gap, treating its edge as an entry zone with a stop beyond the sweep wick. Others prefer to wait for a shift in short term structure after the gap forms before committing, using the gap as confluence rather than as the trigger itself. Either way, the mitigated gap history is useful here too, since it lets you go back and study how price has behaved around similar gaps at similar levels earlier in the session, which is a quick way to build a feel for whether the pair or symbol you're trading tends to respect these zones cleanly or chop through them.
Treat every level and every gap as one piece of evidence, not a standalone signal. The most convincing setups tend to be where a session liquidity sweep, a higher timeframe level, and a fresh FVG all line up in the same place at the same time, rather than any single one of them appearing in isolation.
SETTINGS AT A GLANCE
- Pivot Left and Right Bars control how sensitive swing detection is. Lower values catch more, smaller swings.
- Merge Tolerance lets nearby levels from different timeframes combine into a single label instead of stacking duplicate dots on top of each other.
- Sweep Detection Mode switches between a strict wick and close ICT style sweep, or a looser touch based definition.
- Up to five independent timeframes can be enabled for swing liquidity, each with its own colour and label.
- Asia and London session ranges can be toggled on or off independently, with their own colours.
- The FVG engine has its own ATR based minimum and maximum size filters, so you can exclude gaps that are too small to matter or too large to be realistic entries.
- Visual and memory settings let you cap how many active levels, historical swept lines, and mitigated FVGs stay on the chart at once, keeping things readable on lower timeframes over long sessions.
ALERTS
Two alert conditions are built in. One fires the moment any liquidity level is swept. The other fires when a Fair Value Gap forms following a sweep. Both can be wired into TradingView's standard alert system so you do not have to watch the chart tick by tick.
A NOTE ON RISK
This script is a decision support tool, not a trading signal or a promise of future performance. It plots historical and current price behaviour so you can build and test your own approach around it. Always use proper risk management and position sizing, and treat any strategy built around it as something to validate on your own before trading it with real capital. Nothing in this description or in the indicator constitutes financial advice.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。