OPEN-SOURCE SCRIPT
更新済

HTF FVG Tracker (M1D)

1 396
HTF FVG Tracker
Keeps a running ledger of the hourly, four-hour and eight-hour fair value gaps on any intraday chart. Each gap is drawn the moment its candle set completes on its own timeframe, and each zone runs its own timeframe's length forward and then stops — so the day reads left to right as a clean staircase of imbalances, hour by hour, instead of a pile of boxes all stretching to the live candle at once.

It is a marking tool, not a signal tool. It draws where higher-timeframe imbalances printed and what has happened to them since, and leaves the read to you.

The zones

A bullish gap (BISI) is a candle whose low sits above the high two candles back; a bearish gap (SIBI) is a candle whose high sits under the low two candles back. Each is measured on the tracked timeframe's own candles — H1, H4 and H8, each with its own switch — and drawn from its displacement candle forward.

Every zone carries its name inside the box at the right edge, centred on the zone's midline: H1+ for a bullish hourly gap, H4- for a bearish four-hour one. A setting adds the displacement candle's New York hour, so a four-hour gap reads H4+ 2PM. The fill colour states direction; the border is a solid line on every zone so the edges stay readable where timeframes overlap.

The window

By default a zone extends exactly its own timeframe past its formation: an hourly gap gets one more hour, a four-hour gap four hours, an eight-hour gap eight — then its right edge is fixed. How many of its own candles it runs is a setting, and a second mode keeps the newest zone per timeframe extending until the next zone on that timeframe prints instead.

Either way, if a new gap prints while an earlier zone on the same timeframe is still open, the earlier zone is cut at the new zone's left edge. Nothing overlaps raggedly, and every box's width tells you how long it was the live imbalance.

Volume imbalance and suspension blocks

A fair value gap measured wick to wick understates a fast leg. Where the candle bodies also gap on either seam of the displacement candle while the wicks still bridge it, that volume imbalance is part of the same region, and the zone absorbs it — the edge extends from the wick to the body it should have reached. Each seam is tested on its own.

A suspension block is three same-direction candles whose bodies gap at both seams with no wick gap anywhere — a span price never traded back through. It is drawn as its own zone, from the first candle's close to the last candle's open, tagged SB.

A body gap across a session or weekend break is a calendar artefact, not an imbalance, so any seam spanning more than one candle's worth of time is excluded from both rules. Absorption and suspension blocks each have their own switch.

Fills

A fill is a candle body closing through the far edge of the zone. A wick into the zone is a touch, and a touch never counts. By default a fill inside the zone's window shortens the box to the fill bar but keeps it on the chart — the ledger is the point, and a filled gap is still part of the day's record. You can instead leave a fill unmarked, or delete the zone outright. Zones older than a set number of days are removed either way.

Consequent encroachment

Each zone can carry its midpoint — the consequent encroachment of that gap — as a dotted line through the box. One switch.

Method & repainting

Each timeframe is read with a single higher-timeframe request using confirmed candles only — offset by one bar with lookahead, the standard non-repainting form. Detection is gated to the chart bar's close, so a zone appears on the first closed chart bar after its higher-timeframe candle completes, and nothing appears mid-bar and then withdraws.

In the default mode a zone's full window is drawn as soon as the zone prints, so its right edge can sit a little ahead of the live candle until the window closes. In the until-the-next-FVG mode the newest zone per timeframe extends rightward as bars print — that is the box tracking the present, not its history changing.

The chart timeframe has to be at or below the timeframe being tracked. On a 4-hour chart you get the H4 and H8 ledgers only, and above H8 the script says so on the chart rather than drawing nothing.

Alerts

Three, one per timeframe, firing on bar close when a new zone prints on that timeframe — gap or suspension block.

What it will not do

It places no entries, exits, stops or targets, draws no bias and grades no gap. It does not decide which imbalance matters — that is a judgement about context this script does not have. A quiet day showing only a handful of zones is the tool working, not failing.

Settings

The three timeframe switches and days of history; the zone extension mode and its candle count; volume imbalance absorption, suspension blocks, and the fill behaviour; bullish, bearish and border colours with the zone fill transparency; the consequent encroachment line, the New York hour tag, and label text size.

Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results.
リリースノート
Daily gaps, zones that run until mitigated, body-coverage mitigation, and quadrants.
A fourth timeframe joins the ledger: daily gaps and suspension blocks, tagged D, with their own switch and alert.

The newest daily zone is pinned: it stays on the chart whatever its age and ignores the daily cap, and only a newer daily replaces it, so the chart is never without the one imbalance that outranks the rest (one switch).
Every zone now starts at the first candle of its three, so the box touches the wick that made the gap instead of floating a few bars ahead of it, and a daily gap shorter than a set minimum — 30 points by default, in the chart's price units — is not drawn. Zones now extend bar by bar until price mitigates them instead of stopping a fixed number of candles out, capped per timeframe so an untouched gap still retires — one day for H1, three for H4 and H8, one week for D, all settings; the own-timeframe window and the until-the-next-FVG chase are kept as options. Mitigation is now judged on the body of a closed fifteen-minute candle (the timeframe is a setting): the body must cover at least 55% of the zone's height, so a one-minute close deep in the gap that is only the wick of its fifteen-minute candle no longer counts, and the candle that formed the gap can never fill it. The old close-through-the-far-edge test remains available.
Each zone also carries dotted black lines at a quarter and three quarters of its height, no labels, dividing it into quadrants with the midline; one switch.
The per-timeframe zone store is now 40 zones so every zone keeps all three of its lines under the platform's line limit.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。