OPEN-SOURCE SCRIPT

HTF Context Overlay [EmpArchitect]

591
█ OVERVIEW

HTF Context Overlay draws clean higher-timeframe reference levels directly on your chart: previous day/week/month highs and lows, daily open, midnight open, and key session opens.

It is designed as a passive context layer for ICT, SMC, and price-action workflows.

No signals.
No entries.
No stop losses.
No take profits.
No predictions.

This tool answers one simple question:

Where is price trading relative to the important higher-timeframe reference levels?

█ LEVELS INCLUDED

Daily

PDH / PDL
Daily Open
Midnight Open
Previous Day Midpoint optional

Weekly

PWH / PWL
Previous Week Midpoint optional

Monthly

PMH / PML
Previous Month Midpoint optional

Sessions

London Open
New York Open
Asia Open optional

Midpoints are off by default to keep the chart clean.

█ VISUAL HIERARCHY

The overlay uses a simple visual system:

Amber = high-side levels: PDH / PWH / PMH
Teal = low-side levels: PDL / PWL / PML
Gray = opens: Daily Open, Midnight Open, session opens
Muted gray = optional midpoints

Line style encodes timeframe:

Daily = solid
Weekly = dashed
Monthly = dotted / more subtle
Opens = thinner contextual lines

The color language is aligned with Smart Liquidity Map [EmpArchitect], but the purpose is different:

Smart Liquidity Map shows where liquidity sits.
HTF Context Overlay shows the reference levels that frame price.

█ DASHBOARD

The top-right dashboard summarizes current context without adding chart clutter.

It can show:

Current session: Asia / London / New York / Off
Daily range state: Above PDH / Inside PD / Below PDL
Weekly range state
Monthly range state in Expanded mode
Nearest level above price
Nearest level below price
Price position versus active opens: DO / MO / LO / NY

Dashboard modes:

Compact — session and nearest levels
Standard — default context view
Expanded — adds monthly range state

█ OPEN LABEL MODE

Open labels can be controlled separately from the open lines.

Modes:

Smart — default; shows Daily Open, Midnight Open, and the current active session open
All — shows all open labels
Main Only — shows only Daily Open and Midnight Open
Off — hides open labels while keeping the lines visible

This keeps the chart readable on lower timeframes.

█ MIDNIGHT OPEN

The Midnight Open is timezone-aware.

Options:

New York
UTC
London
Exchange

New York is the default because it is commonly used in ICT-style workflows.

█ SESSION OPENS

London and New York opens are enabled by default.
Asia open is optional.

Session reference hours are configurable in UTC.

Session and midnight opens are most accurate on intraday charts, especially 1H and below. On higher timeframes, the open reflects the first bar that captures the session boundary.

█ NON-REPAINTING LOGIC

Previous day, week, and month levels are based on completed periods.

Session and open levels are set when the relevant session/day begins.

The script does not generate trade signals or predictive conditions.

█ BEST USE

Best used on:

5M
15M
1H
4H

Useful for crypto, forex, indices, commodities, and other liquid markets.

█ PAIRS WITH

Pairs well with:

Smart Liquidity Map [EmpArchitect]
Trap Zones
CISD tools
Any discretionary ICT / SMC / price-action workflow

Use HTF Context Overlay as the clean reference framework beneath more active liquidity or execution tools.

█ NOTES

Pine Script v6
Open-source
Built by EmpArchitect
Educational context tool only
Not financial advice
Not a signal service

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.