PROTECTED SOURCE SCRIPT
Mis à jour

HTF Liquidity Sweep Detector

77
An indicator designed to detect liquidity sweeps on Higher Timeframes (HTF), displaying points where price sweeps through the highs or lows of candles on larger timeframes.
Key Features

Supports analysis of 2 timeframes simultaneously (HTF 1 and HTF 2)
Detects both Bullish and Bearish liquidity sweeps
Displays lines and labels with turtle emoji markers
Automatic sweep invalidation system
Customizable line styles, colors, and widths for each HTF
Independent label and turtle emoji display controls
Adjustable label position (Left, Center, Right)
Configurable line extension length
Alert notifications when sweeps are formed

How It Works

Monitors candles on selected higher timeframes
Identifies when price sweeps above previous highs (Bullish Sweep) or below previous lows (Bearish Sweep)
Validates sweep formations and automatically removes invalidated sweeps
Displays sweep lines extending forward with optional labels

Settings
HTF 1 & HTF 2:

Enable/Disable HTF
Timeframe selection
Number of candles to track
Show/Hide sweep lines
Line style (Solid, Dashed, Dotted)
Line width and color
Extend bars length
Show/Hide labels and turtle emojis independently
Label position (Left, Center, Right)
Label size and color

Alerts:

Sweep formation notifications

Use Cases

Identifying liquidity grab zones
Confirming trend reversals
Spotting institutional manipulation patterns
Planning entries after liquidity sweeps
Notes de version
Fixed. Extend bars
Notes de version
Added inv_length input: Set length for invalidated sweep lines (default 50, min 10-200)
max_bars_back=2000: Better historical data handling
Fixed detect_sweeps: Removed min(4) to count-1, dropped not c2.is_closed + size<=2 for full pair detection
Added barstate.isconfirmed: In detect_sweeps to prevent runtime buffer errors
Updated draw_sweep/plot_sweeps: Uses inv_length for short invalidated lines
Notes de version
.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.