cd:CLOSETIME(4)=CLOSETIME(0);//返回1表示有夜盘,否则没夜盘。仅限国内期货品种 //集合竞价判断 tcon1:=currenttime>085600 andcurrenttime<085800;//无夜盘品种 tcon2:=currenttime>205600 andcurrenttime<205800;//有夜盘品种 tcon3:=currenttime>092600 andcurrenttime<092800;//中金所品种 集合竞价:if(cd,tcon2,if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1)); //连续交易判断 tcon1:=currenttime>090002 andcurrenttime<150010;//无夜盘品种 tcon2:=TIMEZONECONVER(currenttime)>010002and TIMEZONECONVER(currenttime)<063010;//有夜盘品种,这里必须转换为金字塔时间进行判断。否则白盘北京时间是小于21000的。 tcon3:=currenttime>093002 andcurrenttime<151510;//中金所品种 连续交易:if(cd,tcon2,if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1)); //集合竞价报单结束,205500-210000之间不能撤单,不成交的挂单要撤掉,免影响连续交易发单。 tcon1:=currenttime>090000 andcurrenttime<=090002;//无夜盘品种 tcon2:=currenttime>210000 andcurrenttime<=210002;//有夜盘品种 tcon3:=currenttime>093000 andcurrenttime<=093002;//中金所品种 集竞撤单:if(cd,tcon2,if(LOWERSTR(MARKETLABEL)='zj',tcon3,tcon1));
|