Aktualisiert

Liquidity Sweep Breadth [Zen]

2 630
Liquidity Sweep Breadth [Zen] is built for USDT perpetual futures. On every closed candle it counts how many coins in a basket swept their own liquidity pool - the highest high or the lowest low of their previous N candles (20 by default). The share of the basket is drawn in the lower pane: up for highs, down for lows. When many coins sweep the same side on one candle, the price chart gets a MARKET SWEEP label (one label per wave). When the chart coin sweeps a pool while almost no other coin does, it gets an ALONE label.

WHAT IS ORIGINAL
Breadth indicators usually count how many coins are above a moving average or at new highs. This one counts liquidity sweeps:
- Every coin is checked against its own pool, built from its own previous candles on the same exchange and timeframe. Coins trade at different prices; what is compared is whether each coin took its own level on that candle.
- The result is a share of the coins that have data on that candle, not a fixed count, so a coin that was listed later or is missing on the exchange does not distort it.
- A market-wide sweep (many coins swept the same side on the same candle) and a sweep made alone (the chart coin swept while almost no other coin did) are marked on the price chart, not only in the lower pane.
- A heatmap table shows every coin over the last 12 closed candles: which coin swept which side and when.
Relation to my other scripts: Cross-Exchange Sweep [Zen] and Sweep OI Flush [Zen] use the same sweep rule on one coin: the first checks it on four exchanges, the second classifies it by open interest. This script uses no open interest and checks many coins on one exchange on the same candle. Untouched Levels [Zen] shows a table of levels that have not been touched yet; this table shows the sweeps that already happened, candle by candle. None of them has the basket share, the market-wide threshold or the sweep heatmap, so this is a separate script, not an update of any of them.

HOW IT CALCULATES
- Pool of a coin: the highest high and the lowest low of its previous N closed candles (Pool length, 20 by default).
- High sweep: the candle's high goes above the pool high and the candle closes below it. Low sweep: the low goes below the pool low and the candle closes above it. One candle can sweep both sides; such a coin counts for both.
- Each coin of the basket is requested as EXCHANGE:COINUSDT.P on the chart's timeframe. Only the coin's candle with the same open time as the chart candle is used. A coin has no data on a candle when it has no candle with that open time, when the ticker does not exist on the exchange, or when fewer than N of its earlier candles are loaded.
- Share of highs = coins that swept their high / coins with data. The same for lows.
- A candle is used only when at least half of the basket and at least 5 coins have data (a basket of fewer than 5 coins needs all of them). Otherwise the candle gets no column, label, alert or count; the table still shows each coin's own result on it.
- Market-wide sweep: the share of one side is at or above the threshold (40% by default).
- Swept alone: the candle has enough data, the chart coin swept a side by the same rule on its own chart, the candle is not market-wide on that side, and at most 10% (by default) of the other coins with data swept the same side. If the chart coin is in the basket (same coin name), it is left out of the other coins.

ON THE CHART
- Lower pane: orange columns up = share of coins that swept their high, blue columns down = share that swept their low, in percent. Dashed lines at plus and minus the threshold. Columns of market-wide candles are bright, the others are pale. The open candle has no column.
- Price chart, label MARKET SWEEP with two numbers, for example "MARKET SWEEP 12/20": 12 of the 20 coins with data swept that side. Orange above the candle for highs, blue below the candle for lows.
- One label per wave: when the previous closed candle was already market-wide on the same side, the new candle's column is still bright but no second label is drawn, so labels on neighbouring candles do not overlap. Alerts and table counts still include every market-wide candle.
- Label ALONE, for example "ALONE 1/19": the chart coin swept alone; 1 of the 19 other coins with data swept the same side.
- Up to the 200 latest labels are kept on the chart.

