通达信跟庄BOLL主图指标公式

[复制链接]
查看120 | 回复0 | 2021-8-20 11:15:00 | 显示全部楼层 |阅读模式

M:=20;
N:=4;
BOLL:MA(CLOSE,M);
UB:BOLL+2*STD(CLOSE,M);
LB:BOLL-2*STD(CLOSE,M);
高:=REF(HHV(H,72),5);
龙门:REFDATE(高,DATE),COLORWHITE,LINETHICK2;
TM:=1200823;
涨停:IF(DATE<TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE<TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE<TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE<TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ZT:=C>=涨停 AND PERIOD=5 AND H=C;
ZT1:=H>=涨停 AND PERIOD=5 AND H>C;
DT:=C<=跌停 AND PERIOD=5 AND L=C;
DT1:=L<=跌停 AND PERIOD=5 AND L<C;
{涨停K线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,'地天板'),COLORCC00CC;{从跌停到涨停}
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
DRAWTEXT(DT1,L-0.09,'撬'),COLORCC00CC;{从涨停到跌停};
DRAWTEXT(ZT1,H+0.03,'炸'),COLOR00CC00;{从涨停到跌停};
假阴:=REF(C>=O,1) AND AMOUNT/V/100>REF(C,1) AND C<O;
假阳:=REF(C<=O,1) AND H<REF(O,1) AND C<(REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100<REF(C,1) AND C>O;
STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳};
JJ:=(C+H+L)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
STICKLINE(A>B,A,B,2,0),COLORYELLOW;
STICKLINE(A<B,A,B,2,0),COLORBLUE;
月线:=WMA(C,21);
月角:=ATAN((月线/REF(月线,1)-1)*100)*180/3.1416,NODRAW;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N) AND ZT;
E1:=BARSLAST(D1 );
STICKLINE(D1,BOLL,UB,2,0),COLORRED;
GX:=(O<LB AND C>LB) OR (O<BOLL AND C>BOLL) OR (O<UB AND C>UB);
缩量:=V<0.8*HHV(V,20);{量小于20天内最高量的0.8倍}
选股:=CROSS(C,REF(H,E1)) AND GX AND V<=REF(V,E1)*1.2 AND 月角>30,NODRAW;
STICKLINE(选股,LB,BOLL,0.1,0),COLORGREEN;
STICKLINE(选股,UB,BOLL,0.1,0),COLORRED;
市值:(FINANCE(40)/100000000),NODRAW,COLORRED;
股东占流通比:100*FINVALUE(244)/FINVALUE(239),NODRAW;
历史衰退系数:100/(100-股东占流通比),NODRAW;
{板块排名}
TAX:=HORCALC(HYBLOCK,105,1,DRAWNULL);
TAA:=STRCAT(HYBLOCK,' 排名 :');
DRAWTEXT_FIX(ISLASTBAR,0.70,0.005,0,STRCAT(TAA,CON2STR(TAX,0)));

202108201113.jpg

202108201113.jpg

 

回复

使用道具 举报

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

本版积分规则