通达信涨跌停变色2个公式分享源码

[复制链接]
查看56 | 回复0 | 2021-8-19 02:02:27 | 显示全部楼层 |阅读模式

以下是通达信涨跌停变色2个公式分享源码(无源码的请下载附件导入)

公式1

{涨跌停显示}

BK:=IF(INBLOCK('创业板'),0.2,IF(INBLOCK('科创板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));

BF:=IF(DATE<=1200823,1,0);

STICKLINE((C=ZTPRICE(REF(C,1),BK) AND C=H),C,O,1.5,0),COLORYELLOW;

STICKLINE((C=DTPRICE(REF(C,1),BK) AND C=L),C,O,-1,0),COLORGREEN;

STICKLINE((C>=ZTPRICE(REF(C,1),0.1) AND C=H) AND BF=1,C,O,1.5,0),COLORYELLOW;

STICKLINE((C<=DTPRICE(REF(C,1),0.1) AND C=L) AND BF=1,C,O,-1,0),COLORGREEN;

STICKLINE((H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1) AND C<H AND BF=1),H,MAX(C,O),0.1,0),COLORMAGENTA;

STICKLINE((L<=DTPRICE(REF(C,1),BK) AND C>L) OR (L<=DTPRICE(REF(CLOSE,1),0.1) AND C>L AND BF=1),L,MIN(C,O),0.1,0),COLORGREEN;

 

 

公式2

涨板:=IFF(NAMEINCLUDE('*')||NAMEINCLUDE('*S')||NAMEINCLUDE('ST'),

C>=ZTPRICE(REF(C,1),0.05) AND C=H AND H>0,

IFF((DATE>=1200824 AND FINANCE(3)=3)||FINANCE(3)=4,

C>=ZTPRICE(REF(C,1),0.20) AND C=H AND H>0,

C>=ZTPRICE(REF(C,1),0.10) AND C=H AND H>0));

跌板:=IFF(NAMEINCLUDE('*')||NAMEINCLUDE('*S')||NAMEINCLUDE('ST'),

C<=DTPRICE(REF(C,1),0.05) AND C=L AND L>0,

IFF((DATE>=1200824 AND FINANCE(3)=3)||FINANCE(3)=4,

C<=DTPRICE(REF(C,1),0.20) AND C=L AND L>0,

C<=DTPRICE(REF(C,1),0.10) AND C=L AND L>0));

DRAWKLINE(H,O,L,C);

STICKLINE(涨板,O,C,3.0,0),COLOR0099FF;

STICKLINE(涨板,O,C,2.0,0),COLOR33BBFF;

STICKLINE(涨板,O,C,0.5,0),COLOR55DDFF;

STICKLINE(涨板,O,C,0.0,0),COLOR99FFFF;

STICKLINE(跌板,O,C,3.0,0),COLOR00AA00;

STICKLINE(跌板,O,C,2.0,0),COLOR00CC00;

STICKLINE(跌板,O,C,0.5,0),COLOR00EE00;

STICKLINE(跌板,O,C,0.0,0),COLOR00FF00;
 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则