ZDF:=IF(INBLOCK('创业板'), 0.2, IF(INBLOCK('科创板'),0.2,IF(INBLOCK('ST板块'), 0.05, 0.1)));
ZT:=ZTPRICE(REF(C,1),ZDF);
距上个涨停天数:=BARSLAST(去除ST和停牌 AND C=ZT AND GPJYVALUE(15,2,1) 0 AND GPJYVALUE(15,2,1) REF(GPJYVALUE(15,2,1),1));
连板数1:=BARSLASTCOUNT(去除ST和停牌 AND C=ZT AND GPJYVALUE(15,2,1) 0 AND GPJYVALUE(15,2,1) REF(GPJYVALUE(15,2,1),1));
昨距天数1:=REF(距上个涨停天数,连板数1);
连板数2:=REF(连板数1,连板数1+昨距天数1);
昨距天数2:=REF(距上个涨停天数,连板数1+昨距天数1+连板数2);
连板数3:=REF(连板数1,连板数1+昨距天数1+连板数2+昨距天数2);
昨距天数3:=REF(距上个涨停天数,连板数1+昨距天数1+连板数2+昨距天数2+连板数3);
连板数4:=REF(连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3);
昨距天数4:=REF(距上个涨停天数,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4);
连板数5:=REF(连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4+昨距天数4);
昨距天数5:=REF(距上个涨停天数,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4+昨距天数4+连板数5);
连板数6:=REF(连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4+昨距天数4+连板数5+昨距天数5);
算天1:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+昨距天数1+连板数2);
算板1:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+连板数2);
算天2:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3);
算板2:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+连板数2+连板数3);
算天3:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4);
算板3:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+连板数2+连板数3+连板数4);
算天4:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4+昨距天数4+连板数5);
算板4:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+连板数2+连板数3+连板数4+连板数5);
算天5:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+昨距天数1+连板数2+昨距天数2+连板数3+昨距天数3+连板数4+昨距天数4+连板数5+昨距天数5+连板数6);
算板5:=IF(昨距天数1=DRAWNULL,连板数1,连板数1+连板数2+连板数3+连板数4+连板数5+连板数6);
{ZJTS1:昨距天数1;{九毛八公式指标网www.9m8.cn}
ZJTS2:昨距天数2;
ZJTS3:昨距天数3;
ZJTS4:昨距天数4;
ZJTS5:昨距天数5;
LBS1:连板数1;
LBS2:连板数2;
LBS3:连板数3;
LBS4:连板数4;
LBS5:连板数5;
LBS6:连板数6;}
N天1:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL OR 昨距天数1 4,连板数1,算天1));
M板1:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL OR 昨距天数1 4,连板数1,算板1));
N天2:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算天2));
M板2:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算板2));
N天3:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算天3));
M板3:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算板3));
N天4:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算天4));
M板4:=IF(连板数1=0,0,IF(昨距天数1=DRAWNULL,连板数1,算板4));
N天5:=IF(连板数1=0,0,算天5);
M板5:=IF(连板数1=0,0,算板5);
DRAWTEXT(NOT(N天1=M板1),LOW,STRCAT(STRCAT(STRCAT(CON2STR(N天1,0),'天'),CON2STR(M板1,0)),'板'));