节假日专用的话,是不是下面判断是否夜盘的代码就不需要了?
cd:CLOSETIME(4)=CLOSETIME(0);//返回1表示有夜盘,否则没夜盘。仅限国内期货品种
那样的话是不是也能写成下面的
//集合竞价判断 tcon1:=currenttime>085600 andcurrenttime<085800;//无夜盘品种,节假日专用除中金所品种外全部默认无夜盘。 tcon3:=currenttime>092600 andcurrenttime<092800;//中金所品种 集合竞价:if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1);
//连续交易判断 tcon1:=currenttime>090002 andcurrenttime<150010;//无夜盘品种,节假日专用除中金所品种外全部默认无夜盘。 tcon3:=currenttime>093002 andcurrenttime<151510;//中金所品种 连续交易:if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1);
//集合竞价报单结束,205500-210000之间不能撤单,不成交的挂单要撤掉,免影响连续交易发单。 tcon1:=currenttime>090000 andcurrenttime<=090002;//无夜盘品种,节假日专用除中金所品种外全部默认无夜盘。 tcon3:=currenttime>093000 andcurrenttime<=093002;//中金所品种 集竞撤单:if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1);
|