$VOLD Histogram (lower study)

Tampa2023

New member
VIP
Does anyone have a script for the $VOLD lower study Histogram? NASDAQ and NYSE up volume and down volume ratio. This indicator has been displayed recently on YouTube by SMB Capital.
 
Saw this video as well and decided to code an indicator for it so I'll share here.

Code:
declare lower;

#Variables
#input Uticker = {default "$UVOL", "$UVOL/Q", "$UVOLC", "$UVOLC/Q", "$UVOLI", "$UVOLIC", "$UVOLND", "$UVOLNDC", "$UVOLRL"};
input Uticker = "$UVOL";
input Dticker = "$DVOL";
input advlimit = 3;
input extadvlimit = 6;
input declimit = -3;
input extdeclimit = -6;
def U = close(Uticker);
def D = close(Dticker);
def voldirection = if U > D then 1 else 0;
def UDR = U/D;
def DUR = D/U*-1;

#Plotting
plot vold;
plot advline = advlimit;
plot extadvline = extadvlimit;
plot decline = declimit;
plot extdecline = extdeclimit;
vold = if voldirection == 1 then UDR else DUR;


#Painting Strategies
vold.SetPaintingStrategy(paintingStrategy.SQUARED_HISTOGRAM);
vold.assignValueColor(if vold > extadvline then color.dark_GREEN else if vold < extdecline then color.dark_red else if vold > advline then color.green else if vold < decline then color.red else color.gray);
advline.assignValueColor(color.white);
decline.assignvaluecolor(color.white);


#Vertical Daybreak Lines
AddVerticalLine(SecondsFromTime(0930) == 0, "", Color.GRAY);
 
Here is the $ADD histogram indicator I created to pair with the $VOLD histogram as well since you are probably looking for that as well.

Code:
declare lower;

#Upper and Lower Limit Lines
input advancelimit = 2000;
input declinelimit = -2000;
plot advanceline = advancelimit;
plot declineline = declinelimit;

#Advance Line
def varadvancedecline = if secondstillTime(0930) > 0 then double.nan else close("$ADD");
plot advancedecline = varadvancedecline;
advancedecline.setPaintingStrategy(paintingStrategy.SQUARED_HISTOGRAM);
advancedecline.assignvalueColor(if advancedecline > advanceline then color.green else if advancedecline < declineline then color.red else color.gray);

#Vertical Daybreak Lines
AddVerticalLine(SecondsFromTime(0930) == 0, "", Color.GRAY);
 
Saw this video as well and decided to code an indicator for it so I'll share here.

Code:
declare lower;

#Variables
#input Uticker = {default "$UVOL", "$UVOL/Q", "$UVOLC", "$UVOLC/Q", "$UVOLI", "$UVOLIC", "$UVOLND", "$UVOLNDC", "$UVOLRL"};
input Uticker = "$UVOL";
input Dticker = "$DVOL";
input advlimit = 3;
input extadvlimit = 6;
input declimit = -3;
input extdeclimit = -6;
def U = close(Uticker);
def D = close(Dticker);
def voldirection = if U > D then 1 else 0;
def UDR = U/D;
def DUR = D/U*-1;

#Plotting
plot vold;
plot advline = advlimit;
plot extadvline = extadvlimit;
plot decline = declimit;
plot extdecline = extdeclimit;
vold = if voldirection == 1 then UDR else DUR;


#Painting Strategies
vold.SetPaintingStrategy(paintingStrategy.SQUARED_HISTOGRAM);
vold.assignValueColor(if vold > extadvline then color.dark_GREEN else if vold < extdecline then color.dark_red else if vold > advline then color.green else if vold < decline then color.red else color.gray);
advline.assignValueColor(color.white);
decline.assignvaluecolor(color.white);


#Vertical Daybreak Lines
AddVerticalLine(SecondsFromTime(0930) == 0, "", Color.GRAY);
Is there a way to just display these ratios in a box instead of a histogram?
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
456 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top