通达信公式-四种涨停板主图指标公式

01/26/2019

N:=21;
N1:=10;
Q:=10;
TTJ:=BARSLAST((VOL=HHV(VOL,N)));
K0:=TTJ=0;
K111:=SUMBARS(K0,1);
K2:=SUMBARS(K0,2);
K3:=SUMBARS(K0,3);
K4:=SUMBARS(K0,4);
K5:=SUMBARS(K0,5);
K6:=SUMBARS(K0,6);
K7:=SUMBARS(K0,7);
K8:=SUMBARS(K0,8);
K9:=SUMBARS(K0,9);
K10:=SUMBARS(K0,10);
A111:(K111<=30,REF(C,K111-1)*1.002),COLOREA91B5,NODRAW;
AA:STICKLINE(K111<=30,REF(C,K111-1)*1.002,REF(C,K111-1),10,0),COLOREA91B5;
B111:=(K2<=30,REF(C,K2-1)*1.002),COLORWHITE,NODRAW,LINETHICK1;
AA1:=REF(H,N1)=HHV(H,2*N1+1);
QY:=BACKSET(AA1,N1+1);
CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
GDCS13:=CONST(REF(HIGH,GDCS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);
C1:(XG1,GDCS13,GDCS13),COLORRED,NODRAW,LINETHICK1;
STICKLINE(XG1,GDCS13,GDCS13,1,0),COLORRED;
AAA:=(3*C+H+L+O)/6;
VAR21:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR21;
立桩量:=FILTER(TJ1,5);
STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;
{STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;}
三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);
三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));
三日价涨A:=C>=REF(C,1);
三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);
TIM:=IF(DATE<1140214,1,0);
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;
前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;
倍量黄金柱:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
黄金柱:=倍量黄金柱 OR 高量黄金柱;
BACKSET101:=BACKSET(黄金柱,4);
FILTER101:=FILTER(BACKSET101,3);
牛熊线:=SUMBARS(FILTER101,1);
STICKLINE(牛熊线,REF(L,牛熊线-2),REF(L,牛熊线-2),0.0001,0),COLORGREEN;
{DRAWTEXT(ISLASTBAR,REF(L,牛熊线-2)*0.99,CON2STR(REF(L,牛熊线-2),2)),COLORGREEN,LINETHICK1;}
E1:REF(L,牛熊线-2),COLORGREEN,NODRAW,LINETHICK1;
{红心板:吸货板,短线比较稳定;绿心板:中继板,继续上涨中出现;空心板:疯板,要么暴涨,要么止损;蓝心板:自救板,回调中出现。}
DRAWTEXT_FIX(1,0.71,0.995,1,'红心板:吸货板,短线比较稳定;绿心板:中继板,继续上涨中出现;空心板:疯板,要么暴涨,要么止损;蓝心板:自救板,回调中出现。'),COLORRED;
涨停:=BETWEEN(CLOSE/REF(CLOSE,1),1.0984,1.110) AND C=H AND C>O;
EXPMA5:=EXPMA(C,5);
EXPMA13:=EXPMA(C,13);
AB1:=REF(C,10)=HHV(C,2*10+1); BB1:=FILTER(AB1,10); CB1:=BACKSET(BB1,10+1); HBD:=FILTER(CB1,10);
近期压力:REF(C,BARSLAST(HBD)) NODRAW,COLORYELLOW;
STICKLINE(C,近期压力,近期压力,10,0),COLORYELLOW ;DRAWTEXT(ISLASTBAR,近期压力,' 近期压力');
AS1:=REF(C,60)=HHV(C,2*60+1); AS2:=FILTER(AS1,60); AS3:=BACKSET(AS2,60+1); AS4:=FILTER(AS3,60);
长期压力:REF(C,BARSLAST(AS4)) NODRAW COLORBLUE;
STICKLINE(C,长期压力,长期压力,10,0),COLORBLUE;DRAWTEXT(ISLASTBAR,长期压力,' 长期压力');
跌幅:=(C-REF(C,1))/REF(C,1)*100<-4.94;
箱顶:DRAWLINE(跌幅,O,REF(跌幅,1),REF(O,1),1),COLORGREEN LINETHICK2;
DRAWTEXT(ISLASTBAR,箱顶,' 箱顶');
HSL2:=100*VOL/(FINANCE(7)/100);
LH:=SUM(HSL2,5);
LH1:=SUM(HSL2,10);
LH2:=SUM(HSL2,15);
LH3:=SUM(HSL2,21);
换手5:LH,NODRAW,COLORRED;
换手10:LH1,NODRAW,COLORYELLOW;
换手15:LH2,NODRAW,COLORRED;
换手21:LH3,NODRAW,COLORYELLOW;
R1:=(C>REF(C,1) AND C>REF(C,2));R2:=(REF(R1,1) AND C<=REF(C,1) AND C>=REF(C,2));R3:=(REF(R2,1) AND C>=REF(C,1) AND C<=REF(C,2));
R4:=(REF(R3,1) AND C<=REF(C,1) AND C>=REF(C,2));R5:=(REF(R4,1) AND C>=REF(C,1) AND C<=REF(C,2));R6:=(REF(R5,1) AND C<=REF(C,1) AND C>=REF(C,2));
R7:=(REF(R6,1) AND C>=REF(C,1) AND C<=REF(C,2));R8:=(REF(R7,1) AND C<=REF(C,1) AND C>=REF(C,2));R9:=(REF(R8,1) AND C>=REF(C,1) AND C<=REF(C,2));
RA:=(REF(R9,1) AND C<=REF(C,1) AND C>=REF(C,2));RB:=(REF(RA,1) AND C>=REF(C,1) AND C<=REF(C,2));RC:=(REF(RB,1) AND C<=REF(C,1) AND C>=REF(C,2));
RD:=(C<REF(C,1) AND C<REF(C,2));RE:=(REF(RD,1) AND C>=REF(C,1) AND C<=REF(C,2));RF:=(REF(RE,1) AND C<=REF(C,1) AND C>=REF(C,2));
R10:=(REF(RF,1) AND C>=REF(C,1) AND C<=REF(C,2));R11:=(REF(R10,1) AND C<=REF(C,1) AND C>=REF(C,2));R12:=(REF(R11,1) AND C>=REF(C,1) AND C<=REF(C,2));
R13:=(REF(R12,1) AND C<=REF(C,1) AND C>=REF(C,2));R14:=(REF(R13,1) AND C>=REF(C,1) AND C<=REF(C,2));R15:=(REF(R14,1) AND C<=REF(C,1) AND C>=REF(C,2));
R16:=(REF(R15,1) AND C>=REF(C,1) AND C<=REF(C,2));R17:=(REF(R16,1) AND C<=REF(C,1) AND C>=REF(C,2));
R18:=(REF(R17,1) AND C>=REF(C,1) AND C<=REF(C,2));R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13
OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
蓝心板:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1);
RSV9:=(C-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1);出手就赢:=IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0);
绿心板:=(出手就赢=50 OR REF("KDJ.J",1)<0) AND "KDJ.J">0;
红心板:=蓝心板 AND 绿心板;
红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC;
短进:=R19;
青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18;
急速超跌:=(C-MA(C,34))/MA(C,34)*100<-14;品红离场:=R1A;
STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;
STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,C,O,2.8,0),COLOR000055;STICKLINE(红色持股,C,O,2,0),COLOR000088;
STICKLINE(红色持股,C,O,1.5,0),COLOR0000AA;STICKLINE(红色持股,C,O,1,0),COLOR0000CC;STICKLINE(红色持股,C,O,0.5,0),COLOR0000EE;
STICKLINE(青色观望,C,O,2.8,0),COLOR555500;STICKLINE(青色观望,C,O,2,0),COLOR888800;STICKLINE(青色观望,C,O,1.5,0),COLORAAAA00;
STICKLINE(青色观望,C,O,1,0),COLORCCCC00;STICKLINE(青色观望,C,O,0.5,0),COLOREEEE00;CO:=(C-O);
绿心过滤:=IF((蓝心板),DRAWNULL,绿心板);蓝心过滤:=IF((绿心板),DRAWNULL,蓝心板);
STICKLINE(急速超跌,O,C-CO/2,2.8,0),COLOR555555;STICKLINE(急速超跌,O,C-CO/2,2,0),COLOR888888;STICKLINE(急速超跌,O,C-CO/2,1.5,0),COLORAAAAAA;
STICKLINE(急速超跌,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急速超跌,O,C-CO/2,0.5,0),COLOREEEEEE;STICKLINE(短进,O,O+CO/3,2.8,0),COLOR335555;
STICKLINE(短进,O,O+CO/3,2,0),COLOR338888;STICKLINE(短进,O,O+CO/3,1.5,0),COLOR33AAAA;STICKLINE(短进,O,O+CO/3,1,0),COLOR33CCCC;
STICKLINE(品红离场,O,O+CO/3,2.8,0),COLOR550055;STICKLINE(品红离场,O,O+CO/3,2,0),COLOR880088;STICKLINE(品红离场,O,O+CO/3,1.5,0),COLORAA00AA;
STICKLINE(品红离场,O,O+CO/3,1,0),COLORCC00CC;STICKLINE(品红离场,O,O+CO/3,0.5,0),COLOREE00EE;STICKLINE(涨停,O,C,3.6,1),COLORYELLOW;
STICKLINE(涨停 AND 蓝心过滤,O,C,0.4,0),COLORBLUE;STICKLINE(涨停 AND 绿心过滤,O,C,0.4,0),COLORGREEN;STICKLINE(涨停 AND 红心板,O,C,0.4,0),COLORRED;
Z11:=STRCAT(HYBLOCK,' ');
Z21:=STRCAT(Z11,DYBLOCK);
Z31:=STRCAT(Z21,' ');
A1:=C>REF(C,4);
NT:=BARSLASTCOUNT(A1);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORFF00FF;
DRAWTEXT(NT=9,H*1.02,'9'),COLORGREEN;
B1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
AY1:=(BACKSET(TJ21>0,9)ORBACKSET(TJ23>0,NT0))*NT0;
DRAWTEXT(AY1>0,L*0.98,VAR2STR(AY1,0)),COLORFF00FF;
DRAWTEXT(NT0=9,L*0.98,'9'),COLORGREEN;
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,5);
B:=REF(A,1);
持股:STICKLINE(A>B,A,B,4,0),COLOR00FFFF;
总额:=AMOUNT;
买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
买%:=买/AMOUNT*100;
流入:=AMOUNT*买%/10000000000;
流出:=AMOUNT/100000000-流入;
净流:=(流入-流出);
总额2:=SUM(AMOUNT,2);
流入2:=SUM(流入,2);
流出2:=SUM(流出,2);
净流2:=SUM(流入-流出,2);
总额3:=SUM(AMOUNT,3);
流入3:=SUM(流入,3);
流出3:=SUM(流出,3);
净流3:=SUM(流入-流出,3);
总额4:=SUM(AMOUNT,4);
流入4:=SUM(流入,4);
流出4:=SUM(流出,4);
净流4:=SUM(流入-流出,4);
总额5:=SUM(AMOUNT,5);
流入5:=SUM(流入,5);
流出5:=SUM(流出,5);
净流5:=SUM(流入-流出,5);
总额10:=SUM(AMOUNT,10);
流入10:=SUM(流入,10);
流出10:=SUM(流出,10);
净流10:=SUM(流入-流出,10);
画:=CONST(FINDHIGH(总额10,0,190,1));
DRAWTEXT_FIX(1,0.58,0.07,0,'净流(亿):'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.65,0.05,0,'1日'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.71,0.05,0,'2日'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.77,0.05,0,'3日'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.83,0.05,0,'4日'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.89,0.05,0,'5日'),COLORMAGENTA,LINETHICK1;
DRAWTEXT_FIX(1,0.95,0.05,0,'10日'),COLORMAGENTA,LINETHICK1;
DRAWNUMBER_FIX(1,0.65,0.10,0,CONST((净流))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.71,0.10,0,CONST((净流2))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.77,0.10,0,CONST((净流3))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.83,0.10,0,CONST((净流4))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.89,0.10,0,CONST((净流5))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.95,0.10,0,CONST((净流10))),COLORYELLOW;
所属板块:=STRCAT('所属板块: ',STRCAT(STRCAT(STRCAT('  行业 ',HYBLOCK),STRCAT(' 地域
',DYBLOCK)),STRCAT('概念',GNBLOCK)));
总股本:=STRCAT(STRCAT('  总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT('流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
市值:=STRCAT(STRCAT('流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT('上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(总股本,流通盘),市值),上市日期));
{显示设置}
DRAWTEXT_FIX(ISLASTBAR,0.009,0.09,0,所属板块),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR,0.009,0.0001,0,股本市值),COLORGREEN,LINETHICK2;
DRAWTEXT_FIX(C>0,0.078,0.06,0,EXTERNSTR(0,2)),COLORFF00FF,LINETHICK2;
BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORRED,LINETHICK2;
A0:=IF((BARSCOUNT(C)>7),100*((MA(C,7))/(LLV(MA(C,7),7))-1),1);
HSL:=VOL/CAPITAL*100;
B0:=((-((100)*(HHV(H,N)-C))/(HHV(HIGH,N)-LLV(L,N))));
停板:=CROSS(B0,-2);
ZDF:=(C/REF(C,1)-1)*100;
VAR11:=0-((100)*(HHV(HIGH,3)-CLOSE))/(HHV(HIGH,3)-LLV(LOW,3));
涨停1:=(VAR11=0) AND ((HHV(HIGH,3))/(LLV(LOW,3))>1+(15)/(100)) AND ((HHV(HIGH,3))/(LLV(LOW,3))<1+25/100);
STICKLINE(涨停1 OR ZDF>9.9,L-0.4,L-0.4,3,0),COLORRED;
STICKLINE(涨停1 OR ZDF>9.9,L-0.6,L-0.6,3,0),COLORRED;
STICKLINE(停板 AND HSL>4,L-0.6,L-0.6,3,0),COLORRED;

这个通达信四种涨停板主图指标公式是由公式指标网收集提供,更多的通达信公式请你访问:http://gupiao.geren-jianli.org/category/tdx/查看。