涨停板是K线中常见的一种,也是非常重要的K线,在看盘的时候必须得要注意,所以需要有必要标注出来。
下面两段源码,可以联合一起做成一个指标,也可以分开。
ZTB:=IF(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('SST')
OR NAMELIKE('S*ST') OR NAMELIKE('S ST') ,(C =ZTPRICE(REF(CLOSE,1),0.05) AND C=H),
IF((CODELIKE('688') AND CODELIKE('301') OR (CODELIKE('300') AND DATE =1200824)),
(C =ZTPRICE(REF(CLOSE,1),0.2) AND C=H)
,(C =ZTPRICE(REF(CLOSE,1),0.1)) AND C=H)) AND PERIOD=5;
STICKLINE(ZTB AND PERIOD=5,O,C,3,1),COLORYELLOW;
DTB:=IF(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('SST')
OR NAMELIKE('S*ST') OR NAMELIKE('S ST') ,(C =DTPRICE(REF(CLOSE,1),0.05) AND C=L),
IF((CODELIKE('688') AND CODELIKE('301') OR (CODELIKE('300') AND DATE =1200824)),(C =DTPRICE(REF(CLOSE,1),0.2) AND C=L)
,(C =DTPRICE(REF(CLOSE,1),0.1) AND C=L))) AND PERIOD=5;
STICKLINE(DTB,O,C,3,1),COLORCYAN;{www.9m8.cn 九毛八公式指标网}
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
STICKLINE((C =ZTPRICE(REF(C,1),BK) AND C=H),C,O,2.7,0),COLORFF00FF;{粉色}
STICKLINE((C =DTPRICE(REF(C,1),BK) AND C=L),C,O,2.7,0),COLOR80FF00;{绿色};
DRAWTEXT((C =ZTPRICE(REF(C,1),BK) AND C=H),H*1.04,'涨停'),COLORRED;
DRAWTEXT((C =DTPRICE(REF(C,1),BK) AND C=L),L*0.96,'跌停'),COLORGREEN;