989 vizualizações
The bars are colored exclusively according to volume average:
Ultra high Volume = Volume > Mean Volume * 3.5;
Very high Volume = Volume > (Mean Volume * 2.5) and Volume <= (Mean Volume * 3.5);
High Volume = Volume > (Mean Volume * 1.5) and Volume <= (Mean Volume *2.5);
Medium Volume = Volume > (Mean Volume * 0.5) and volume <= (Mean Volume *1.5);
Low Volume = ( Volume > (Mean Volume * 0.5).
Ultra high Volume = Volume > Mean Volume * 3.5;
Very high Volume = Volume > (Mean Volume * 2.5) and Volume <= (Mean Volume * 3.5);
High Volume = Volume > (Mean Volume * 1.5) and Volume <= (Mean Volume *2.5);
Medium Volume = Volume > (Mean Volume * 0.5) and volume <= (Mean Volume *1.5);
Low Volume = ( Volume > (Mean Volume * 0.5).
Comentários
To make this works flawlessly, replace line 15 by this:
colorbar = ultrahighVol ? color.red : veryhighVol ? color.orange : highVol ? color.yellow : mediumVol ? color.white : color.aqua