Help with volume and body height histogram?


New member
Does anyone know how to remove the plotline from a histogram? I have 2 histograms with the same coding (one for volume percent change and the other for body height percent change). The one for volume shows the percent change in the subgraph only which is exactly what I am looking for, but the one for body height has a plotline flowing right the histogram. The settings are the same for both. can anyone tell me what I am doing wrong? Thanks in advance. Here are the scripts for both.

declare lower;
declare zerobase;

input length = 50;

plot Vol = volume;
plot VolAvg = Average(volume, length);
plot PctChg = (Vol - VolAvg) / (VolAvg) * 100;
PctChg.assignValueColor( if PctChg < 0 then color.RED else color.Dark_GREEN);

Vol.DefineColor("Up", Color.UPTICK);
Vol.DefineColor("Down", Color.DOWNTICK);
Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));

# Mr. Young, Inc. (c) 2020

declare lower;
declare zerobase;

input length = 50;

plot Today = BodyHeight();
plot SpreadAvg = Average(BodyHeight(), length);
plot PctChg = (Today - SpreadAvg) / (SpreadAvg) * 100;
PctChg.assignValueColor( if PctChg < 0 then color.RED else color.Dark_GREEN);

Today.DefineColor("Up", Color.UPTICK);
Today.DefineColor("Down", Color.DOWNTICK);
Today.AssignValueColor(if close > close[1] then Today.color("Up") else if close < close[1] then Today.color("Down") else GetColor(1));
Last edited by a moderator:


Well-known member
# Mr. Young, Inc. (c) 2020

declare lower;
declare zerobase;

input length = 50;

def Today = BodyHeight();
def SpreadAvg = Average(today, length);
plot PctChg = (Today - SpreadAvg) / (SpreadAvg) * 100;

PctChg.DefineColor("Up", Color.UPTICK);
PctChg.DefineColor("Down", Color.DOWNTICK);
PctChg.AssignValueColor(if close > close[1] then PctChg.color("Up") else if close < close[1] then PctChg.color("Down") else GetColor(1));

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.