OPEN-SOURCE SCRIPT
更新済 Buy Sell Volume with delta value

📄 Script Description
This indicator decomposes total traded volume into buying and selling volume, and displays their relative ratios.
🔎 Key Features
Buying vs. Selling Volume Separation
Uses the candle’s high, low, and close to split total volume into buying volume and selling volume.
Formula:
Buy = volume * (close - low) / (high - low)
Sell = volume * (high - close) / (high - low)
Volume Histogram Visualization
Plots overall volume (upper/lower) and separated buy/sell volumes as color-coded columns.
UPPER V / LOWER V: total volume
BUY V: buying volume (teal)
SELL V: selling volume (red)
Buy/Sell Ratio Calculation
Computes the percentage of buy and sell volume relative to total volume.
Buy Ratio = buyVolume / totalVolume * 100
Sell Ratio = sellVolume / totalVolume * 100
Ratio Display
Shows the latest Buy Ratio in a table (top-right corner of the chart).
Adds a label above the most recent bar displaying:
"Buy XX% / Sell YY%"
Historical ratios can be inspected through the TradingView Data Window or tooltip.
🛠️ Usage
Quickly identify whether volume during each candle is dominated by buyers or sellers.
Helps to assess market pressure and confirm potential trend direction, entries, or exits.
⚠️ Notes
Labels are shown only on the most recent bar (Pine cannot track mouse cursor events).
To see historical values, use the TradingView Data Window or hover tooltips.
This method provides an approximate split of volume and does not perfectly capture all market order flows.
This indicator decomposes total traded volume into buying and selling volume, and displays their relative ratios.
🔎 Key Features
Buying vs. Selling Volume Separation
Uses the candle’s high, low, and close to split total volume into buying volume and selling volume.
Formula:
Buy = volume * (close - low) / (high - low)
Sell = volume * (high - close) / (high - low)
Volume Histogram Visualization
Plots overall volume (upper/lower) and separated buy/sell volumes as color-coded columns.
UPPER V / LOWER V: total volume
BUY V: buying volume (teal)
SELL V: selling volume (red)
Buy/Sell Ratio Calculation
Computes the percentage of buy and sell volume relative to total volume.
Buy Ratio = buyVolume / totalVolume * 100
Sell Ratio = sellVolume / totalVolume * 100
Ratio Display
Shows the latest Buy Ratio in a table (top-right corner of the chart).
Adds a label above the most recent bar displaying:
"Buy XX% / Sell YY%"
Historical ratios can be inspected through the TradingView Data Window or tooltip.
🛠️ Usage
Quickly identify whether volume during each candle is dominated by buyers or sellers.
Helps to assess market pressure and confirm potential trend direction, entries, or exits.
⚠️ Notes
Labels are shown only on the most recent bar (Pine cannot track mouse cursor events).
To see historical values, use the TradingView Data Window or hover tooltips.
This method provides an approximate split of volume and does not perfectly capture all market order flows.
リリースノート
📄 Script DescriptionThis indicator visualizes buying and selling volume, calculates their ratios, and highlights the relative dominance (Delta %) of one side over the other.
🔎 Key Features
Buying vs. Selling Volume Separation
Splits each candle’s total volume into buying and selling components using price location within the bar.
Formulas:
Buy = volume * (close - low) / (high - low)
Sell = volume * (high - close) / (high - low)
Volume Histogram
Plots total volume (upper/lower) as well as separated buying and selling volume with different colors.
Teal = Buy volume, Red = Sell volume.
Buy/Sell Ratio (%)
Calculates the percentage share of buy and sell volume relative to total volume.
Buy Ratio = (buyVolume / totalVolume) * 100
Sell Ratio = (sellVolume / totalVolume) * 100
Volume Delta (%)
Measures the imbalance between buying and selling volume as:
Delta %
=
∣
𝐵
𝑢
𝑦
−
𝑆
𝑒
𝑙
𝑙
∣
𝑇
𝑜
𝑡
𝑎
𝑙
×
100
Delta %=
Total
∣Buy−Sell∣
×100
Indicates which side dominates (Buy or Sell).
The badge background changes to teal if buyers dominate, red if sellers dominate.
Right-Side Badge Display
Instead of floating labels over bars, the indicator displays a clean badge on the right side of the chart showing:
Buy: XX% / Sell: YY% / Delta: ZZ%
🛠️ How to Use
Instantly see whether buying or selling volume is dominant in each candle.
Use Buy/Sell ratios to gauge the balance of order flow.
Use Delta % to quickly identify strong buying or selling pressure.
Helpful for validating trend strength, reversals, or confirming entry/exit signals.
⚠️ Notes
The calculation is based on a simplified model of volume distribution (price relative to bar range).
Actual order flow may differ, but this provides a strong proxy for buy/sell imbalance.
Badge display is fixed to the chart’s right side for better visibility compared to per-bar labels.
リリースノート
updated the table positionオープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。