通达信四分天下主图指标公式
2020/6/11 18:02:13
p:=120;
DRAWTEXT_FIX(ISLASTBAR AND PERIOD>=5,0.1,0.1,0,HYBLOCK),COLOR00FF00;
DRAWTEXT_FIX(ISLASTBAR AND PERIOD>=5,0,0.1,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND PERIOD>=5,0.0,0,0,GNBLOCK),COLORYELLOW;
{以上为显示所属板块,地域,概念等}
EE:=CURRBARSCOUNT<=P;
高:=HHV(H,P);
低:=LLV(L,P);
相对:(C-低)/(高-低)*100,NODRAW,COLORFFFF00;
区间:(高-低)/低*100,NODRAW,COLORWHITE;
天:=CONST(高)COLORYELLOW;
地:=CONST(低)COLOR00FF00;
强:=CONST(高*3/4+低*1/4);
中:=CONST(高*1/2+低*1/2);
弱:=CONST(高*1/4+低*3/4);
STICKLINE(EE,天,天,5,0),COLORYELLOW;
STICKLINE(EE,地,地,5,0),COLOR00FF00;
STICKLINE(EE,强,强,1,0),COLORFFFF00;
STICKLINE(EE,中,中,5,0),COLORWHITE;
STICKLINE(EE,弱,弱,1,0),COLOR0099FF;
DT:=H=天;
DL:=L=地;
高T:=BARSLAST(DT);
低T:=BARSLAST(DL);
EH:=BACKSET(ISLASTBAR,BARSLAST(DT)+1);
EL:=BACKSET(ISLASTBAR,BARSLAST(DL)+1);
STICKLINE(EH AND DT,天,地,0,0),COLORRED;
STICKLINE(EL AND DL,天,地,0,0),COLOR00FF00;
DRAWICON(EH AND DT,天*1.02,14);
DRAWICON(EL AND DL,地*0.98,13);
间隔:ABS(高T-低T),COLOR00FF00,NODRAW;
PT:=CONST(间隔);
JX:MA(C,PT),COLORWHITE,LINETHICK2;
DX:MA(C,PT*0.25),COLORYELLOW,LINETHICK2;
AB:=EMA(C,12);
BB:=EMA(C,26);
AO:=(AB-BB);
XH:=EMA(AO,9);
AC:=2*(AO-XH);
KK:=IF(AC>0, 5,-5);
STICKLINE(KK=5,H,L,0.2,0),COLORRED;
STICKLINE(KK=5 AND C>=O,C,O,3,1),COLORRED;
STICKLINE(KK=5 AND C<O,C,O,3,0),COLORRED;
STICKLINE(KK=-5,H,L,0.2,0),COLOR00CC00;
STICKLINE(KK=-5 AND C>=O,C,O,3,1),COLOR00CC00;
STICKLINE(KK=-5 AND C<O,C,O,3,0),COLOR00CC00;
涨停:=IF(1.1*REF(C,1)-C<0.005,1,0);
STICKLINE(涨停,O,C,1,0),COLOR0099FF;
跌停:=IF(C-0.9*REF(C,1)<0.005,1,0);
STICKLINE(跌停,O,C,1,0),COLORBLUE;
{以上为MACD指标定义K线,红色表示金叉区域,绿色为死叉}
D1T:=V=HHV(V,P);
STICKLINE(D1T=1 AND NOT(FINANCE(3)=10),(C+O)/2,O,2,0),COLORYELLOW;
{量能极限K线,黄色}
DRAWICON(CROSS(DX,JX),JX,1);
DRAWICON(CROSS(JX,DX),JX,2);
IF(JX>REF(JX,1),JX,DRAWNULL),COLORRED,LINETHICK2;
IF(DX<REF(DX,1),DX,DRAWNULL),COLOR00FF00,LINETHICK2;
DRAWNUMBER(ISLASTBAR,天,天),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,地,地),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,强,强),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,中,中),COLORWHITE;
DRAWNUMBER(ISLASTBAR,弱,弱),COLOR0099FF;
{以下为高低趋势线}
D1:=H=HHV(H,10);
L1:=L=LLV(L,10);
QL:=BACKSET(ISLASTBAR,BARSLAST(L1)+1);
QH:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
上:REF(H,BARSLAST(D1)),COLORYELLOW,NODRAW;
下:REF(L,BARSLAST(L1)),COLOR00FF00,NODRAW;
STICKLINE(QH,上,上,4,0),COLORYELLOW;
STICKLINE(QL,下,下,4,0),COLOR00FF00;
HS:DRAWLINE(EH AND DT,H,QH AND D1,H,1),COLOR00FFFF;
LB:DRAWLINE(EL AND DL,L,QL AND L1,L,1),COLORFFFF00;
{以下为时间序列竖线,低起为黄色,高起为蓝色}
STICKLINE(EL AND (1+低T=5 OR 1+低T=8 OR 1+低T=13 OR 1+低T=21
OR 1+低T=34 OR 1+低T=55 OR 1+低T=89 OR 1+低T=144 OR 1+低T=233 OR 1+低T=377
OR 1+低T=610 ),天,地,0,0),COLOR00FFFF;
STICKLINE(EH AND (1+高T=5 OR 1+高T=8 OR 1+高T=13 OR 1+高T=21
OR 1+高T=34 OR 1+高T=55 OR 1+高T=89 OR 1+高T=144 OR 1+高T=233 OR 1+高T=377
OR 1+高T=610 ),天,地,0,0),COLORFFFF00;
看股吧 公式 www.kanguba.c om
其它股票公式列表