onbarclose用于日线图,要不要写if(time == 0) ,是不是不写也没关系

OnBarClose(ArrayRef<Integer> indexs){if(time == 0) //日线图上,这句要不要写,还是不写也没有关系??{sell(0,close);BuyToCover(0,close);Commentary(\"收盘平仓\");}

为什么要写time==0...这是想表达什么业务逻辑