Friday, May 15, 2009

A Simple Advance/Decline subpanel



This is a great way to get a simple visual reference to Advances Issues/Declining Issues subpanel into your free study library.


#-----------------------------------------------------begin code

declare lower;

plot data = close("$advn")/close("$decn");
plot data2 = close("$decn")/close("$advn");
plot ZeroLine = 1;
plot Diff = data;
plot Diff2 = data2;
diff.AssignValueColor(if Diff >= 1 then Color.UPTICK else Color.DOWNTICK);
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
diff2.AssignValueColor(if Diff2 >= 1 then Color.downtick else Color.upTICK);
Diff2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
ZeroLine.SetDefaultColor(color.DARK_GRAY);
data.SetDefaultColor(color.green);
data2.SetDefaultColor(color.pink);

#-----------------------------------------------------end code
blog comments powered by Disqus