PROTECTED SOURCE SCRIPT

HTF Liquidity Sweep Engine

10
HTF Liquidity Sweep Detector (Dual HTF)

Overview

This indicator is designed to identify validated liquidity sweeps on Higher Timeframes (HTF) and project them accurately onto lower-timeframe charts.
Unlike basic sweep indicators that mark every high or low break, this tool applies context-aware validation and invalidation logic to distinguish meaningful liquidity events from random volatility.

The script supports two independent higher timeframes (HTF 1 & HTF 2), allowing traders to analyze liquidity hierarchy and confluence across multiple market structures within a single chart.



Core Concept

A liquidity sweep is not considered valid simply because price exceeds a previous high or low.
This script evaluates each sweep within the structural context of the HTF candle that formed it, accounting for:
• Bullish vs bearish candle structure
• Open, close, high, and low relationships
• Temporal sequencing between HTF candles

Sweeps are treated as stateful events with a full lifecycle rather than static lines.



Sweep Lifecycle & Invalidation Logic

Each detected sweep progresses through multiple states:
• Formation – A sweep is detected when price exceeds a prior HTF high or low under valid structural conditions.
• Validation – The sweep remains provisional until subsequent HTF candles confirm it.
• Invalidation – If later HTF price action violates the structural conditions, the sweep is automatically marked as invalidated.
• Removal – Sweeps that fail during their formation phase are removed entirely to avoid misleading signals.

This approach ensures that only structurally meaningful sweeps remain visible on the chart.



Dual Higher-Timeframe Analysis

HTF 1 and HTF 2 operate as separate liquidity layers, each with independent:
• Detection logic
• Validation and invalidation rules
• Visualization styles

This allows traders to identify:
• HTF liquidity alignment
• Higher-timeframe dominance
• Confluence or conflict between liquidity zones



Projection to Lower Timeframes

Detected HTF sweeps are dynamically projected onto the active chart timeframe.
Sweep levels update in real time and maintain accurate positioning relative to HTF candle boundaries, ensuring visual consistency across timeframes.



Valid Pullback Swing Line (Optional)

An optional internal swing structure module is included to identify valid pullback swings.
This feature tracks structural pivots, updates dynamically, and automatically invalidates broken swing structures, helping traders contextualize liquidity sweeps within current market structure.



Customization

Each HTF layer supports full independent customization:
• Enable / disable HTF layers
• Timeframe selection and lookback depth
• Sweep and invalidation line styles, colors, and widths
• Label and marker display options
• Label positioning and sizing
• Alert notifications for sweep formation



Alerts

Optional alerts trigger when a liquidity sweep is formed, allowing traders to monitor potential liquidity events without constant chart supervision.



This script is published as closed-source because its sweep validation, invalidation, and multi-timeframe interaction logic represents the core intellectual property of the tool.
The description above is intended to provide conceptual clarity without disclosing proprietary implementation details.



Intended Use

This indicator is designed as a market structure and liquidity analysis tool, not a standalone trading system.
It is best used in combination with price action, higher-timeframe bias, and risk management principles.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.