Download MetaTrader 5

coundted bars

To add comments, please log in or register
Use the Pocket to paste your content. It is convenient!
Johannes Jilles van Duijn
769
Johannes Jilles van Duijn 2015.03.25 20:17 

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
46469
Roberto Jacobs 2015.03.29 16:11  
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
769
Johannes Jilles van Duijn 2015.03.29 20:01  
3rjfx:

Thanks 
To add comments, please log in or register