5%10%20%及改制前后自适应涨跌停变色源码
略微修改自坛内其他老的源码
{涨停颜色粉色,完美区分20%10%5%,创业板20200823前10%照样变色}
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
XA_1:=IF(DATE =1200823,1,0);{}
STICKLINE((C =ZTPRICE(REF(CLOSE,1),0.1) AND C=H) AND XA_1=1,O,C,4,0),COLORRED;
STICKLINE((C =DTPRICE(REF(CLOSE,1),0.1) AND C=L) AND XA_1=1,O,C,4,0),COLORBLUE;
STICKLINE((C =ZTPRICE(REF(C,1),BK) AND C=H),C,O,4,0),COLORRED;
STICKLINE((C =DTPRICE(REF(C,1),BK) AND C=L),C,O,4,0),COLORBLUE;
STICKLINE((H =ZTPRICE(REF(C,1),BK) AND C H) OR (H =ZTPRICE(REF(CLOSE,1),0.1) AND C H AND XA_1=1),H,MAX(C,O),0.1,0),COLORRED;{涨停后回落}
STICKLINE((L =DTPRICE(REF(C,1),BK) AND C L) OR (L =DTPRICE(REF(CLOSE,1),0.1) AND C L AND XA_1=1),L,MIN(C,O),0.1,0),COLORBLUE;{跌停后回升}