Download MetaTrader 5

coundted bars

To add comments, please log in or register
Johannes Jilles van Duijn
797
Johannes Jilles van Duijn  

Hi i would like a maximun of 1000 bars in my indicators how do i do this ?

tia

 if(counted_bars<0) return(-1);

   if(counted_bars>0) counted_bars--;

           limit=MathMin(Bars-counted_bars,Bars-1);

           if (returnBars) { t3[0] = MathMin(limit+1,Bars-1); return(0); }

Roberto Jacobs
48765
Roberto Jacobs  
Wansiman:

Hi i would like a maximun of 1000 bars in my indicators how do i do this ?

tia



limit=MathMin(Bars-counted_bars,1000);
Johannes Jilles van Duijn
797
Johannes Jilles van Duijn  
3rjfx:

Thanks 
To add comments, please log in or register