joshua74133
Member
It says VolAvg is whats wrong. im using this on a speed chart to change the background color to match the volume bars... i know this sounds crazy
Code:
input length = 50;
plot Vol = volume;
plot VolAvg = Average(volume, length);
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));
AssignBackgroundColor( if ("Up")
then Color. GREEN
else Color.CURRENT);
AssignBackgroundColor( if ("Down")
then Color. red
else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));