I am trying to draw a region when the Plot0 is above Zero line, but it doesn'w work very well as you can check in the picture attached.
My code is as follows:
if(Plot0[0]>=0 && controlcorte) {icorte++; barrascorte=CurrentBar; controlcorte=false;}
if(Plot0[0]<0.05) controlcorte=true;
if(Plot0[0]>0) Draw.Region(this,"tag1"+icorte,(CurrentBar-barrascorte),0,Plot0,Zero,null,Brushes.White,50);
Please, help me to understand what I am doing wrong.
Thanks in advance
Comment