INPUT:N(10,1,100,1);{可调参数,N天内出现过涨停}
limitc:=if(STRFIND(STKNAME,'S',1),0.05,0.1);{涨跌极限}
uplimit:=intpart(ref(C,1)*(1+limitc)*100+0.5)/100;{涨停价}
dnlimit:=intpart(ref(c,1)*(1-limitc)*100+0.5)/100;{跌停价}
选出:sum(C>uplimit-0.01,N)>0;
本人刚写过,做成选股公式了:
{10日涨停股}
ZT:=(CLOSE/REF(CLOSE,1)-1)*100>9.7;
ZT10:=COUNT(ZT,10)>=1;
BH:=BARSLAST(ZT);
ZT10;
zt:=(c-ref(c,1))/ref(c,1)>0.99;
cz:=exist(zt,10);
hh:=hhv(h,10);
tj:=l/hh*100>9
xg:cz and tj;
10日内有跌停板的票
N:=10; COUNT(C/REF(C,1)<=0.901,N)=1;