论坛

if(counted_bars>0) counted_bars--;的作用?

int limit; int counted_bars= IndicatorCounted (); //---- last counted bar will be recounted if (counted_bars> 0 ) counted_bars--; limit= Bars -counted_bars; 这是MACD自定义指标代码中一段,我大致理解这段代码的意思,但是有一点不清楚的地方就是: if (counted_bars> 0 ) counted_bars--; 这句话似乎没有必要啊,我注释了这句话,MACD似乎也运行的很好。 我是新手,请高手解释一下,谢谢!