OPEN-SOURCE SCRIPT
업데이트됨

Color Coded Volume Indicator

561
Color Coded Volume Indicator

Overview
Splits each bar’s total volume into estimated buy-side vs. sell-side components and displays them as stacked two-tone columns (red = sell, green = buy). Axis labels and tooltips use “K”/“M” formatting.

Features
  • []Stacked Two-Tone Columns
    • []Red Base: estimated sell volume (50% opacity)
      []Green Top: remaining buy volume (50% opacity)
    []Automatic K/M Formatting via [code]format=format.volume[/code]
    []Zero Baseline for clean reference at zero
    []Positive-Only Bars (no negatives)


How It Works
  1. []True-Range Guard
    Skips bars where [code]high == low[/code] to avoid divide-by-zero.
    []Volume Split
    BuyVol = Volume × (Close − Low) / (High − Low)
    SellVol = Volume × (High − Close) / (High − Low)

    Both series clamped ≥ 0.
  2. Layered Plot
    Draw semi-transparent green at full height, then overlay red sell portion.


Usage
  • []Open TradingView’s Pine Editor
    []Paste in the full script
    []Click “Save & Add to Chart”
    []In the Publish dialog, title it “Color Coded Volume Indicator” and paste this description.


Interpretation
  • []Green-dominant bars → strong buying pressure
    []Red-dominant bars → strong selling pressure
  • Equal halves → balanced activity
릴리즈 노트
Added Normalize volume on opening and closing candles to reduce the size of the opening and closing candles, which almost always are unusually large, but don't add a lot of value to most users. When you normalize, it reduces their size and adds a text label to still show you the size.
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Color Coded Volume Indicator

Normalize session extremes to 15:58 volume

This indicator splits each bar's volume into buy (green) and sell (red) components and, optionally, normalizes the first and last two session candles to the previous-1 bar's volume (i.e. the 15:58 bar on a 1-min chart).

Use on intraday charts up to 5-min. When Normalize volume on session extremes to 15:58 volume is enabled, the 9:30, 15:59, and 16:00 bars plot at the 15:58 volume level, preserving each bar's original buy/sell ratio. Labels show the actual raw volume (K/M format).


  1. InputsNormalize volume on session extremes to 15:58 volume (bool): Enable cap on 9:30, 15:59 & 16:00 bars
  2. Volume SplitBuy volume = max(volume * (close - low) / (high - low), 0)
    Sell volume = max(volume * (high - close) / (high - low), 0)
  3. Normalization LogicDetect 15:58 candle → latch its rawTotal as reference
    Session extremes = 9:30, 15:59, 16:00 bars
    On extremes: plot total = reference; plot sell = reference * (sell/total)
    All other bars: plot actual rawTotal/split
  4. Labels
    • Plain text (no box) above each extreme bar
    • Shows actual raw volume in K/M format
릴리즈 노트
Update v1.1

  • Added moving average with selectable type (SMA, EMA, WMA, VWMA) and adjustable length — works just like the built-in Volume indicator.
  • Improved the opening bar normalization: the 9:30 bar is now sized using the average volume of the 9:31 bar over the last 5 sessions, rather than the previous day's 3:58 bar. This provides a more relevant reference for the opening spike.


Why shorten session extreme bars?
The 9:30 open and 4:00 close bars typically have 5-10x normal volume due to order accumulation (overnight orders executing at open, MOC orders at close). Left unscaled, these bars dominate the y-axis and compress all other bars into an unreadable sliver. By capping their display height to a reference volume — while preserving the buy/sell ratio and labeling the actual volume — you get a readable chart without losing information.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.