OPEN-SOURCE SCRIPT
Güncellendi

Liquidity Pools + Sweep Signals [Metrify]

41 488
If breakouts feel like a scam, it’s because they often function like one.
Most charts are taught like they’re a clean story of supply and demand. But real price action is messier: it’s a sequence of tests, traps, and collections. The market doesn’t need to “respect” your line, it needs to find liquidity.
And liquidity usually sits in predictable places: swing highs, swing lows, prior reaction points, the levels everyone can see.

This Liquidity Sweep Canvas is a market-structure overlay that tracks liquidity pools built from swing highs/lows, then monitors how price interacts with those pools over time (touches → sweeps → breaks/expiry). The goal is not to “predict” — it’s to map where liquidity is parked, highlight when it’s raided with rejection, and keep a clean, visual “canvas” of relevant pools near current market.

It builds two sides:
  • SELL liquidity pools (from pivot highs, shown in red)
  • BUY liquidity pools (from pivot lows, shown in teal)

Each pool is zoned around the pooled level, merges nearby levels (optional aggressiveness), tracks hits, and can transition through states:
  • Active (building / being respected)
  • Swept (liquidity taken + rejection confirmed)
  • Ended (broken through or expired)

Sweep logic in plain terms

A sweep is detected when price pierces beyond a pool boundary and then closes back through the pool’s midline in the opposite direction (rejection).
  1. Bear sweep (SELL liquidity): price wicks above a SELL pool, then closes back below the pool mid.
  2. Bull sweep (BUY liquidity): price wicks below a BUY pool, then closes back above the pool mid.

Optionally, you can require a second-step confirmation:
Displacement confirm waits for follow-through (within a small window) where price breaks beyond the sweep candle’s reference (with a minimum body size in ATR). This filters some noise, at the cost of being delayed.

🔥 Scoring system (how “quality” is decided)

Sweeps are common. Clean sweeps are not. We uses a weighted scoring model (0–100) so you can filter out weak sweeps and keep the ones that show stronger intent.

A sweep starts when price penetrates beyond the pool boundary (takes liquidity) and reclaims back inside the zone (closes through the pool mid). From there, a score is built from two layers:

✅ Layer 1 —> Sweep candle “core bundle” (base part)

This is computed immediately on the sweep candle (or stored if you require displacement). The base bundle blends:
  • Penetration: how deep the wick pushed beyond the pool in ATR terms (not “deeper is always better”, it’s shaped to reward a realistic sweet spot).
  • Reclaim strength: how much of the candle reclaimed back (close relative to the range).
  • Wick ratio: rejection wick size vs body (controlled by 'Wick Ratio Scale').
  • Body bias: bullish body for bull sweeps / bearish body for bear sweeps gets rewarded.
  • EMA context: measures whether the sweep is happening with a favorable distance relative to EMA 200.
  • Line age/maturity: longer pools can score differently via a length score, then get penalized by a separate age penalty.

🧠 Layer 2 —> Context add-ons

After the base bundle, the final score can include:
  • MSS context: a simple structural reference (recent swing extreme lookback) to rate whether the sweep is happening with useful positioning.
  • Effort score: combines range expansion (ATR) with volume vs volume MA to reward sweeps that show actual participation.
  • Displacement score (optional): if enabled, the sweep is only confirmed after follow-through within a small window.

How to use it
1. Build a two-stage decision: location bias, then trigger selection
Use pools to decide directional bias before you even consider entries. If price is pressing into SELL pools repeatedly and the dashboard shows dense sell-side activity, your bias shifts toward expecting a sell-side raid (sweep up then rejection) rather than a clean breakout. If price is pressing into BUY pools, same logic for downside raid and bounce. Then decide your trigger style manually:
  • If you trade fast mean reversion, you can use immediate sweeps as the “first alarm” and enter on the reclaim + tight invalidation.
  • If you trade safer confirmation, require displacement confirm, and only act once price has proven it can leave the pool with force.

Either way, the script helps you separate where it matters (pools) from where it doesn’t (middle of nowhere).

2. Use hit count to judge liquidity density and trap probability
The LP xN hit count is a manual edge if you treat it correctly: more hits generally implies more eyes, more orders, more liquidity, and therefore more potential for a meaningful raid. When you see a pool with high hits near current price, don’t assume it’s “strong support/resistance.” Instead, assume it’s a liquidity magnet.
  • If price repeatedly taps a high-hit pool without breaking cleanly, it often sets up a sweep (stop run + reverse).
  • If price breaks and stays outside with follow-through, that’s not a sweep environment, it’s a continuation environment.

So you use hit count to anticipate which levels are likely to be hunted, then use candle behavior + displacement to judge whether the hunt was successful and rejected.

3. Turn sweeps into ‘event markers’ for post-move structure mapping

Instead of treating a sweep as “enter now,” treat it as: a structural event happened here.
After a sweep prints, manually re-map microstructure: identify the last minor swing before the sweep, then track whether price breaks it (MSS/BOS style) and whether the first pullback respects that break.

4. Use the channel read as a regime filter (premium/discount logic)
The nearest pool edges effectively form a liquidity channel. Use it like a regime filter:
  • Inside SELL zone / premium: prioritize short-side narratives
  • Inside BUY zone / discount: prioritize long-side narratives
  • Middle channel: treat as uncertainty, tighten your standards (or step aside).

5. Use scoring as a ‘quality gate’, then you do the narrative check”
If you enable scoring, stop thinking of it as “higher score = higher win.” Think of it as a gate that filters out low-effort pokes. Once a high-score sweep prints, manually audit it.

6. Use it as a ‘sweep journal’ to study your market’s behavior

A very “pro” use is not trading it at all for a week. Turn on historical traces and sweep markers, and just observe: Which sessions produce the cleanest sweeps? Do high-score sweeps outperform low-score? Do confirmed sweeps reduce chop at the cost of late entries? Does your instrument sweep more on highs or lows? The dashboard counts help you quantify frequency. After you collect observations, you tune inputs (Swing Length, Merge Distance, Minimum Score, Volume thresholds) to match the instrument’s microstructure.
This is how you turn a generic sweep concept into a market-specific playbook—and the script becomes your data-driven visual log, not a guessing machine.

⚙️ Tuning tips (fast)
  • Too many pools / too noisy → increase Swing Length / Merge Distance.
  • Sweeps trigger too often → enable Activate Scoring and raise Min Score.
  • Wick quality not valued enough → reduce Wick Ratio Scale.
  • Effort scoring feels too easy/hard → adjust Min Volume / MA and Volume MA Length.

A higher score is not a guarantee of a better trade, it simply means the sweep event matched more of the model’s criteria (penetration, reclaim, rejection wick, effort, context components, and optional displacement). Markets are adaptive: what high quality looks like changes by instrument, timeframe, and session. Use scoring to reduce noise, then manually validate.
Sürüm Notları
Added styling input + added new pool size input
Sürüm Notları
fix minor bugs+typo
Sürüm Notları
updated thumbnail
Sürüm Notları
-

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.