Updated
Cross-Exchange Sweep [Zen]

Cross-Exchange Sweep [Zen] checks every liquidity sweep on your chart against three other crypto exchanges on the same closed candle. Each exchange is compared with its own pool, so you see whether the level was taken across the market or only on the exchange you are looking at.
WHAT IS ORIGINAL
Pools and sweeps are standard concepts. Here a sweep is not judged from one exchange only; the script adds a cross-exchange check:
- For every sweep on the chart exchange, the same candle is read from Binance, Bybit and OKX (if the chart is on one of them, that one is replaced by Bitget).
- Each reference exchange is checked against its own pool, built from its own previous candles, not against the chart's price. A small price difference between exchanges is therefore not counted as a missed level.
- Every sweep gets a class: MARKET-WIDE, SPLIT, LOCAL WICK, or n/a when fewer than two references have data. MARKET-WIDE and SPLIT plates show which exchanges took their level.
- The table counts each class over the loaded history, so you can see how often sweeps on this symbol and timeframe were local.
Instead of relying on one exchange's wick, you see whether the other exchanges took their own matching level on the same candle.
Relation to my Sweep OI Flush [Zen]: both use the same sweep rule. That script classifies a sweep by the open interest change on one exchange; this one uses no open interest and checks whether each reference exchange took its own level on the same candle.
WHAT IT SHOWS
- Pool: the highest high and the lowest low of the previous N closed candles (Pool length, 20 by default). Step lines show the chart exchange's pools.
- Sweep (chart exchange): a closed candle's wick goes beyond the pool and the candle closes back inside it. A wick or a close exactly at the pool is not a sweep.
- Reference exchanges: BINANCE, BYBIT and OKX with the same ticker as the chart (for example BINANCE:BTCUSDT.P). If the chart is on one of them, that one is replaced by BITGET.
- Result of each reference on the same candle:
swept: its wick went beyond its own pool and the candle closed back inside,
broke: its wick went beyond its own pool and the candle closed at or beyond it,
no: its wick did not go beyond its own pool,
n/a: no candle with the same open time, or not enough history for a full pool.
An exchange took the level when its result is swept or broke.
- Class (only references with data are counted):
MARKET-WIDE: every reference with data took its level.
SPLIT: some took it, some did not.
LOCAL WICK: none took it; the sweep happened only on the chart exchange.
n/a: fewer than two references had data on that candle. No marker is drawn; the sweep is counted in the table.
- Markers: MARKET-WIDE is a solid plate "WIDE" in the side colour (orange above the candle for a high sweep, blue below it for a low sweep). SPLIT is a plate "SPLIT" in the table's panel colour with side-coloured text. Under the word, three squares show the references in table order: filled = took its level, empty = did not, dash = no data. LOCAL WICK is a small grey dot (can be hidden in Inputs).
- When two plates on the same side are closer than 8 candles, the older one turns into a small dot of the side colour. Hover any plate or dot for its tooltip: class, side, time (UTC), the chart exchange's pool and wick, and the result of each reference.
TABLE (bottom right by default)
- Last: open time (UTC), side and class of the latest sweep. The row is highlighted while that sweep is on the most recent closed candle.
- For the chart exchange and each reference: Pool, Wick and Result of that latest sweep. A reference without data shows dashes and n/a.
- History: the number of WIDE, SPLIT and LOCAL sweeps, n/a sweeps and the total, over all loaded candles.
- A legend for the squares.
- "no reference data" in the Last row means that none of the three references had a candle with the same open time as any closed chart candle in the loaded history.
ALERTS
All alerts fire at candle close. Sweeps with class n/a send no alert.
- "Any alert() function call": one plain-text message per candle with the class, the side and the result of each reference, for example: "BTCUSDT.P 4H BITGET: SPLIT high sweep. BINANCE took, BYBIT took, OKX did not take." If one candle sweeps both pools, both are in the same message.
- Three alert conditions: "MARKET-WIDE sweep", "SPLIT sweep" and "LOCAL WICK sweep". Their messages include the exchange, ticker and timeframe.
HOW TO USE
- Built for USDT perpetuals on Bitget, Binance, Bybit and OKX. The ticker must have the same name on the reference exchanges. A spot chart is compared with spot markets of the same name.
- When a sweep prints on your chart, check its class: MARKET-WIDE means every reference with data took its own level on the same candle; SPLIT means only some did; LOCAL WICK means none did.
- The History row shows how often sweeps on this symbol and timeframe were local.
- It is context for your own analysis, not an entry signal.
INPUTS (defaults)
- Pool length (bars): 20 (5 to 500)
- Show pools: on
- Show LOCAL WICK dots: on
- Show table: on
- Table position: bottom right
Fixed in the code: the reference exchanges, the 8-candle merge distance and the marker limit of about 60.
REALTIME BEHAVIOUR AND LIMITS
- Sweeps and classes are calculated on closed candles only; no marker is drawn on the open candle. The pool lines on the open candle come from closed candles and do not move during it.
- On a live candle, reference values are the latest received at the chart candle's close. If a reference has already opened its next candle, its just-closed candle is used. If a reference has not yet delivered its final prices for that candle, a marker or alert produced live can differ from what the chart shows after a reload, because the history then uses final reference data.
- Only about 60 of the latest markers stay on the chart; the History counts cover all loaded candles, so they depend on how much history the chart loads.
- If one candle sweeps both pools, both sweeps are counted and drawn; the Last row shows the low side.
- A ticker with a different name on a reference exchange (for example with a 1000 prefix) gives n/a for that exchange.
- Use standard candles. On Heikin Ashi, Renko and other synthetic chart types the chart's prices are not the exchange's traded prices, so the comparison does not hold.
- Colours follow the chart theme (light or dark) automatically.
Not financial advice.
WHAT IS ORIGINAL
Pools and sweeps are standard concepts. Here a sweep is not judged from one exchange only; the script adds a cross-exchange check:
- For every sweep on the chart exchange, the same candle is read from Binance, Bybit and OKX (if the chart is on one of them, that one is replaced by Bitget).
- Each reference exchange is checked against its own pool, built from its own previous candles, not against the chart's price. A small price difference between exchanges is therefore not counted as a missed level.
- Every sweep gets a class: MARKET-WIDE, SPLIT, LOCAL WICK, or n/a when fewer than two references have data. MARKET-WIDE and SPLIT plates show which exchanges took their level.
- The table counts each class over the loaded history, so you can see how often sweeps on this symbol and timeframe were local.
Instead of relying on one exchange's wick, you see whether the other exchanges took their own matching level on the same candle.
Relation to my Sweep OI Flush [Zen]: both use the same sweep rule. That script classifies a sweep by the open interest change on one exchange; this one uses no open interest and checks whether each reference exchange took its own level on the same candle.
WHAT IT SHOWS
- Pool: the highest high and the lowest low of the previous N closed candles (Pool length, 20 by default). Step lines show the chart exchange's pools.
- Sweep (chart exchange): a closed candle's wick goes beyond the pool and the candle closes back inside it. A wick or a close exactly at the pool is not a sweep.
- Reference exchanges: BINANCE, BYBIT and OKX with the same ticker as the chart (for example BINANCE:BTCUSDT.P). If the chart is on one of them, that one is replaced by BITGET.
- Result of each reference on the same candle:
swept: its wick went beyond its own pool and the candle closed back inside,
broke: its wick went beyond its own pool and the candle closed at or beyond it,
no: its wick did not go beyond its own pool,
n/a: no candle with the same open time, or not enough history for a full pool.
An exchange took the level when its result is swept or broke.
- Class (only references with data are counted):
MARKET-WIDE: every reference with data took its level.
SPLIT: some took it, some did not.
LOCAL WICK: none took it; the sweep happened only on the chart exchange.
n/a: fewer than two references had data on that candle. No marker is drawn; the sweep is counted in the table.
- Markers: MARKET-WIDE is a solid plate "WIDE" in the side colour (orange above the candle for a high sweep, blue below it for a low sweep). SPLIT is a plate "SPLIT" in the table's panel colour with side-coloured text. Under the word, three squares show the references in table order: filled = took its level, empty = did not, dash = no data. LOCAL WICK is a small grey dot (can be hidden in Inputs).
- When two plates on the same side are closer than 8 candles, the older one turns into a small dot of the side colour. Hover any plate or dot for its tooltip: class, side, time (UTC), the chart exchange's pool and wick, and the result of each reference.
TABLE (bottom right by default)
- Last: open time (UTC), side and class of the latest sweep. The row is highlighted while that sweep is on the most recent closed candle.
- For the chart exchange and each reference: Pool, Wick and Result of that latest sweep. A reference without data shows dashes and n/a.
- History: the number of WIDE, SPLIT and LOCAL sweeps, n/a sweeps and the total, over all loaded candles.
- A legend for the squares.
- "no reference data" in the Last row means that none of the three references had a candle with the same open time as any closed chart candle in the loaded history.
ALERTS
All alerts fire at candle close. Sweeps with class n/a send no alert.
- "Any alert() function call": one plain-text message per candle with the class, the side and the result of each reference, for example: "BTCUSDT.P 4H BITGET: SPLIT high sweep. BINANCE took, BYBIT took, OKX did not take." If one candle sweeps both pools, both are in the same message.
- Three alert conditions: "MARKET-WIDE sweep", "SPLIT sweep" and "LOCAL WICK sweep". Their messages include the exchange, ticker and timeframe.
HOW TO USE
- Built for USDT perpetuals on Bitget, Binance, Bybit and OKX. The ticker must have the same name on the reference exchanges. A spot chart is compared with spot markets of the same name.
- When a sweep prints on your chart, check its class: MARKET-WIDE means every reference with data took its own level on the same candle; SPLIT means only some did; LOCAL WICK means none did.
- The History row shows how often sweeps on this symbol and timeframe were local.
- It is context for your own analysis, not an entry signal.
INPUTS (defaults)
- Pool length (bars): 20 (5 to 500)
- Show pools: on
- Show LOCAL WICK dots: on
- Show table: on
- Table position: bottom right
Fixed in the code: the reference exchanges, the 8-candle merge distance and the marker limit of about 60.
REALTIME BEHAVIOUR AND LIMITS
- Sweeps and classes are calculated on closed candles only; no marker is drawn on the open candle. The pool lines on the open candle come from closed candles and do not move during it.
- On a live candle, reference values are the latest received at the chart candle's close. If a reference has already opened its next candle, its just-closed candle is used. If a reference has not yet delivered its final prices for that candle, a marker or alert produced live can differ from what the chart shows after a reload, because the history then uses final reference data.
- Only about 60 of the latest markers stay on the chart; the History counts cover all loaded candles, so they depend on how much history the chart loads.
- If one candle sweeps both pools, both sweeps are counted and drawn; the Last row shows the low side.
- A ticker with a different name on a reference exchange (for example with a 1000 prefix) gives n/a for that exchange.
- Use standard candles. On Heikin Ashi, Renko and other synthetic chart types the chart's prices are not the exchange's traded prices, so the comparison does not hold.
- Colours follow the chart theme (light or dark) automatically.
Not financial advice.
Release Notes
Outcome statistics per class.Every classified sweep (MARKET-WIDE, SPLIT or LOCAL WICK) is now followed for the next 12 candles (default), starting with the candle after the sweep:
- Reversal: price moved 1 x ATR(14) (default) from the sweep close, away from the swept level, before it traded beyond the sweep wick. ATR is measured on the sweep candle.
- Stop: price traded beyond the sweep wick first. A candle that reaches the Reversal level and also trades beyond the wick counts as Stop.
- None: neither happened within the window.
The table has a new block: one row per class with Resolved (sweeps whose outcome is known), Reversal %, Stop % and None %. Hover the column headers to see the rule. The History counters are now one line under this block, so you still see all sweeps of each class, including n/a.
New inputs (group Outcome statistics): Outcome window 12, Reversal target 1.0 x ATR, ATR length 14.
Notes:
- Percentages use resolved sweeps only. Sweeps still inside their window and n/a sweeps are not counted. High and low sweeps on the same candle count separately.
- Percentages are rounded to whole numbers, so a row can add up to 99 or 101.
- Outcomes are measured on the chart exchange's candles; the reference exchanges are used only for the class, as before. No new data requests.
- LOCAL WICK sweeps are rare, so check Resolved before comparing rows.
- Stop means price went beyond the sweep wick; it is not a trade result. The numbers describe past price behaviour on the loaded history of this chart and are not a forecast.
The sweep rule, the classes, the markers and the alerts are the same as before.
Open-source: Untouched Levels [Zen] → tradingview.com/script/9cwR0ZIw-Untouched-Levels-Zen/ | Free: Liquidity Zones [Zen] → tradingview.com/script/aSdm5wX3-Liquidity-Zones-Zen/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source: Untouched Levels [Zen] → tradingview.com/script/9cwR0ZIw-Untouched-Levels-Zen/ | Free: Liquidity Zones [Zen] → tradingview.com/script/aSdm5wX3-Liquidity-Zones-Zen/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.