以下是通达信涨跌停变色主图指标公式源码和截图
通达信k线涨跌停变色主图指标公式源码:
HW:=(H-LLV(L,N1))/(HHV(H,N1)-LLV(L,N1))*110-55;
CW:=(C-LLV(L,N1))/(HHV(H,N1)-LLV(L,N1))*110-55;
OW:=(O-LLV(L,N1))/(HHV(H,N1)-LLV(L,N1))*110-55;
LW:=(L-LLV(L,N1))/(HHV(H,N1)-LLV(L,N1))*110-55;
DRAWKLINE(HW,OW,LW,CW);
MC1:MA(CW,2),colorred;
MC2:MA(MC1,2),coloryellow;
MC3:MA(MC2,2),colorgreen;
MC4:MA(MC3,2),colorcyan;
MC5:MA(MC4,2),colorblue;
水平:0,colorwhite;
超买:50,colorred;
超卖:-50,colorblue;
VERLINE(MONTH REF(MONTH,1),2);
NE:=IF(NAMELIKE('S')ORNAMELIKE('*S'),0.05,0.1);{通用个股/ST股}
:=C/REF(C,1)-1 =NE-0.01/REF(C,1)ANDC=HANDPERIOD=5;{仅在日线上变色}
stICKLINE(涨停,C,O,-1,0),COLORFF00F5;
跌停:=REF(C,1)/C-1 =NE-0.01/REF(C,1)ANDL=CANDPERIOD=5;
STICKLINE(跌停,C,O,-1,0),COLOR00FF00;
{曾涨跌停k线变色}
曾涨停:=H/REF(C,1)-1 =NE-0.01/REF(C,1)ANDC HANDPERIOD=5;
STICKLINE(曾涨停,H-(H-MAX(O,C)),H,0,0),COLORFF00B5;
曾跌停:=REF(C,1)/L-1 =NE-0.01/REF(C,1)ANDL CANDPERIOD=5;
STICKLINE(曾跌停,L+(MIN(O,C)-L),L,0,0),COLOR00BB00;
{涨跌停开盘K线变色}
涨停开盘:=O/REF(C,1)-1 =NE-0.01/REF(C,1)ANDO=HANDPERIOD=5;{阴阳线的十分之一变色}
STICKLINE(涨停开盘,C+(O-C)*0.9,O,-1,0),COLORFF00F5;
跌停开盘:=REF(C,1)/O-1 =NE-0.01/REF(C,1)ANDL=OANDPERIOD=5;
STICKLINE(跌停开盘,C-(C-O)*0.9,O,-1,0),COLOR00FF00;
N:=20;
涨跌力度:=(C-REF(C,1))*V;
MZ:MA(涨跌力度,N),COLORLIBLUE;
0,COLORBLUE;
STICKLINE(MZ 0,0,MZ,2,0),COLORRED;
STICKLINE(MZ 0,0,MZ,1.5,0),COLOR0000AA;
STICKLINE(MZ 0,0,MZ,1,0),COLOR0000CC;
STICKLINE(MZ 0,0,MZ,0.5,0),COLOR0000FF;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,0,MZ,2,0),COLOR64004B;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,0,MZ,1.5,0),COLOR780062;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,0,MZ,1,0),COLOR8F006D;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,0,MZ,0.5,0),COLORA2007C;
STICKLINE(MZ 0,MZ,0,2,0),COLORE33539;
STICKLINE(MZ 0,MZ,0,1.5,0),COLOREB7153;
STICKLINE(MZ 0,MZ,0,1,0),COLORF19373;
STICKLINE(MZ 0,MZ,0,0.5,0),COLORF6B297;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,MZ,0,2,0),COLOR103667;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,MZ,0,1.5,0),COLOR184785;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,MZ,0,1,0),COLOR1B4F93;
STICKLINE(MZ REF(MZ,1)ANDMZ 0,MZ,0,0.5,0),COLOR205AA7;
通达信k线涨跌停变色主图指标公式截图