OPEN-SOURCE SCRIPT
Aktualisiert 1st Presented Fvg's [M1D]

OVERVIEW
1st Presented Fvg's (M1D) isolates the very first Fair Value Gap each hourly window prints —
the one everything else in that hour reacts to — and tracks its full lifecycle: does it
hold, does it fail, does it invert, and does the inversion validate on a retest. Instead of
marking every FVG on the chart, it keeps only the one gap the model cares about per hour and
reports what happened to it.
It is a single-timeframe, event-tracking tool rather than a signal generator. It tags one
gap per hourly window, runs a strict hold / fail / invert / validate state machine on it, and
rolls a running Hold %, Inverted count and Valid IFVG count into a small dashboard so you can
see how the current session is actually behaving.
Detection and every state transition evaluate on confirmed bars only — nothing is decided
intrabar, and the chart requires an intraday timeframe of 60 minutes or less.
WHAT IT PLOTS
- 1st Presented FVG zone — a coloured box drawn from the exact three-candle gap, labelled
with its hourly window (e.g. "1st - 2pm") and an optional macro-window time suffix (e.g.
"1st - 2pm 1:50-2:10"). Zone colour cycles through your chosen palette by hour.
- NY Open tag — inside the 9:30-10:00 NY session specifically, the gap is labelled "1st -
NY Open" instead of the generic hour label, and only appears once price has swept a recent
pivot high or low first (see Key Definitions below).
- Inversion (IFVG) tag — a gap that held, then closed through, turns orange and is
relabelled IFVG.
- Valid IFVG tag (✔) — once an inverted gap is retested (price trades back into it), it
gains a check mark and a brighter fill, so a live, usable IFVG stands out from one still
forming.
- Failed gap (optional) — a gap that closed through without ever holding can be kept on
chart dimmed for context, or deleted outright; either way it is counted in the stats.
- Dashboard (M1D) — a small monospace table showing the current session, current time, and
a Today vs. Total read of gaps tagged, gaps held, Hold %, gaps inverted, and validated
IFVGs.
KEY DEFINITIONS
- Held — the point at which a 1st Presented FVG is considered to have defended its zone,
rather than just being tagged. Governed by the Hold Definition setting below.
- Reject & Close Away (default Hold Definition) — price must trade into the gap and then
close back outside its proximal edge before it counts as held. A tap that closes through
without that rejection is scored as a fail, not a hold — so Hold % reflects confirmed
rejections, not every incidental touch.
- Touch & Hold (alternate Hold Definition) — any trade into the gap that doesn't close
through it counts as held immediately, no rejection required.
- Inversion (IFVG) — a gap that held first, then later closed through it. This sequence is
mandatory: a gap that runs straight through without ever holding is a fail, never an
inversion.
- Valid IFVG — an inverted gap that price has subsequently traded back into.
- Hold % — held gaps ÷ gaps tagged, shown separately for Today and All-Time.
- NY Open liquidity sweep — inside the 9:30-10:00 New York session, the 1st Presented tag
runs on its own daily slot, separate from the normal hourly one, so an earlier random gap
in the same clock hour can't use up the slot before the open range even happens. That slot
only fills once price has swept a recent confirmed swing pivot — a low for a bullish gap,
a high for a bearish gap — immediately before the gap forms, so the tag reflects a genuine
liquidity grab rather than the first random three-candle gap after 9:30.
HOW TO USE IT
Reading the state of the current gap
- A live-coloured zone with no orange means the 1st Presented FVG is still fresh or holding
— treat it as an active zone.
- Orange means it has inverted — price closed through it after holding, so it now has the
opposite role.
- Orange with a ✔ means the inversion has been retested and validated — the strongest read
of the three, since price has both flipped the gap and come back to confirm it.
- A dimmed zone (if you keep failed gaps) means it closed through without ever holding —
context only, not a level to lean on.
Reading the dashboard
- Hold % (Today vs. All-Time) tells you how respected first-hour gaps have been — a low
reading suggests today's imbalances are being run through rather than defended.
- Inverted vs. Valid IFVG counts show how often a failed gap actually resolves into a
confirmed continuation level (✔) rather than just failing outright.
- Session tells you which killzone you're in without leaving the chart.
Choosing your settings
- Use Reject & Close Away when you only want gaps that show a confirmed rejection —
Touch & Hold is looser and counts the first touch, useful for comparing how often price
even reaches the gap versus how often it truly holds.
- Switch Mode to First Of Each Direction if you want to track a bullish and a bearish 1st
gap side-by-side within the same hour, instead of only the first of either.
- Turn on the Displacement Filter if you want the tag to skip small, low-conviction gaps in
favour of the next one that clears your ATR multiple.
- Leave NY Open: Require Liquidity Sweep on if you specifically want the opening-range gap
isolated from the generic hourly noise; adjust Pivot Lookback to make the swing-pivot
reference tighter (fewer bars, more sensitive) or wider (more bars, more established swings).
SETTINGS
- Detection — 1st FVG Mode (First Of Either / First Of Each Direction), Hourly Window
Timezone, Displacement Filter (ATR × multiple), Restrict To Time Window, NY Open (9:30-
10:00): Require Liquidity Sweep, Pivot Lookback.
- Inversion (IFVG) — Track Inversions toggle, Hold Definition (Touch & Hold / Reject &
Close Away).
- Labels — Show Labels, Label Text prefix, Show Macro Window Time, Label Size, Label
Colour.
- Colours — Colours In Cycle (2 or 3), the cycle colours, Inversion Colour, Zone
Transparency.
- Display — Gap Lifetime (Until Invalidated / End Of Hour / End Of Day), Keep Failed Gaps
(Dimmed), Max Gaps On Chart.
- Stats Table — Show Stats Table, Position, Text Size.
This is a decision-support and context tool for discretionary ICT trading. It does not
generate buy or sell signals and does not place trades. This is not financial advice, and no
market's past behaviour is indicative of future results.
1st Presented Fvg's (M1D) isolates the very first Fair Value Gap each hourly window prints —
the one everything else in that hour reacts to — and tracks its full lifecycle: does it
hold, does it fail, does it invert, and does the inversion validate on a retest. Instead of
marking every FVG on the chart, it keeps only the one gap the model cares about per hour and
reports what happened to it.
It is a single-timeframe, event-tracking tool rather than a signal generator. It tags one
gap per hourly window, runs a strict hold / fail / invert / validate state machine on it, and
rolls a running Hold %, Inverted count and Valid IFVG count into a small dashboard so you can
see how the current session is actually behaving.
Detection and every state transition evaluate on confirmed bars only — nothing is decided
intrabar, and the chart requires an intraday timeframe of 60 minutes or less.
WHAT IT PLOTS
- 1st Presented FVG zone — a coloured box drawn from the exact three-candle gap, labelled
with its hourly window (e.g. "1st - 2pm") and an optional macro-window time suffix (e.g.
"1st - 2pm 1:50-2:10"). Zone colour cycles through your chosen palette by hour.
- NY Open tag — inside the 9:30-10:00 NY session specifically, the gap is labelled "1st -
NY Open" instead of the generic hour label, and only appears once price has swept a recent
pivot high or low first (see Key Definitions below).
- Inversion (IFVG) tag — a gap that held, then closed through, turns orange and is
relabelled IFVG.
- Valid IFVG tag (✔) — once an inverted gap is retested (price trades back into it), it
gains a check mark and a brighter fill, so a live, usable IFVG stands out from one still
forming.
- Failed gap (optional) — a gap that closed through without ever holding can be kept on
chart dimmed for context, or deleted outright; either way it is counted in the stats.
- Dashboard (M1D) — a small monospace table showing the current session, current time, and
a Today vs. Total read of gaps tagged, gaps held, Hold %, gaps inverted, and validated
IFVGs.
KEY DEFINITIONS
- Held — the point at which a 1st Presented FVG is considered to have defended its zone,
rather than just being tagged. Governed by the Hold Definition setting below.
- Reject & Close Away (default Hold Definition) — price must trade into the gap and then
close back outside its proximal edge before it counts as held. A tap that closes through
without that rejection is scored as a fail, not a hold — so Hold % reflects confirmed
rejections, not every incidental touch.
- Touch & Hold (alternate Hold Definition) — any trade into the gap that doesn't close
through it counts as held immediately, no rejection required.
- Inversion (IFVG) — a gap that held first, then later closed through it. This sequence is
mandatory: a gap that runs straight through without ever holding is a fail, never an
inversion.
- Valid IFVG — an inverted gap that price has subsequently traded back into.
- Hold % — held gaps ÷ gaps tagged, shown separately for Today and All-Time.
- NY Open liquidity sweep — inside the 9:30-10:00 New York session, the 1st Presented tag
runs on its own daily slot, separate from the normal hourly one, so an earlier random gap
in the same clock hour can't use up the slot before the open range even happens. That slot
only fills once price has swept a recent confirmed swing pivot — a low for a bullish gap,
a high for a bearish gap — immediately before the gap forms, so the tag reflects a genuine
liquidity grab rather than the first random three-candle gap after 9:30.
HOW TO USE IT
Reading the state of the current gap
- A live-coloured zone with no orange means the 1st Presented FVG is still fresh or holding
— treat it as an active zone.
- Orange means it has inverted — price closed through it after holding, so it now has the
opposite role.
- Orange with a ✔ means the inversion has been retested and validated — the strongest read
of the three, since price has both flipped the gap and come back to confirm it.
- A dimmed zone (if you keep failed gaps) means it closed through without ever holding —
context only, not a level to lean on.
Reading the dashboard
- Hold % (Today vs. All-Time) tells you how respected first-hour gaps have been — a low
reading suggests today's imbalances are being run through rather than defended.
- Inverted vs. Valid IFVG counts show how often a failed gap actually resolves into a
confirmed continuation level (✔) rather than just failing outright.
- Session tells you which killzone you're in without leaving the chart.
Choosing your settings
- Use Reject & Close Away when you only want gaps that show a confirmed rejection —
Touch & Hold is looser and counts the first touch, useful for comparing how often price
even reaches the gap versus how often it truly holds.
- Switch Mode to First Of Each Direction if you want to track a bullish and a bearish 1st
gap side-by-side within the same hour, instead of only the first of either.
- Turn on the Displacement Filter if you want the tag to skip small, low-conviction gaps in
favour of the next one that clears your ATR multiple.
- Leave NY Open: Require Liquidity Sweep on if you specifically want the opening-range gap
isolated from the generic hourly noise; adjust Pivot Lookback to make the swing-pivot
reference tighter (fewer bars, more sensitive) or wider (more bars, more established swings).
SETTINGS
- Detection — 1st FVG Mode (First Of Either / First Of Each Direction), Hourly Window
Timezone, Displacement Filter (ATR × multiple), Restrict To Time Window, NY Open (9:30-
10:00): Require Liquidity Sweep, Pivot Lookback.
- Inversion (IFVG) — Track Inversions toggle, Hold Definition (Touch & Hold / Reject &
Close Away).
- Labels — Show Labels, Label Text prefix, Show Macro Window Time, Label Size, Label
Colour.
- Colours — Colours In Cycle (2 or 3), the cycle colours, Inversion Colour, Zone
Transparency.
- Display — Gap Lifetime (Until Invalidated / End Of Hour / End Of Day), Keep Failed Gaps
(Dimmed), Max Gaps On Chart.
- Stats Table — Show Stats Table, Position, Text Size.
This is a decision-support and context tool for discretionary ICT trading. It does not
generate buy or sell signals and does not place trades. This is not financial advice, and no
market's past behaviour is indicative of future results.
Versionshinweise
Cosmetic Touchups AddedOpen-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.