This is the built in code of TOS for RelativeVolumeStDev
i however when its charted on a chart i just want to hide (not show) the bars that are under 2.0 times the relative volume.
example pic of what im trying to hide attached
i however when its charted on a chart i just want to hide (not show) the bars that are under 2.0 times the relative volume.
example pic of what im trying to hide attached
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2014-2019
#
declare lower;
declare zerobase;
input length = 60;
input numDev = 2.0;
input allowNegativeValues = no;
def rawRelVol = (volume - Average(volume, length)) / StDev(volume, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = numDev;
RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(3);
RelVol.DefineColor("Above", GetColor(0));
RelVol.DefineColor("Below", GetColor(2));
RelVol.AssignValueColor(if RelVol >= numDev then RelVol.Color("Above") else RelVol.Color("Below"));
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
