编写要求:
统计n日内所有涨停和跌停的公式副图,用于观察股票交易是否活跃,st不算。
公式在线网解答:
去除ST:=IF(NAMELIKE('ST'),0,1) AND IF(NAMELIKE('*ST'),0,1) AND
IF(NAMELIKE('S'),0,1);
涨停:=C/REF(C,1)>1.09465 AND C=H;
跌停:=C/REF(C,1)<=0.91 AND C=L;
N日涨停:IF(去除ST,COUNT(涨停,N),0);
N日跌停:IF(去除ST,COUNT(跌停,N),0);
DRAWNUMBER(CROSS(N日涨停=REF(N日涨停,1),0.5),N日涨停,N日涨停);
DRAWNUMBER(CROSS(N日跌停=REF(N日跌停,1),0.5),N日跌停,N日跌停),COLORYELLOW;