我的指标为什么不显示?

 
int counted_bars=IndicatorCounted();
   
   if (counted_bars<0) return(-1);
   if (counted_bars>0) counted_bars--;
 int  limit=Bars-31;

   if(counted_bars>=31) limit=Bars-counted_bars+2;

 

我查了查上面这段代码说是容错代码,但是我加上这段代码后指标就不显示了。但当我把limit值设为常数的时候比如=1111,指标又显示了,请问这是怎么回事啊 

 
d5681794:
int counted_bars=IndicatorCounted();
   
   if (counted_bars<0) return(-1);
   if (counted_bars>0) counted_bars--;
 int  limit=Bars-31;

   if(counted_bars>=31) limit=Bars-counted_bars+2;

 

我查了查上面这段代码说是容错代码,但是我加上这段代码后指标就不显示了。但当我把limit值设为常数的时候比如=1111,指标又显示了,请问这是怎么回事啊 

狗屁的容错代码,本身就是漏洞百出的一段代码
原因: