OPEN-SOURCE SCRIPT

Crypto Spot Volume Ratio

455
**Overview**
This TradingView Pine Script v7 indicator computes and visualizes each exchange’s spot‐volume share relative to the average across ten major venues. By plotting ten “volume coefficients” around a baseline of 1, you immediately see which exchanges are trading above or below the aggregate average in each bar (timeframe period).

---

## 1. Data Sources

The script pulls spot trading volume for the current symbol (e.g. BTC/USDT, ETH/USDT, SOL/USDT, etc.) from these ten exchanges:

* Binance
* OKX
* Bybit
* KuCoin
* Gate.io
* HTX
* Kraken (USD pair)
* Coinbase (USD pair)
* Bitstamp (USD pair)
* Bitfinex (USD pair)

For USD-quoted venues (Coinbase, Kraken, Bitstamp, Bitfinex), it automatically converts the symbol suffix from “USDT” to “USD.”

---

## 2. Calculation Steps

1. **Fetch Volumes**
Using `request.security`, the script retrieves `volume` from each exchange’s contract at the chart’s timeframe.
2. **Sum and Average**

* **Total Volume (`sumVol`)** = sum of all ten exchanges’ volumes.
* **Average Volume (`avgVol`)** = `sumVol / 10‘.
3. **Compute Coefficients**
For each exchange *i*,
A coefficient > 1 means that exchange’s volume is above the ten‐exchange average; < 1 means below average.
4. **Rendering**

* **Table**: A horizontal row in the top‐right corner lists each enabled exchange’s coefficient (formatted to two decimals).
* **Plots**: Ten overlaid line plots show each exchange’s coefficient time series. A dashed horizontal line at **1** marks the average baseline.

---

## 3. Configuration Options

In the indicator’s settings panel, you can toggle **“Show …”** for any of the ten exchanges. Disabling an exchange will hide both its table entry and its plotted line—but does **not** change the average calculation (which always divides by 10).

---

## 4. Interpretation & Significance

* **Relative Activity**: By normalizing each venue to the ten‐exchange average, you spot shifts in where volume is concentrated.
* **Liquidity Insights**: Exchanges consistently above 1 may offer deeper liquidity, tighter spreads, or attract more order flow. Those below 1 may lag on volume, signaling lower activity or potential outages.
* **Arbitrage & Flow Monitoring**: Sudden spikes on a particular exchange (coefficient >> 1) can indicate localized buying/selling pressure, useful for spotting arbitrage windows, large order flows, or exchange-specific events.
* **Market Health**: Tracking the dispersion of these coefficients over time gives you a quick visual of how balanced or skewed the overall market activity is across venues.

---

## 5. How It Works in Practice

1. **Attach** this indicator to any USDT or USD spot chart (e.g., BTCUSDT, ETHUSDT).
2. **Observe** which exchange lines rise above the dashed **1** line—those venues are currently trading more volume than the average of the ten.
3. **Use** the table to see exact coefficient values each bar.
4. **Toggle** exchanges on/off to focus on specific venues without affecting the universal average baseline.

By comparing ten exchanges on a single pane, you gain real-time clarity on where crypto liquidity and activity are most intense—and where it temporarily wanes—empowering more informed trading, arbitrage strategies, and market‐structure analysis.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。