PROTECTED SOURCE SCRIPT
Multi TF - HTF→LTF Orderblocks

Multi TF — HTF→LTF Orderblocks
Identify higher-timeframe (HTF) order blocks and project them onto your lower-timeframe (LTF) chart—clean, fast, and publication-ready.
The script automatically detects swing breaks on your chosen HTF, builds the originating order block, and renders that zone on your current chart so you can execute on lower timeframes with higher-timeframe context.
--------------------
How it works
HTF swing structure is tracked via pivot highs/lows and a user-selected break confirmation (Close or Wick).
On a valid break, the script backtracks to the last opposite candle and creates the HTF order block (wick-to-wick or body-only depending on your setting).
The OB is projected to the LTF and extended bar-by-bar until:
Mitigation: price penetrates at least 50% of the zone → the box is marked “old” (dimmed) or optionally auto-deleted.
Close-break: price closes beyond the far edge → zone is optionally removed immediately.
Each zone includes a centerline and an inside label showing the original HTF (e.g., “M15”, “H1”).
Key features
True HTF→LTF overlay: trade M1/M5 with M15/H1/H4 context.
Mitigation logic (≥50%): first meaningful touch turns the zone “old” or deletes it (your choice).
Close-break handling: auto-remove zones broken by close, to keep charts clean.
Overlap control: choose how to handle overlapping zones on the same side:
Keep Latest, Union (merge), or Intersection (refine).
Wicks vs. Bodies: build zones from full candle range or just the body.
Lightweight UI: only the relevant inputs in the panel; sensible defaults.
Alert included: fires on the first 50% mitigation of any fresh zone.
Performance-friendly limits: cap the number of active zones to fit Pine limits.
Inputs (quick overview)
HTF for Order Blocks: timeframe to scan (e.g., 15, 60, 240, D).
Swing Length (Pivot L/R): pivot sensitivity for structure.
Break Confirmation: Close (recommended) or Wick.
Zones use Wicks: on/off for wick-to-wick zones.
OB Lookback before Break: how far to search for the opposite candle.
Max Active Zones: hard cap for chart cleanliness & performance.
Delete on Close-Break: remove zones that are invalidated by a close.
Delete after Mitigation: remove once a 50% touch occurs.
Handle Overlap: None, Keep Latest, Union (merge), Intersection (refine).
Colors & Border: fresh/old zone colors (default ~35% opacity) and optional borders.
Default profile (as shipped):
Break by Close, zones use wicks, Union overlap handling, 250 lookback, 250 max zones, borders off, and HTF label printed inside each zone.
How to use (suggested workflow)
Pick an HTF (e.g., H1 for intraday) and drop to your execution TF (e.g., M5/M1).
Wait for price to tap ≥50% of a fresh OB → look for your LTF trigger (CHOCH, iFVG, PA).
Place SL beyond the zone (or beyond the LTF swing) and manage to your targets (e.g., 2R–3R or to the next HTF OB).
Keep charts clean by enabling Delete on Close-Break and (optionally) Delete after Mitigation.
Alerts
“OB: Zone berührt (Erstkontakt)” — triggers on the first ≥50% mitigation of any fresh zone.
Create additional TradingView alerts with this condition to get notified in real time.
Notes & limitations
Built with request.security(..., lookahead_off) to avoid future-bar peeking; zones only form after a confirmed HTF break.
As with all pattern-based tools, use alongside your risk management and a defined entry model.
Pine has strict limits on drawings; use Max Active Zones to balance coverage and performance.
Credits
Designed for traders who want HTF precision with LTF execution—a clean, opinionated OB overlay that focuses on what matters: fresh zones, first touch, and invalidation.
Identify higher-timeframe (HTF) order blocks and project them onto your lower-timeframe (LTF) chart—clean, fast, and publication-ready.
The script automatically detects swing breaks on your chosen HTF, builds the originating order block, and renders that zone on your current chart so you can execute on lower timeframes with higher-timeframe context.
--------------------
How it works
HTF swing structure is tracked via pivot highs/lows and a user-selected break confirmation (Close or Wick).
On a valid break, the script backtracks to the last opposite candle and creates the HTF order block (wick-to-wick or body-only depending on your setting).
The OB is projected to the LTF and extended bar-by-bar until:
Mitigation: price penetrates at least 50% of the zone → the box is marked “old” (dimmed) or optionally auto-deleted.
Close-break: price closes beyond the far edge → zone is optionally removed immediately.
Each zone includes a centerline and an inside label showing the original HTF (e.g., “M15”, “H1”).
Key features
True HTF→LTF overlay: trade M1/M5 with M15/H1/H4 context.
Mitigation logic (≥50%): first meaningful touch turns the zone “old” or deletes it (your choice).
Close-break handling: auto-remove zones broken by close, to keep charts clean.
Overlap control: choose how to handle overlapping zones on the same side:
Keep Latest, Union (merge), or Intersection (refine).
Wicks vs. Bodies: build zones from full candle range or just the body.
Lightweight UI: only the relevant inputs in the panel; sensible defaults.
Alert included: fires on the first 50% mitigation of any fresh zone.
Performance-friendly limits: cap the number of active zones to fit Pine limits.
Inputs (quick overview)
HTF for Order Blocks: timeframe to scan (e.g., 15, 60, 240, D).
Swing Length (Pivot L/R): pivot sensitivity for structure.
Break Confirmation: Close (recommended) or Wick.
Zones use Wicks: on/off for wick-to-wick zones.
OB Lookback before Break: how far to search for the opposite candle.
Max Active Zones: hard cap for chart cleanliness & performance.
Delete on Close-Break: remove zones that are invalidated by a close.
Delete after Mitigation: remove once a 50% touch occurs.
Handle Overlap: None, Keep Latest, Union (merge), Intersection (refine).
Colors & Border: fresh/old zone colors (default ~35% opacity) and optional borders.
Default profile (as shipped):
Break by Close, zones use wicks, Union overlap handling, 250 lookback, 250 max zones, borders off, and HTF label printed inside each zone.
How to use (suggested workflow)
Pick an HTF (e.g., H1 for intraday) and drop to your execution TF (e.g., M5/M1).
Wait for price to tap ≥50% of a fresh OB → look for your LTF trigger (CHOCH, iFVG, PA).
Place SL beyond the zone (or beyond the LTF swing) and manage to your targets (e.g., 2R–3R or to the next HTF OB).
Keep charts clean by enabling Delete on Close-Break and (optionally) Delete after Mitigation.
Alerts
“OB: Zone berührt (Erstkontakt)” — triggers on the first ≥50% mitigation of any fresh zone.
Create additional TradingView alerts with this condition to get notified in real time.
Notes & limitations
Built with request.security(..., lookahead_off) to avoid future-bar peeking; zones only form after a confirmed HTF break.
As with all pattern-based tools, use alongside your risk management and a defined entry model.
Pine has strict limits on drawings; use Max Active Zones to balance coverage and performance.
Credits
Designed for traders who want HTF precision with LTF execution—a clean, opinionated OB overlay that focuses on what matters: fresh zones, first touch, and invalidation.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.