OPEN-SOURCE SCRIPT
Higher Timeframe Levels Toolkit

Combines HTF EMA context, key daily/weekly levels, ADR, FVG/BPR (IFVG) zones, and structural swing/fib tracking in one indicator — terminology drawn from ICT/Smart Money Concepts, built for traders who read multiple timeframes without switching charts or stacking scripts. Every module below can be shown, hidden, and styled independently.
📈 Higher-Timeframe EMAs (5m / 10m / 15m / 1h)
Up to three EMAs per timeframe, each with its own length, color, and toggle.
Historical Path plots the true HTF-calculated EMA through every bar of history — the real value, not a lower-timeframe approximation — so it steps at each HTF close exactly as it would look on that timeframe.
Smooth HTF EMAs replaces the stepped line with a provisional EMA that glides continuously between HTF closes while still landing on the exact true value at every close — no approximation error, just a cleaner line to read.
Independent line width, style, and right-extension per timeframe group.
🗓️ Previous Day & Weekly OHLC
Previous day Open/High/Low/Close and Weekly Open/High/Low/(previous) Close, each individually toggleable with its own color. Line width, style, and extension (Right / Left / Both / None) are configurable per group.
📏 Average Daily Range (ADR)
Plots an ADR band centered on the New York session open (9:30 AM ET, configurable timezone), built from a configurable lookback of prior daily ranges — a quick reference for how much of the day's typical range is left to play with.
🔲 FVG & BPR / IFVG Engine (5m / 15m / 1h)
Independent Fair Value Gap detection on each timeframe, with:
Compact mode — boxes float at a fixed width on the chart's right edge instead of stretching back to their formation point, keeping price action clean
High-Probability filter — gates detection to FVGs above a minimum tick size where the middle candle's volume exceeds the first candle's, for a stricter signal
Balanced quotas — bullish and bearish zones each get their own max-count limit per timeframe, so a one-sided trend can't crowd out the opposite side's zones
BPR (IFVG) detection — automatically merges a new FVG into a Balanced Price Range when it overlaps an opposing FVG within a configurable candle window
Mitigation tracking — zones are removed once price fills a configurable percentage of them, on either a wick or close basis
Full color, transparency, and border control, split by timeframe and direction
🎯 Swing Structure, Equilibrium & Fib Levels (5m / 15m / 1h)
Structural swing highs and lows — not a rolling highest/lowest window — confirmed only on closed candles and held until genuinely superseded, so unswept structure doesn't quietly age out from underneath you.
50% (EQ) and 0.786 Fib levels span the current swing range, with the anchor direction flipping automatically to track the more recent extreme
Incoming HH & LL shows the next unswept liquidity level beyond the current swing on both sides at once, with a minimum-gap filter so it always points at a meaningfully distinct level rather than a near-duplicate adjacent pivot
From Candle line mode anchors each level's line at the exact chart-timeframe candle that created it and stretches it precisely to its label — full visual provenance for every level on screen
🏷️ Label System
Show Price on Labels appends the exact price to every level label
De-stacking automatically shifts overlapping labels sideways so nothing gets hidden behind another
On-Line Labels is an alternate style per group: larger text, no background, sitting directly on its line instead of floating beside it
All higher-timeframe data is pulled through non-repainting request.security calls with no lookahead, and every level updates only once its underlying candle is confirmed. This is a visual context and structure tool, not a signal generator — it doesn't predict direction or issue trade alerts. Use it alongside your own analysis and risk management.
📈 Higher-Timeframe EMAs (5m / 10m / 15m / 1h)
Up to three EMAs per timeframe, each with its own length, color, and toggle.
Historical Path plots the true HTF-calculated EMA through every bar of history — the real value, not a lower-timeframe approximation — so it steps at each HTF close exactly as it would look on that timeframe.
Smooth HTF EMAs replaces the stepped line with a provisional EMA that glides continuously between HTF closes while still landing on the exact true value at every close — no approximation error, just a cleaner line to read.
Independent line width, style, and right-extension per timeframe group.
🗓️ Previous Day & Weekly OHLC
Previous day Open/High/Low/Close and Weekly Open/High/Low/(previous) Close, each individually toggleable with its own color. Line width, style, and extension (Right / Left / Both / None) are configurable per group.
📏 Average Daily Range (ADR)
Plots an ADR band centered on the New York session open (9:30 AM ET, configurable timezone), built from a configurable lookback of prior daily ranges — a quick reference for how much of the day's typical range is left to play with.
🔲 FVG & BPR / IFVG Engine (5m / 15m / 1h)
Independent Fair Value Gap detection on each timeframe, with:
Compact mode — boxes float at a fixed width on the chart's right edge instead of stretching back to their formation point, keeping price action clean
High-Probability filter — gates detection to FVGs above a minimum tick size where the middle candle's volume exceeds the first candle's, for a stricter signal
Balanced quotas — bullish and bearish zones each get their own max-count limit per timeframe, so a one-sided trend can't crowd out the opposite side's zones
BPR (IFVG) detection — automatically merges a new FVG into a Balanced Price Range when it overlaps an opposing FVG within a configurable candle window
Mitigation tracking — zones are removed once price fills a configurable percentage of them, on either a wick or close basis
Full color, transparency, and border control, split by timeframe and direction
🎯 Swing Structure, Equilibrium & Fib Levels (5m / 15m / 1h)
Structural swing highs and lows — not a rolling highest/lowest window — confirmed only on closed candles and held until genuinely superseded, so unswept structure doesn't quietly age out from underneath you.
50% (EQ) and 0.786 Fib levels span the current swing range, with the anchor direction flipping automatically to track the more recent extreme
Incoming HH & LL shows the next unswept liquidity level beyond the current swing on both sides at once, with a minimum-gap filter so it always points at a meaningfully distinct level rather than a near-duplicate adjacent pivot
From Candle line mode anchors each level's line at the exact chart-timeframe candle that created it and stretches it precisely to its label — full visual provenance for every level on screen
🏷️ Label System
Show Price on Labels appends the exact price to every level label
De-stacking automatically shifts overlapping labels sideways so nothing gets hidden behind another
On-Line Labels is an alternate style per group: larger text, no background, sitting directly on its line instead of floating beside it
All higher-timeframe data is pulled through non-repainting request.security calls with no lookahead, and every level updates only once its underlying candle is confirmed. This is a visual context and structure tool, not a signal generator — it doesn't predict direction or issue trade alerts. Use it alongside your own analysis and risk management.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.