Okay, so the most talked about and often most underutilized indicator we have is volume. And I get it, tos gives us beautiful candles and then gives us this boring volume chart underneath as if its an afterthought. So you probably guessed by now, I love pretty volume charts.
Think about all the different types of volume driven price action we get:
It could tell us:
Enjoy!
mod note:
Think about all the different types of volume driven price action we get:
- A ton of small orders comes in with above average volume but the price stays flat
- A few large orders come in and push the price up 1-ATR
- A mix of large and small orders come in and the price goes parabolic
- A mix of large and small orders come in and the stock dumps
It could tell us:
- A large institution is buying up shares quietly, because of the large order they have chosen to break it down into smaller sizes to avoid driving up the price
- Some rich retail investor heard their uncle talk about a new product line about to drop an its going to change the industry
- A, executive order comes out of the white house to shift us away from solar and into nuclear tech for "energy security"
- The company misses earnings and not only is everyone piling out but algorithms and stop losses are triggering
Enjoy!
mod note:
The ToS data feeds do not provide true buyers and sellers volume.
read here for how the amazing @Jman831 created the original indicator:
https://usethinkscript.com/threads/...e-pressure-for-thinkorswim.11739/#post-101477

Code:
declare lower;
##########################
# Configurable Parameters
##########################
input Deviation_Length = 60;
input Deviate = 2;
input Show_Labels = yes;
input Audible_Alert = yes;
input Show_Arrows = yes;
input UseVWAPFilter = yes;
##########################
# Volume Stats & Context
##########################
def volumeStDev = RelativeVolumeStDev(length = Deviation_Length);
def abovedev = volumeStDev >= Deviate;
def increase = volume > volume[1];
def decrease = volume < volume[1];
def devincrease = increase and abovedev;
def devdecrease = decrease and abovedev;
##########################
# Buying vs. Selling Volume
##########################
def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def Buying = if H != L then V * (C - L) / (H - L) else 0;
def Selling = if H != L then V * (H - C) / (H - L) else 0;
##########################
# VWAP Context Filter
##########################
def vwap = VWAP();
def aboveVWAP = close > vwap;
def belowVWAP = close < vwap;
##########################
# Volume Plots
##########################
plot SV = Selling;
SV.AssignValueColor(if devdecrease then Color.PINK else Color.RED);
SV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
SV.SetLineWeight(5);
plot BV = Buying;
BV.AssignValueColor(if devincrease then Color.LIGHT_GREEN else CreateColor(0, 165, 0));
BV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
BV.SetLineWeight(5);
##########################
# Relative Strength Calculation
##########################
def buyStrength = if Average(Buying, Deviation_Length) != 0 then Buying / Average(Buying, Deviation_Length) else 0;
def sellStrength = if Average(Selling, Deviation_Length) != 0 then Selling / Average(Selling, Deviation_Length) else 0;
def buyPct = if Buying + Selling != 0 then Buying / (Buying + Selling) else 0;
def sellPct = 1 - buyPct;
##########################
# Signal Conditions
##########################
def bigBuy = devincrease and buyPct > 0.7;
def bigSell = devdecrease and sellPct > 0.7;
def trendBuy = Buying > Buying[1] and Buying[1] > Buying[2];
def trendSell = Selling > Selling[1] and Selling[1] > Selling[2];
##########################
# Alerts
##########################
Alert(bigBuy and Audible_Alert, "Heavy Buying Surging", Alert.BAR, Sound.Ding);
Alert(bigSell and Audible_Alert, "Heavy Selling Dump", Alert.BAR, Sound.Bell);
##########################
# Arrow Signals
##########################
plot BuyArrow = Show_Arrows and bigBuy and (UseVWAPFilter == no or aboveVWAP);
BuyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BuyArrow.SetDefaultColor(Color.GREEN);
plot SellArrow = Show_Arrows and bigSell and (UseVWAPFilter == no or belowVWAP);
SellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SellArrow.SetDefaultColor(Color.RED);
##########################
# Custom Labels (Your Voice)
##########################
AddLabel(Show_Labels, "Buy Vol = " + Round(Buying, 0) +
(if devincrease then " 🚀 Big Surge" else ""),
if Buying > Selling then Color.GREEN else Color.DARK_GRAY);
AddLabel(Show_Labels, "Buy %: " + Round(buyPct * 100, 1) + "%" +
(if buyPct > 0.7 then " | Buyers in Control" else if buyPct < 0.3 then " | Sellers Dominating" else " | Meh"),
if buyPct > 0.7 then Color.LIGHT_GREEN else if buyPct < 0.3 then Color.RED else Color.GRAY);
AddLabel(Show_Labels, "Sell Vol = " + Round(Selling, 0) +
(if devdecrease then " 🔻 Major Dump" else ""),
if Selling > Buying then Color.RED else Color.DARK_GRAY);
AddLabel(Show_Labels, "Sell %: " + Round(sellPct * 100, 1) + "%" +
(if sellPct > 0.7 then " | Nasty Pressure" else if sellPct < 0.3 then " | Soft Sellers" else " | Mixed Bag"),
if sellPct > 0.7 then Color.PINK else if sellPct < 0.3 then Color.GRAY else Color.LIGHT_GRAY);
AddLabel(Show_Labels and trendBuy, "3-Bar Buy Momentum Building 📈", Color.CYAN);
AddLabel(Show_Labels and trendSell, "3-Bar Sell Pressure Mounting 📉", Color.ORANGE);
AddLabel(Show_Labels, "VWAP: " + Round(vwap, 2) + (if aboveVWAP then " | Above VWAP" else " | Below VWAP"),
if aboveVWAP then Color.GREEN else Color.RED);
Last edited: