I found a nice volume code on here a while back, dont remember who created or posted it, however I do not take credit for the code. I am trying to edit.
I'm trying to make this code give me a sense of volume throughout each day, with early high volume possibly indicating institutional buying, line 7, 10 and 11 are giving me errors. can anyone see what I might be doing wrong?
I'm trying to make this code give me a sense of volume throughout each day, with early high volume possibly indicating institutional buying, line 7, 10 and 11 are giving me errors. can anyone see what I might be doing wrong?
Code:
#start code
def AvgVol50 = AbsValue(Ceil(Average(volume(period = “DAY”), 50)));
AddLabel(yes, ” AvgVol 50D=” + AvgVol50, Color.LIGHT_GREEN);
input percentofvolume = 150;
def targetV = percentofvolume * AvgVol150;
def v = volume;
def NT = v <= AvgVol100;
def Watch = v > AvgVol100;
def Ton = v >= targetV;
AddLabel(NT, " No Trade ", Color.RED);
AddLabel(Watch, " Watch ", Color.Yellow);
AddLabel(Ton, " institutional buying ", Color.Green);
#end code