当前位置:主页 > 通达信公式 >

5%10%20%及改制前后自适应涨跌停变色源码

时间:2020-08-27    来源:金牛股票公式网 http://www.zxl888.net/   人气:

{涨停颜色粉色,完美区分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;{跌停后回升}


5%10%20%及改制前后自适应涨跌停变色源码



5%10%20%及改制前后自适应涨跌停变色源码 改良版本1
{删除时间限制}
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
STICKLINE((C>=ZTPRICE(REF(CLOSE,1),0.1) AND C=H),O,C,4,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(CLOSE,1),0.1) AND C=L),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),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),L,MIN(C,O),0.1,0),COLORBLUE;{跌停后回升};

5%10%20%及改制前后自适应涨跌停变色源码 改良版本2
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
STICKLINE((C>=ZTPRICE(REF(CLOSE,1),0.1) AND C=H),REF(C,1),H,4,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(CLOSE,1),0.1) AND C=L),REF(C,1),C,4,0),COLORBLUE;
STICKLINE((C>=ZTPRICE(REF(C,1),BK) AND C=H),REF(C,1),C,4,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(C,1),BK) AND C=L),REF(C,1),C,4,0),COLORBLUE;
STICKLINE((H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1)
AND C<H),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),L,MIN(C,O),0.1,0),COLORBLUE;{跌停后回升};

相关文章

发表评论

验证码: 看不清?点击更换

注:网友评论仅供其表达个人看法,并不代表本站立场。

公众号