Was wondering if it was possible to show each Histogram bar of Volume on a Lower study as a different color depending on the range of volume. I basically copy/pasted the code from the "VolumeAvg" study and tried to edit it.
These are my current results:
Thanks in advance!
Code:
# Volume Value Color
declare lower;
input length = 50;
plot Vol = volume;
def rng1 = Vol >= 1;
def rng2 = Vol <= 49999;
def rng3 = Vol >= 50000;
def rng4 = Vol <= 99999;
def rng5 = Vol >= 100000;
def rng6 = Vol <= 999999;
def rng7 = Vol >= 1000000;
Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.DefineColor("rng1 && rng2", Color.LIGHT_RED);
Vol.DefineColor("rng3 && rng4", Color.blue);
Vol.DefineColor("rng5 && rng6", Color.green);
Vol.DefineColor("rng7", Color.YELLOW);
These are my current results:
Thanks in advance!