TABLE (on the price chart, middle left by default)
- Header: script name, timeframe and exchange.
- "Market-wide since": the date (UTC) of the first candle with enough data, and the number of market-wide candles for highs and for lows since then. Every market-wide candle is counted, including the next candles of a wave.
- One row per coin; the chart coin is highlighted. 12 columns = the last 12 closed candles, the oldest on the left. Up triangle = high swept, down triangle = low swept, diamond = both, dash = no data, empty = no sweep.
- Right column: candles since that coin's last sweep on either side, counted from the open candle (1 = the last closed candle). A dash means no sweep in the loaded history.
- Last row: how many coins swept highs and lows on the last closed candle, out of the coins with data, and a legend.

ALERTS
All alerts fire at candle close.
- "Any alert() function call": one plain-text message per candle with everything that happened on it, for example "BTCUSDT.P 1m: high swept alone, other coins 0/19." A market-wide message also lists the coins that swept: "TICKER TF: market-wide low sweep 12/20 (coin list)."
- Three alert conditions: "Market-wide high sweep", "Market-wide low sweep" and "Chart coin swept alone". Their messages include the exchange, ticker and timeframe.
- When you create the alert, TradingView shows a warning that the indicator can repaint. What can differ between a live result and the reloaded chart is explained in the realtime section below.

HOW TO USE
- Exchange = Chart (the default) uses the chart's exchange. The other options are BITGET, BINANCE, BYBIT and OKX. If the chart's exchange has no COINUSDT.P tickers, choose one of these; otherwise every coin shows a dash and nothing is calculated. A coin that is not listed on the selected exchange shows a dash. The default basket was checked on Bitget and Bybit.
- When your coin sweeps a pool, look at the lower pane on that candle. A bright column means that many coins swept the same side at the same time; the first candle of such a wave also gets a MARKET SWEEP label. ALONE means your coin did it while almost no other coin did.
- The heatmap shows which coins swept recently; the right column shows how long ago.
- The basket can be edited: up to 20 coins, comma separated (only the first 20 are used); letter case and spaces do not matter.
- It is context for your own analysis, not an entry signal.

INPUTS (defaults)
- Coins: BTC, ETH, SOL, XRP, BNB, DOGE, ADA, TRX, AVAX, LINK, DOT, LTC, BCH, SUI, NEAR, APT, ARB, OP, UNI, ATOM
- Exchange: Chart (also BITGET, BINANCE, BYBIT, OKX)
- Pool length (bars): 20 (5 to 200)
- Market-wide threshold %: 40 (10 to 100)
- Swept alone: others at most %: 10 (0 to 50)
- Show chart markers: on
- Show table: on
- Table position: middle left
The defaults were chosen on the 4H chart.

REALTIME BEHAVIOUR AND LIMITS
- Everything is calculated on closed candles only; the open candle has no column, label or alert.
- On a live candle, each coin's values are the latest received when the chart candle closes. If a coin has already opened its next candle, its just-closed candle is used. If a coin's final prices for that candle arrive later, a label or alert produced live can differ from what the chart shows after a reload, because the history then uses the final data.
- Results depend on the exchange: wicks differ between exchanges, so the same candle can be market-wide on one exchange and not on another.
- The counts in the table cover the loaded history only, so they depend on how much history the chart loads; the start date is shown.
- A coin listed under a different name on the exchange (for example with a 1000 prefix) shows a dash until you type its name exactly as the exchange lists it before USDT.P. While it shows a dash, it is left out of the share but still counts in the basket size for the half-of-the-basket rule.
- When the chart is zoomed far out, labels can overlap. Zoom in or turn off Show chart markers.
- Use standard candles. On Heikin Ashi, Renko and other synthetic chart types the chart coin's own sweep is based on synthetic prices.
- Colours follow the chart theme (light or dark) automatically.

Not financial advice.
Versionshinweise
Added a hint to the table: when the chart's exchange has no COINUSDT.P data (for example CRYPTO), the table now says so and lists the exchanges to choose in Settings > Exchange. Calculations are unchanged.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.