Liquidity Magnet Pro [JOAT]LIQUIDITY MAGNET PRO
A probability-ranked liquidity engine. Instead of drawing every old pivot as a "liquidity pool" and asking the trader to guess which one matters, Liquidity Magnet Pro scores each pool on four independent factors, ranks them, and surfaces the single highest-probability pool as the TOP MAGNET — the level the script believes price is most likely to be drawn toward next. Then it watches whether price actually sweeps that level, and tracks the hit rate over time.
Liquidity pool detection
Pools are spawned from confirmed swing pivots ( ta.pivothigh / ta.pivotlow ) with a configurable lookback. Equal highs / lows within an auto-scaled tolerance (0.15% on minute charts up to 10% on weekly) are clustered into a single equal-liquidity pool and get a configurable bonus multiplier — because three nicely-stacked equal highs are a stronger draw than a lone wick.
A minimum-age filter discounts freshly-born pools (no demonstrated significance yet), a maximum-age filter retires ancient ones, and a hard cap on active pools keeps the chart legible.
Probability scoring (the headline math)
Each active pool receives a probability score from a weighted blend of four factors, each separately tunable:
Strength — bar volume at the pivot's formation. High-volume swing pivots are more meaningful liquidity than low-volume ones.
Proximity — log-space distance from current price. Symmetric in log space so a 10% move up and a 10% move down score the same. Auto-scales by chart timeframe (0.10 on minute charts, 0.95 on weekly).
Age decay — a maturity curve: pools below the minimum age are weak (just-formed, untested), pools at mid-age are strongest, very old pools decay toward zero.
Momentum bias — how well current momentum is pointing toward the pool. If price is climbing and the pool is above, score goes up; if price is climbing and the pool is below, score goes down.
The output is a 0–100% probability label next to each pool. The pool with the highest score is the TOP MAGNET .
TOP MAGNET visualisation
The top-scored pool gets its own visual treatment so it does not blend into the rest of the stack:
Distinct gold colour reserved exclusively for the top pool.
An animated pulse (sin-modulated transparency, configurable period and amplitude) so it visually breathes.
A magnet glyph anchored to the level.
A field line from current price to the magnet — Diagonal (pointed forward) or Vertical (anchored to current bar), with optional directional arrow on the magnet end.
The pulse is a JOAT enhancement and is fully configurable — period, amplitude, base transparency — or it can be turned off entirely.
Sweep and Sweep-and-Reverse engine
This is the layer that turns a magnet into a tradeable signal. When price touches the TOP MAGNET, the script monitors the next N bars for a sweep candle — defined as a wick longer than ATR × multiplier AND a wick / candle-range ratio above the threshold. If both conditions are met, the touch is flagged as a sweep (price reached the liquidity, but was rejected).
If, additionally, price closes back through the touched level after the sweep, the script emits a Sweep-Reverse label — the highest-conviction signal the indicator produces. A signal cooldown prevents back-to-back fires on the same level. Bars that triggered a sweep can be tinted with an optional background highlight.
Historical tracking
When a pool is the TOP MAGNET and then either gets touched, expires, or gets swept, the outcome is recorded as a small chart marker (off by default). Over time these markers form a visible track record of where the script's top magnets were and whether price actually went there. A rolling Historical Touch % and Sweep Rate % are surfaced in the dashboard so you can see the script's recent hit rate at a glance — institutional accountability instead of a black box.
Dashboard
A monospaced info panel, positionable to any of nine corners, with togglable rows for:
Header with a status dot — green when momentum aligns with the top magnet direction, orange when divergent, gray when neutral.
TOP MAGNET price, direction, probability score.
Distance to top magnet as a progress bar .
Historical touch rate and pending magnet count.
Top 3 ranked targets below the headline.
Sweep rate row (touches that actually became sweeps).
Marker legend.
Every row is independently toggleable so the panel scales from a one-line status dot to a full institutional cockpit.
Alerts
Alert conditions are exposed for top-magnet creation, touches on the top magnet, sweep events, and Sweep-Reverse signal fires. Each alert message names the price level so webhooks can route directly to execution.
How to read it
The cleanest workflow is three steps:
Look at the TOP MAGNET gold level and the field line — that is where the script believes the next liquidity event lives.
Look at the dashboard status dot — green means current momentum is pointing toward the magnet, which is the high-conviction case.
Trade the Sweep-Reverse label when it fires. The sweep alone is the liquidity event; the close-back-through is the confirmation that the sweep was rejected, which is the actual edge.
Suggested settings
Defaults are tuned for 1H–4H on liquid markets. Auto-scale tolerance and auto-scale log-distance are ON by default so the engine adapts to chart timeframe without manual tuning. Tune the four scoring weights to bias the read — raise Proximity if you want only nearby targets, raise Momentum Bias if you want the engine to lean into the prevailing direction more aggressively.
Originality / what's reused
The vocabulary (liquidity pool, sweep, equal highs/lows) is public-domain market-structure language. The implementation — the four-factor probability score, the timeframe-auto-scaled tolerance and log-distance, the animated pulse, the magnet field line, the sweep + close-through Sweep-Reverse rule, the historical hit-rate tracking, and the status-dot momentum alignment — is JOAT-original and tuned together as a single ranked engine. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. Source is sectioned, helper functions documented inline, every input carries a tooltip. Forks welcome with credit.
Limitations
The probability score ranks pools by features that historically correlate with significance — it is a ranking , not a prediction. The Sweep-Reverse signal is non-repainting (uses confirmed close) but only fires when both the sweep wick and the close-back-through are present, which is intentionally rare. On low-liquidity instruments the equal-H/L clustering tolerance may need to be widened manually.
—
-made with passion by jackofalltrades
Indicateur Pine Script®






















