Chicago + IL/USA
Posts: 3 since May 2014
Thanks Given: 1
Thanks Received: 0
|
I wrote a TOS script for break down volume in to bid and ask. The script editor does not show any error, but the charts does not show anything. Could anyone help?
declare lower;
input length = 50;
def volAsk = volume(priceType="ask");
def volBid = volume(priceType="bid");
plot volDif = volAsk-volBid;
plot volDifAvg = Average(volDif, length);
volDif.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volDif.SetLineWeight(3);
volDif.DefineColor("Up", Color.UPTICK);
volDif.DefineColor("Down", Color.DOWNTICK);
volDif.AssignValueColor(if close > close[1] then volDif.color("Up") else if close < close[1] then volDif.color("Down") else GetColor(1));
volDifAvg.SetDefaultColor(GetColor(8));
|