Help with volume and body height histogram?

S

SirYoungMan

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.

Code:
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.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
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));
VolAvg.SetDefaultColor(GetColor(8));

Code:
#
# 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.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Today.SetLineWeight(3);
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));
SpreadAvg.SetDefaultColor(GetColor(8));
 
Last edited by a moderator:
horserider

horserider

Well-known member
VIP
Code:
#
# 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.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
PctChg.SetLineWeight(3);
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));
 
horserider

horserider

Well-known member
VIP
Welcome. Are you Mr. Young?
If so good thing I did not say that was messed up coding. ;) :ROFLMAO:
 

Similar threads

Top