PROTECTED SOURCE SCRIPT

Time Confluence Windows — 50% Levels + Next-Close Scanner

49
Find stacked time windows and the exact prior-bar 50% levels across multiple timeframes — in one panel and on your chart.
This tool highlights when several timeframes are simultaneously “in play” (post-close & pre-close windows), and plots the previous bar midpoint (50%) for each TF so you can judge mean-revert vs. continuation risk at a glance.

What it shows

Confluence shading: counts active windows from selected TFs (30m→8h) plus optional pre-close anticipation for 3h/4h/6h/8h. Tiers at 5/6/7/8/≥9 stacks with configurable colors.

Panel (table) with:

TF list (tinted to match line colors)

Next Close countdown for each TF

Prev 50% = exact midpoint of the previous bar on that TF (▲ if price above, ▼ if below)

50% lines on the chart (optional) for intraday TFs + optional D/W/M. Labels can show price.

Close markers (optional triangles) to see when a TF just closed.

Scan header: auto-adds higher TFs (multi-day/week/month bars) only if their next close is within X hours (default 22h), keeping the panel focused on relevant windows.

Alerts: one alert condition when the stack reaches your threshold.

How it works (exact & efficient)

50% is computed with one request per TF using hl2[1] on the requested basis (regular or extended / Heikin-Ashi if you choose).
This keeps table and lines in perfect sync and reduces request.* usage.

Lines “follow” the panel: if you hide a TF in the panel (e.g., chart TF is higher and you enabled TF-follow), its line is hidden too.

Daily/Weekly/Monthly lines/rows are optionally gated by “scan hours” (default 22h to activation).

Key inputs

Tracked TFs: 30m, 1h, 2h, 3h, 4h, 6h, 8h (toggle each)

Basis: Heikin-Ashi on/off, RTH vs. Extended (if session exists)

Post-close & Pre-close window lengths per TF

Recent window filter (only draw lines/shading near the most recent N minutes)

Line options: width, style, span, label side, show price, per-TF colors

TF-follow: hide intraday lines when chart TF is higher; gate D/W/M by scan hours

Alert: threshold for confluence stack

Tips / FAQ

Lines don’t match the table? Make sure Auto Fit to screen is on (or zoom so lines are within view), and confirm you’re using the same basis (RTH/Extended, Heikin-Ashi) as the panel. This version uses the same midpoint source for both, so values match exactly.

Hitting request limits?
Disable unused TFs, turn off D/W/M lines, or increase “Scan ≤ hours” selectivity. This build already halves midpoint requests via hl2[1].

No-repaint note: 50% levels use previous bar data on each TF with lookahead_off, so the plotted midpoints do not repaint. Shading/countdowns update in real time as windows open/close.

How to use

Add the indicator and pick your tracked TFs.

Choose your basis (Regular vs Extended / Heikin-Ashi).

Set scan hours (e.g., 22h) to show higher-TF rows/lines only when relevant.

Optionally enable lines & labels for the TFs you actively trade.

(Optional) Create an alert: Time Confluence Stack ≥ Threshold.

Change log

v6.6.3

Exact 50% via single hl2[1] call per TF (panel & lines always match)

Reduced request.* usage for better performance

TF-follow behavior & gating polished

Disclaimer: This is an educational tool, not financial advice. Always confirm signals within your own plan and manage risk.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.