Following code so show alternate Bar count on current day by sudris
I have edit code to add Toggle function to it
But when i Toggle it to NO it show Number on 1 on current bar
Can anyone point out what mistake i am doing in it
I have edit code to add Toggle function to it
But when i Toggle it to NO it show Number on 1 on current bar
Can anyone point out what mistake i am doing in it
iBars = ParamToggle("BarCount","No|Yes",1);
if (iBars)
iBars = BarsSince( Day() != Ref( Day(), -1 ) );
for ( i = BarCount - ( LastValue( iBars ) + 1 ); i < BarCount; i=i+2 )
{
j = abs( ( LastValue( BarCount ) - 2 * i - ( LastValue( iBars - i ) ) - 2 ) );
PlotText( NumToStr( j, 1 ), i, L - L*0.001, colorBlack );
}
if (iBars)
iBars = BarsSince( Day() != Ref( Day(), -1 ) );
for ( i = BarCount - ( LastValue( iBars ) + 1 ); i < BarCount; i=i+2 )
{
j = abs( ( LastValue( BarCount ) - 2 * i - ( LastValue( iBars - i ) ) - 2 ) );
PlotText( NumToStr( j, 1 ), i, L - L*0.001, colorBlack );
}