Announcement

Collapse
No announcement yet.

Inverted Volume

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inverted Volume

    Hi fellow esignal users

    can anyone assist me or provide code for inverting bearish volume bars.

    any help or assistance will be greatly appreciated.

    many thanks in advance

  • #2
    jiggly
    The following example shows you a way to invert the volume bar.
    Alex

    PHP Code:
    var vVolume 0;
        
    if(
    your bearish conditions here){
        
    vVolume volume(0)*(-1);
    }else{
        
    vVolume volume(0);

    Comment


    • #3
      thank you Alexis, wishing you allthe best



      function preMain() {

      setPriceStudy(false);
      setStudyTitle("inverted Volume");
      setCursorLabelName("vVolume",0);
      setDefaultBarFgColor(Color.blue,0);
      setPlotType(PLOTTYPE_HISTOGRAM,0);
      setDefaultBarThickness(3,0);
      }



      function main() {
      var vVolume = 0;

      if(open(0) > close(0)){
      vVolume = volume(0)*(-1);
      }else{


      vVolume = volume(0);
      }

      Comment

      Working...
      X