最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信最新版135战法主图指标公式

    正文概述    2024-05-04 04:37:06  

    以下是通达信最新版135战法主图指标公式源码和使用说明


    通达信最新版135战法主图指标公式源码:

       A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);B1:=FILTER(A1,3);C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);{高点}

       A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}

       E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}

       H1:=(D1ANDNOT(D2ANDE1 =E2))ORBARSTATUS=2ORBARSCOUNT(CLOSE)=1;

       H2:=D1ANDNOT(D2ANDE1 =E2);

       L1:=D2ANDNOT(D1ANDE1=E2);

       X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1ANDCOUNT(L1,X1) 0,LLVBARS(IF(L1,LOW,10000),X1));

       G1:=F1 REF(F1,1);I1:=BACKSET(G1,2);LD:=I1 REF(I1,1);{过滤后低点}

       L2:=LDORBARSTATUS=2ORBARSCOUNT(CLOSE)=1;

       X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2ANDCOUNT(H2,X2) 0,HHVBARS(IF(H2,HIGH,0),X2));

       G2:=F2 REF(F2,1);I2:=BACKSET(G2,2);HD:=I2 REF(I2,1);{过滤后高点}

       DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,POINTDOT;

       DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT;

       J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1 REF(J1,1);

       DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD) BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;

       A3:=H;B3:=REF(H,REF(BARSLAST(HD),1)+1) REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));

       D3:=A3ANDB3ANDHD;E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3 REF(E3,1);{找出全部长期高点}

       A4:=L REF(L,REF(BARSLAST(LD),1)+1);

       B4:=REF(L,REF(BARSLAST(LD),1)+1);D4:=A4ANDB4ANDLD;E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);LL:=E4 REF(E4,1);{找出全部长期低点}

       DRAWICON(HH,H,5),ALIGN1;DRAWICON(LL,L,4),ALIGN1;

       H3:=HHORBARSTATUS=2ORBARSCOUNT(C)=1;{后面进行过滤,方法同前。只是不用考虑高低点出现在同一K线}

       X3:=REF(BARSLAST(H3),1)+1;F3:=BACKSET(H3ANDCOUNT(LL,X3) 0,LLVBARS(IF(LL,L,POW(10,20)),X3));

       G3:=F3 REF(F3,1);I3:=BACKSET(G3,2);LZ:=I3 REF(I3,1);{长期低点,也可供引用}

       L4:=LZORBARSTATUS=2ORBARSCOUNT(C)=1;

       X4:=REF(BARSLAST(L4),1)+1;F4:=BACKSET(L4ANDCOUNT(HH,X4) 0,HHVBARS(IF(HH,H,-POW(10,20)),X4));

       G4:=F4 REF(F4,1);I4:=BACKSET(G4,2);HZ:=I4 REF(I4,1);{长期高点,也可供引用}

       DRAWLINE(HZ,H,LZ,L,0),COLORGREEN,LINETHICK1;

       DRAWLINE(LZ,L,HZ,H,0),COLORGREEN,LINETHICK1;{长期连线}

       K1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);K2:=K1 REF(K1,1);

       DRAWLINE(K2,IF(HZ,H,L),BARSTATUS=2,C,0),COLORGREEN,LINETHICK1;{最后的长期连线,连在收盘价上}

       UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);

       VV:=UU REF(UU,1);

       WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);

       XX:=WW REF(WW,1);

       DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;

       UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);

       VV2:=UU2 REF(UU2,1);

       WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);

       XX2:=WW2 REF(WW2,1);

       DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;

       前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK3;

       前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK3;

       前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK3;

       前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK3;

       短高:=REF(H,BARSLAST(VV2));

       短低:=REF(L,BARSLAST(VV));

       短比:(C-短低)/(短高-短低),LINETHICK0;

       {以下语句为三角形部分}

       底:REF(L,BARSLAST(VV)),COLORred,LINETHICK2;

       頂:REF(H,BARSLAST(VV2)),COLORGreen,LINETHICK2;

       {下迭三角形:藍色三角形畫完介入}

       StickLine(VV,頂,底,0,0),Colorff6633,linethick3;{}

       DRAWLINE(VV2,H,VV,L,0),Colorff6633,linethick3;{斜}

       DRAWLINE(VV2,H,VV,頂,0),Colorff6633,linethick3;{?}

       {DRAWLINE(c 0,H,VV,L,0),Colorcyan,linethick2;}{斜}

       {DRAWLINE(c 1,H,VV,頂,0),Colorcyan,linethick2;}{?};

       A100:=0;

       B200:=0;

       C300:=0;

       D400:=0;

       EMA13:MA(C,13),COLORYELLOW,LINETHICK2;

       EMA34:MA(C,34),COLORGREEN;

       EMA55:MA(C,55),COLORRED;

       {101红杏出墙}

       HX1:=EMA13 EMA34ANDEMA34 EMA55;{股价长期下跌,并且远离长期}

       HX2:=BArslAST((C-EMA13)/EMA13*100 {收盘价在13均线%6到现在的天数}

       HX3:=Abs(1-EMA55/REF(C,1))

       HX6:=BARSLAST(crOSS(EMA55,EMA34)) {13日均线下降趋于走平}

       HX4:=ABS(1-REF(EMA13,1)/EMA13) 0.004ANDC EMA34;

       HX5:=REF(C,1) EMA13ANDC EMA13ANDC

       HX7:=HX1{ANDHX3}ANDHX4ANDHX5;

       HX8:=HX7ANDFILTER(HX7,10);{满足后10天内不标记}

       红杏出墙:=HX8;

       DRAWTEXT(红杏出墙,L*0.98,'101红杏出墙'),COLORYELLOW;

       A101:红杏出墙*A100,COLORYELLOW,NODRAW;

       {102蚂蚁上树}

       BR1:=COUNT(BETWEEN(((C-O)/O)*100,0,5),5)=5;{5日内收盘价都比前日收盘价高}

       BR2:=(ABS(EMA13-EMA34)+ABS(EMA34-EMA55))/C {主均线相距很近或基本持平}

       BR3:=C EMA55ANDCOUNT(L EMA55,5) {股价送上55日均线}

       MYSS:=BR1ANDBR2ANDBR3;

       蚂蚁上树:=MYSSANDFILTER(MYSS,5);

       DRAWTEXT(蚂蚁上树,L*0.99,'102蚂蚁上树'),COLORYELLOW;

       A102:蚂蚁上树*A100,COLORYELLOW,NODRAW;

       {103马失前蹄}

       MSQT1:=EMA55/EMA13 1.04ANDEMA13/C 1.03;

       MSQT2:=O =REF(L,1)ANDREF(O,1)/REF(C,1) 1.03;

       MSQT:=MSQT1ANDMSQT2;

       DRAWTEXT(MSQT,L*0.98,'103'),COLORYELLOW;

       {104绝处逢生}

       JCFS1:=EMA55 EMA13ANDEMA13

       JCFS2:=O =REF(L,1)ANDC/O 1.05;

       JCFS:=JCFS1ANDJCFS2;

       DRAWTEXT(JCFS,L*0.98,'104'),COLORYELLOW;

       {105金屋藏娇}

       JWCJ1:=C OANDREF(C,1) REF(O,1);

       JWCJ2:=O =REF(C,1)ANDL =REF(L,1);

       JWCJ3:=REF(C,1)/REF(L,1) 1.02;

       JWCJ4:=EMA13 EMA34OREMA13 EMA55;

       JWCJ:=JWCJ1ANDJWCJ2ANDJWCJ3ANDJWCJ4;

       DRAWTEXT(JWCJ,L*0.98,'105'),COLORYELLOW;

       {106日月合璧}

       RYHB1:=REF(O,1) =REF(C,2)ANDREF(C,1) REF(O,1)ANDABS(1-REF(C,1)/REF(L,1)) 0.02;

       RYHB2:=C OANDABS(1-C/REF(O,1)) 0.025ANDABS(1-O/REF(C,1)) 0.025;

       RYHB3:=EMA13 REF(EMA13,1)ORABS(1-EMA13/REF(EMA13,1)) 0.01AND(EMA13 EMA34OREMA13 EMA55);

       RYHB4:=REF(L,1) =LLV(REF(L,1),10);

       RYHB:=RYHB1ANDRYHB2ANDRYHB3ANDRYHB4;

       DRAWTEXT(RYHB,L*0.98,'106'),COLORYELLOW;

       {107破镜重圆}

       PJCY1:=REF(O,1)/REF(C,1) 1.02;

       PJCY2:=O =REF(C,1)ANDC =REF(O,1);

       PJCY3:=(ABS(1-REF(C,1)/EMA55) 0.05ORABS(1-C/EMA55) 0.05ORABS(1-MA(C,2)/EMA55) 0.05);

       PJCY4:=EMA13 EMA55OREMA13 MA(EMA13,5);

       PJCY:=PJCY1ANDPJCY2ANDPJCY3ANDPJCY4;

       DRAWTEXT(PJCY,L*0.98,'107'),COLORYELLOW;

       {108步步高}

       BBG1:=C =REF(C,1)ANDREF(C,1) =REF(C,2);{3日内收盘价都比前日收盘价高}

       BBG2:=V =REF(V,1)ANDREF(V,1) =REF(V,2);{3日内量都比前日量高}

       BBG3:=COUNT(C =O,3)=3;

       BBG:=BBG1ANDBBG2ANDBBG3;

       DRAWTEXT(BBGANDFILTER(BBG,3),L*0.98,'108'),COLORYELLOW;

       {201黑客点击}

       DJ1:=EMA13 EMA34ANDEMA34 EMA55;{13日均线大于34日均线,34日均线小于55日均线}

       DJ2:=O EMA55;{开盘价大于55日均线}

       DJ3:=CROSS(EMA13,EMA55)ORABS(1-EMA13/EMA55) 0.002;

       DJ4:=O CANDC REF(C,1);

       H:=DJ2ANDDJ3ANDDJ4;

       DRAWTEXT(HkdJANDFILTER(HKDJ,10),L*0.97,'201'),COLORRED;

       {202红衣侠女}

       XN1:=ABS(1-HHV(EMA55,5)/LLV(EMA55,5)) 0.02;

       XN2:=CROSS(EMA13,EMA55)ORABS(1-EMA13/EMA55) 0.002;

       XN3:=C OANDV REF(V,1)ANDC EMA55;

       HYXN:=XN1ANDXN2ANDXN3;

       DRAWTEXT(HYXNANDFILTER(HYXN,5),L*0.993,'202红衣侠女'),COLORRED;

       {203海底捞月}

       LY1:=COUNT(ABS(1-EMA55/EMA34) 0.1,20)

       LY2:=COUNT(CROSS(EMA34,EMA13),40) =1ANDCOUNT(CROSS(EMA55,EMA13),40)

       LY3:=CROSS(EMA13,EMA55);

       HDLY:=LY1ANDLY2ANDLY3;

       DRAWTEXT(HDLYANDFILTER(HDLY,5),L*0.97,'203'),COLORRED;

       {204均线互换}

       JXHH:=BARSLAST(REF(CROSS(EMA55,EMA34),1))ANDCROSS(EMA34,EMA55);

       DRAWTEXT(JXHH,L,'204均线互换'),COLORRED;

       {205梅开二度}

       MKED1:=BARSLAST(REF(CROSS(EMA34,EMA13),1));

       MKED2:=COUNT(H =EMA55,MKED1)=MKED1;

       MKED:=MKED2ANDCROSS(EMA13,EMA34);

       DRAWTEXT(MKED,L,'205梅开二度'),COLORRED;

       {206一阳三线}

       YY1:=C EMA13ANDO EMA13;

       YY2:=C EMA34ANDO EMA34;

       YY3:=C EMA55ANDO EMA55;

       YYSX:=YY1ANDYY2ANDYY3;

       DRAWTEXT(YYSX,L*0.97,'206'),COLORRED;

       {207揭竿而起}

       MAX3:=MAX(MAX(EMA13,EMA34),EMA55);

       MIN3:=MIN(MIN(EMA13,EMA34),EMA55);

       JG1:=ABS(EMA13-EMA34) C*0.05;{13线34线55线接近}

       JG2:=ABS(EMA34-EMA55) C*0.05;

       JG3:=C =O*1.03ANDC MAX3;{阳线3%}

       JG4:=O MIN3ANDO MAX3;

       JG5:=C REF(H,5);

       JG6:=(C-EMA34)/EMA34 =0.15;{控制价高}

       JG7:=V MA(V,5)ANDMA(V,10);

       JGEQ:=JG1ANDJG2ANDJG3ANDJG4ANDJG5ANDJG6ANDJG7;

       DRAWTEXT(JGEQ,L,'207揭竿而起'),COLORRED;

       {208三线推进}

       MAX4:=MAX(MAX(MAX(EMA13,EMA34),EMA55),H);

       MIN4:=MIN(MIN(MIN(EMA13,EMA34),EMA55),L);

       SXTJ1:=HHV(MAX4,60);

       SXTJ2:=LLV(MIN4,60);

       SXTJ3:=EVERY(ABS(1-SXTJ1/SXTJ2) 0.3,20);

       SXTJ:=SXTJ3AND(YYSXORJGEQ);

       DRAWTEXT(SXTJANDFILTER(SXTJ,10),L*0.97,'208三线推进'),COLORRED;

       {209双蹄并进}

       STBJ1:=CROSS(.pdi,DMI.mdi);

       STBJ2:=ABS(1-DMI.ADX/DMI.ADXR)

       STBJ:=STBJ1ANDSTBJ2;

       DRAWTEXT(STBJ,L*0.97,'209'),COLORRED;

       {210投石问路}

       TSWL1:=CROSS(EMA13,EMA34)ANDEMA13 EMA55;

       DRAWTEXT(TSWL1,L*0.97,'210'),COLORRED;

       {211三军集结}

       SJJJ3:=REF(EMA55,1) REF(EMA13,1);

       SJJJ4:=ABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55))) 0.005;

       SJJJ:=SJJJ3ANDSJJJ4;

       DRAWTEXT(SJJJANDFILTER(SJJJ,5),L,'211三军集结'),COLORRED;

       {301浪子回头}

       LZ1:=REF(C,2) REF(O,2)ANDREF(C,1) REF(O,1)ANDC

       LZ2:=C =REF(C,1)ANDREF(C,1) =REF(C,2);

       LZ3:=MA(V,3) REF(V,3);

       LZ4:=REF(C,3) EMA13AND(C EMA55ORABS(1-C/EMA55) 0.01);

       LZHT:=LZ1ANDLZ2ANDLZ3ANDLZ4;

       DRAWTEXT(LZHTANDFILTER(LZHT,5),H*1.01,'301'),COLORBLUE;

       {302走四方}

       ZSF1:=REF(C,4) REF(O,4)AND(REF(C,4) EMA13ORREF(C,4) EMA34)AND(ABS(1-REF(EMA55,4)/EMA55) 0.01ORMA(EMA55,4) REF(EMA55,5));

       ZSF2:=COUNT(ABS((1-REF(C,1)/C)*100) 3,4)=4ANDMA(V,4) REF(V,4)*0.8;

       ZSF:=ZSF1ANDZSF2;

       DRAWTEXT(ZSFANDFILTER(ZSF,4),H*1.01,'302'),COLORBLUE;

       {303暗度陈仓}

       ADCC1:=O/C 1.05ANDEMA13/EMA55 1.1ANDEMA13 MA(EMA13,5);

       ADCC2:=O/REF(C,1) 1.03;{V HHV(REF(V,1),5)ANDV/MA(REF(V,1),5)

       ADCC:=ADCC1ANDADCC2;

       DRAWTEXT(ADCC,H*1.01,'303'),COLORBLUE;

       {304一石二鸟}

       YSEN1:=REF(C,2) REF(O,2)ANDREF(C,1) REF(O,1)ANDC

       YSEN2:=REF(C,2) EMA55ANDEMA13 EMA55ANDEMA13 =MA(EMA13,5);

       YSEN3:=REF(V,2) REF(V,1)ANDREF(V,2)

       YSEN:=YSEN1ANDYSEN2ANDYSEN3;

       DRAWTEXT(YSEN,H*1.01,'304'),COLORBLUE;

       {305双飞燕}

       SFY1:=EMA13 EMA34ANDEMA34 EMA55;

       SFY2:=REF(O,1) =REF(C,2)ANDO =REF(C,1)ANDREF(C,2) =REF(O,2);

       SFY3:=COUNT(C OANDC/O 1.02,2)=2ORCOUNT(C OANDO/C 1.02,2)=2;

       SFY4:=V REF(V,1);

       SFY:=SFY1ANDSFY2ANDSFY3ANDSFY4;

       DRAWTEXT(SFYANDFILTER(SFY,2),H*1.01,'305'),COLORBLUE;

       {306三剑客}

       SJK1:=EMA13 EMA34ANDEMA34 EMA55;

       SJK2:=COUNT(C =OANDO/C 1.03,3)=3ANDCOUNT(ABS(1-REF(C,1)/C) 1.03,2)=2;

       SJK:=SJK1ANDSJK2;

       DRAWTEXT(SJKANDFILTER(SJK,3),H*1.01,'306'),COLORBLUE;

       {307四星望月}

       SXWY1:=COUNT(C =OANDC/O 1.03,4)=4;

       SXWY2:=(ABS(EMA13-EMA34)+ABS(EMA34-EMA55))/C {主均线相距很近或基本持平}

       SXWY3:=EMA13 EMA55;

       SXWY:=SXWY1ANDSXWY2ANDSXWY3;

       DRAWTEXT(SXWYANDFILTER(SXWY,5),H*1.01,'307'),COLORBLUE;

       {308星星点灯}

       XXDD1:=ABS(1-C/O)*100 =2.5ANDH/MAX(C,O) 1.03ANDREF(C,1)/REF(O,1) 1.05;

       XXDD2:=O =REF(C,1)ANDABS(1-REF(EMA13,1)/EMA55)

       XXDD:=XXDD1ANDXXDD2;

       DRAWTEXT(XXDD,H*1.01,'308'),COLORBLUE;

       {309小鸟依人}

       XNYR1:=REF(C,1)/REF(O,1) 1.05;

       XNYR2:=O =REF(C,1)ANDABS(1-C/O) 0.02;

       XNYR3:=COUNT(JGEQORYYSXORHYXN,10) =1ANDCOUNT(JGEQORYYSXORHYXN,2)=0;

       XNYR:=XNYR1ANDXNYR2ANDXNYR3;

       DRAWTEXT(XNYR,H*1.01,'309'),COLORBLUE;

       {310立竿见影}

       LGJY1:=O =REF(C,1)ANDV REF(V,1)ANDC

       LGJY2:=COUNT(JGEQORYYSXORHYXN,2)=1;

       LGJY:=LGJY1ANDLGJY2;

       DRAWTEXT(LGJY,H*1.01,'310'),COLORBLUE;

       {401一阴三线}

       YYSX1:=C EMA13ANDO EMA13;{一阴三线}

       YYSX2:=C EMA34ANDO EMA34;

       YYSX3:=C EMA55ANDO EMA55;

       YYYSX:=YYSX1ANDYYSX2ANDYYSX3;

       DRAWTEXT(YYYSX,H,'401'),COLORGREEN;

       {402落井下石}

       LJXS1:=O REF(L,1)ANDEMA13/EMA55 1.05ANDC

       DRAWTEXT(LJXS1,H,'402'),COLORGREEN;

       {403晨钟暮鼓}

       CZMG1:=REF(C,1)/REF(O,1) 1.05ANDREF(V,1)/REF(V,2) 2ANDHSL

       CZMG2:=C OANDV REF(V,1);

       CZMG:=CZMG1ANDCZMG2;

       DRAWTEXT(CZMG,H,'403晨钟暮鼓'),COLORGREEN;

       {404见好就收}

       Y:=(EMA13-EMA55)/EMA13*100;

       JHJX:=REF(Y,1) =10ANDY

       {DRAWICON(JHJX,H,1);}

       DRAWTEXT(JHJX,H,'404'),COLORGREEN;

       {405一枝独秀}

       YZ1:=C/O 1.01ANDH/C 1.025;{收阳有上影}

       YZ2:=EMA13 MAX(EMA34,EMA55)ANDC 1.05*EMA13ANDO MA(C,11);{昨收阳今大于均线}

       YZDX:=YZ1ANDYZ2;

       DRAWTEXT(YZDX,H,'405一枝独秀'),COLORGREEN;

       {406独上高楼}

       DSGL1:=REF(C,1) =REF(O,1);

       DSGL2:=O/REF(C,1) 1.029ANDO/C 1.03ANDO/MAX(EMA13,EMA55) 1.03;

       DSGL:=DSGL1ANDDSGL2;

       DRAWTEXT(DSGL,H,'406独上高楼'),COLORGREEN;

       {407分道扬镳}

       FDYB:=CROSS(EMA34,EMA13)ANDEMA34 EMA55;

       DRAWTEXT(FDYB,H*1.01,'407分道扬镳'),COLORGREEN;

       {408突出重围}

       TCCW1:=REF(EMA55,1) REF(EMA13,1);

       TCCW2:=EMA13 LLV(REF(EMA13,1),5)ANDABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55))) 0.008;

       TCCW:=TCCW1ANDTCCW2;

       DRAWTEXT(TCCWANDFILTER(TCCW,5),H,'408'),COLORGREEN;

       {409明修栈道}

       MXZD1:=C/O 1.07;

       MXZD2:=EMA13 HHV(REF(EMA13,1),5)ANDV HHV(REF(V,1),10)ANDV/MA(REF(V,1),5)

       MXZD:=MXZD1ANDMXZD2;

       DRAWTEXT(MXZD,H,'409'),COLORGREEN;

       {410拖泥带水}

       TNDS1:=O/REF(C,1) 1.05ANDMIN(C,O)/L 1.03;

       TNDS2:=C/MAX(EMA13,EMA55) 1.03ANDC REF(C,1);

       TNDS:=TNDS1ANDTNDS2;

       DRAWTEXT(TNDS,H,'410'),COLORGREEN;

       {411金蝉脱壳}

       JCTQ1:=C OAND(EMA13/EMA55 1.1OR(C/MIN(EMA13,EMA55) 1.1))ANDEMA13 MA(EMA13,5);

       JCTQ2:=REF(O,1) =REF(C,2)ANDREF(C,1) REF(O,1)ANDO =REF(C,1)ANDC REF(O,1);

       JCTQ:=JCTQ1ANDJCTQ2;

       DRAWTEXT(JCTQ,H,'411'),COLORGREEN;

       {412一箭穿心}

       YJCX:=CROSS(EMA55,EMA13);

       DRAWTEXT(YJCX,H,'412'),COLORGREEN;

       {413过河拆桥}

       GHCQ1:=C OANDO/C =1.04;

       GHCQ2:=O EMA13ANDC EMA13;

       GHCQ3:=EMA13/EMA55 1.1ANDABS(1-EMA13/MA(EMA13,3)) 0.02;

       GHCQ:=GHCQ1ANDGHCQ2ANDGHCQ3;

       DRAWTEXT(GHCQ,H,'413'),COLORGREEN;

       {414狗急跳墙}

       GJTQ1:=O/REF(C,1) 1.02ANDL REF(C,1);

       GJTQ2:=V MA(V,5);

       GJTQ3:=EMA13/EMA55

       GJTQ:=GJTQ1ANDGJTQ2ANDGJTQ3;

       DRAWTEXT(GJTQ,H,'414'),COLORGREEN;

       {415一剑封喉}

       YJFH1:=REF(C,1) =REF(O,1);

       YJFH2:=H/MAX(C,O) =1.035;

       YJFH3:=V/MA(REF(V,1),11) 3ANDEMA13/EMA55 1.05;

       YJFH:=YJFH1ANDYJFH2ANDYJFH3;

       DRAWTEXT(YJFH,H,'415'),COLORGREEN;

       {416节外生枝}

       JWSZ1:=EMA13 MAX(EMA34,EMA55)ANDEMA13/EMA55 1.1ANDREF(C,1) 1.04*EMA13ANDREF(C,1)/REF(O,1) 1.04;

       JWSZ2:=ABS(1-C/O) 0.015ANDABS(1-REF(C,1)/C) 0.02;

       JWSZ:=JWSZ1ANDJWSZ2;

       DRAWTEXT(JWSZ,H,'416'),COLORGREEN;

       {417笑里藏刀}

       XLCD1:=REF(H,1)/MAX(REF(C,1),REF(O,1)) 1.04;

       XLCD2:=H REF(H,1)ANDO =REF(C,1);

       XLCD3:=EMA13/EMA55 1.05ANDC/EMA13 1.03;

       XLCD:=XLCD1ANDXLCD2ANDXLCD3;

       DRAWTEXT(XLCD,H,'417'),COLORGREEN;

       DRAWTEXT_FIX(1,0.01,0.01,0,'黄101红杏出墙102蚂蚁上树103马失前蹄104绝处逢生'),COLORYELLOW;

       DRAWTEXT_FIX(1,0.01,0.04,0,'黄105金屋藏娇106日月合壁107破镜重圆108步步高'),COLORYELLOW;

       DRAWTEXT_FIX(1,0.01,0.10,0,'红201黑客点击202红衣侠女203海底捞月204均线互换'),COLORRED;

       DRAWTEXT_FIX(1,0.01,0.13,0,'红205梅开二度206益阳三线207揭竿而起208三线推进'),COLORRED;

       DRAWTEXT_FIX(1,0.01,0.16,0,'红209双蹄并进210投石问路211三军集结'),COLORRED;

       DRAWTEXT_FIX(1,0.3,0.01,0,'蓝301浪子回头302走四方303暗度陈仓304一石二鸟'),COLORBLUE;

       DRAWTEXT_FIX(1,0.3,0.04,0,'蓝305双飞燕306三剑客307四星望月308星星点灯'),COLORBLUE;

       DRAWTEXT_FIX(1,0.3,0.07,0,'蓝309小鸟依人310立竿见影'),COLORBLUE;

       DRAWTEXT_FIX(1,0.6,0.01,0,'绿401一阴三线402落井下石403晨钟暮鼓404见好就收'),COLORGREEN;

       DRAWTEXT_FIX(1,0.6,0.04,0,'绿405一枝独秀406独上高楼407分道扬镳408重围'),COLORGREEN;

       DRAWTEXT_FIX(1,0.6,0.07,0,'绿409明修饯道410拖泥带水411金蝉脱壳412一箭穿心'),COLORGREEN;

       DRAWTEXT_FIX(1,0.6,0.11,0,'绿413过河拆桥414狗急跳墙415一剑封喉416节外生枝417笑里藏刀'),COLORGREEN;

       ma1:MA(CLOSE,5);

       MA2:MA(CLOSE,10);

       {N1:1,100,10;N2:1,100,10;DISP:=1,3,2};

       N1:=10;N2:=10;DISP:=2;

       K:=IF(PERIOD=5,1,{日}

       IF(PERIOD=6,1,{周}

       IF(PERIOD=7,1,{月}

       IF(PERIOD=8,1,{多分钟}

       IF(PERIOD=9,1,{多日}

       IF(PERIOD=10,1,{季}

       IF(PERIOD=11,2,{年}

       IF(PERIOD=4,1,{60F}

       IF(PERIOD=3,1,{30F}

       IF(PERIOD=2,1,{15F}

       IF(PERIOD=1,1{5F},1{1F})))))))))))/10;

       P1:=PEAK(1,K*N1,1);

       P2:=PEAK(1,K*N1,2);

       WP1:=PEAKBARS(1,K*N1,1);

       WP2:=PEAKBARS(1,K*N1,2);

       T1:=TROUGH(2,K*N2,1);

       T2:=TROUGH(2,K*N2,2);

       WT1:=TROUGHBARS(2,K*N2,1);

       WT2:=TROUGHBARS(2,K*N2,2);

       TJ1:=P1 T1ANDP2

       ZD:=MAX(T1,T2);

       ZG:=MIN(P1,P2);

       LL:=MIN(T1,T2);

       HH:=MAX(P1,P2);

       TJ2:=FILTER(ZG ZD,2);

       TJ3:=ZG=REF(ZG,BArslAst(TJ2))ORZD=REF(ZD,BARSLAST(TJ2));

       TJ4:=TJ1 TJ2 NOT(TJ3);

       TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));

       TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));

       TJ7:=ZG REF(ZG,REF(BARSLAST(TJ4),1)) ZD REF(ZD,REF(BARSLAST(TJ4),1));

       TJ8:=TJ4 NOT(TJ5ORTJ6ORTJ7);

       ZSD:=IF(TJ8,ZD,DRAWNULL);

       ZSG:=IF(TJ8,ZG,DRAWNULL);

       ZSH:=IF(TJ8,HH,DRAWNULL);

       ZSL:=IF(TJ8,LL,DRAWNULL);

       STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;

       STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;

       DRAWTEXT(DISP=2,ZSH,'中枢'),COLORRED;

       中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),crOSSDOT,COLORLIRED;

       中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORLIGREEN;

       中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;

       中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;

       高:PLOYLINE(DISP=3,zig(1,K*N1)),COLORLIBLUE;

       局部低点预选A:=BacKSET(LLV(L,5) REF(LLV(L,4),1),4);

       局部低点预选B:=BACKSET(局部低点预选A=0ANDREF(局部低点预选A,1)=1,2);

       局部低点预选C:=IF(局部低点预选B=1ANDREF(局部低点预选B,1)=0,-1,0);

       局部高点预选A:=BACKSET(HHV(H,5) REF(HHV(H,4),1),4);

       局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);

       局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);

       判断:=IF(L REF(H,1),1,IF(H REF(L,1),-1,0));

       距前高天:=BARSLAST(局部高点预选C=1);

       距前低天:=BARSLAST(局部低点预选C=-1);

       小值周期:=LOwrANGE(L);

       大值周期:=topRANGE(H);

       低保留AA:=IF(局部低点预选C=-1ANDREF(距前高天,1) REF(距前低天,1)ANDLLV(L,距前高天+1) REF(LLV(L,距前高天+1),1),-1,0);

       低保留AB:=IF(局部低点预选C=-1ANDREF(距前高天,1) =REF(距前低天,1)AND(距前高天 =4ORLLV(缺口判断,距前高天)=-1ORLLV(L,距前低天+2) REF(LLV(L,距前低天+1),1)),-1,0);

       低保留S:=IF((低保留AA=-1OR低保留AB=-1)ANDL REF(H,距前高天+1),-1,0);

       预判:=IF((距前低天 4ANDHHV(缺口判断,距前低天)!=1)ORREF(低保留S,距前低天)=0,1,0);

       判断:=IF(局部高点预选C=1ANDREF(距前低天,1) =REF(距前高天,1)AND预判=1AND大值周期 REF(小值周期,距前低天+1)AND大值周期 REF(小值周期,距前低天)AND大值周期 REF(大值周期,距前高天),1,0);

       高保留A:=IF(局部高点预选C=1ANDREF(距前低天,1) REF(距前高天,1)ANDHHV(H,距前低天+1) REF(HHV(H,距前低天+1),1),1,0);

       高保留B:=IF(局部高点预选C=1ANDREF(距前低天,1) =REF(距前高天,1)ANDREF(低保留S,距前低天)=-1AND(距前低天 =4ORHHV(缺口判断,距前低天)=1),1,0);

       高保留:=IF((高保留A=1OR高保留B=1OR判断=1)ANDH REF(L,距前低天+1),1,0);

       预判A:=IF((距前高天 4ANDHHV(缺口判断,距前高天)!=1)ORREF(高保留,距前高天)=0,1,0);

       判断A:=IF(局部低点预选C=-1ANDREF(距前高天,1) =REF(距前低天,1)AND预判A=1AND小值周期 REF(大值周期,距前高天+1)AND小值周期 REF(大值周期,距前高天)AND小值周期 REF(小值周期,距前低天),-1,0);

       低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1) REF(距前低天,1)ANDLLV(L,距前高天+1) REF(LLV(L,距前高天+1),1),-1,0);

       低保留B:=IF(局部低点预选C=-1ANDREF(距前高天,1) =REF(距前低天,1)AND(距前高天 =4ORLLV(缺口判断,距前高天)=-1OR判断A=-1),-1,0);

       低保留:=IF((低保留A=-1OR低保留B=-1)ANDL REF(H,距前高天+1),-1,0);

       距前高天A:=BARSLAST(高保留=1);

       距前低天A:=BARSLAST(低保留=-1);

       预判X:=IF((距前低天A 4ANDHHV(缺口判断,距前低天A)!=1)ORREF(低保留,距前低天A)=0,1,0);

       判断X:=IF(局部高点预选C=1ANDREF(距前低天A,1) =REF(距前高天A,1)AND预判X=1AND大值周期 REF(小值周期,距前低天A+1)AND大值周期 REF(小值周期,距前低天A)AND大值周期 REF(大值周期,距前高天A),1,0);

       高保留XA:=IF(局部高点预选C=1ANDREF(距前低天A,1) REF(距前高天A,1)ANDHHV(H,距前低天A+1) REF(HHV(H,距前低天A+1),1),1,0);

       高保留XB:=IF(局部高点预选C=1ANDREF(距前低天A,1) =REF(距前高天A,1)ANDREF(低保留,距前低天A)=-1AND(距前低天A =4ORHHV(缺口判断,距前低天A)=1),1,0);

       高保留X:=IF((高保留XA=1OR高保留XB=1OR判断X=1)ANDH REF(L,距前低天A+1),1,0);

       预判XA:=IF((距前高天A 4ANDHHV(缺口判断,距前高天A)!=1)ORREF(高保留XA,距前高天A)=0,1,0);

       判断XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1) =REF(距前低天A,1)AND预判XA=1AND小值周期 REF(大值周期,距前高天A+1)AND小值周期 REF(大值周期,距前高天A)AND小值周期 REF(小值周期,距前低天A),-1,0);

       低保留XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1) REF(距前低天A,1)ANDLLV(L,距前高天A+1) REF(LLV(L,距前高天A+1),1),-1,0);

       低保留XB:=IF(局部低点预选C=-1ANDREF(距前高天A,1) =REF(距前低天A,1)AND(距前高天A =4ORLLV(缺口判断,距前高天A)=-1OR判断XA=-1),-1,0);

       低保留X:=IF((低保留XA=-1OR低保留XB=-1)ANDL REF(H,距前高天A+1),-1,0);

       距前高天YA:=BARSLAST(高保留X=1);

       距前低天YA:=BARSLAST(低保留X=-1);

       预判YX:=IF((距前低天YA 4ANDHHV(缺口判断,距前低天YA)!=1)ORREF(低保留X,距前低天YA)=0,1,0);

       判断YX:=IF(局部高点预选C=1ANDREF(距前低天YA,1) =REF(距前高天YA,1)AND预判YX=1AND大值周期 REF(小值周期,距前低天YA+1)AND大值周期 REF(小值周期,距前低天YA)AND大值周期 REF(大值周期,距前高天YA),1,0);

       高保留YXA:=IF(局部高点预选C=1ANDREF(距前低天YA,1) REF(距前高天YA,1)ANDHHV(H,距前低天YA+1) REF(HHV(H,距前低天YA+1),1),1,0);

       高保留YXB:=IF(局部高点预选C=1ANDREF(距前低天YA,1) =REF(距前高天YA,1)ANDREF(低保留X,距前低天YA)=-1AND(距前低天YA =4ORHHV(缺口判断,距前低天YA)=1),1,0);

       高保留YX:=IF((高保留YXA=1OR高保留YXB=1OR判断YX=1)ANDH REF(L,距前低天YA+1),1,0);

       预判YXA:=IF((距前高天YA 4ANDHHV(缺口判断,距前高天YA)!=1)ORREF(高保留YXA,距前高天YA)=0,1,0);

       判断YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1) =REF(距前低天YA,1)AND预判YXA=1AND小值周期 REF(大值周期,距前高天YA+1)AND小值周期 REF(大值周期,距前高天YA)AND小值周期 REF(小值周期,距前低天YA),-1,0);

       低保留YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1) REF(距前低天YA,1)ANDLLV(L,距前高天YA+1) REF(LLV(L,距前高天YA+1),1),-1,0);

       低保留YXB:=IF(局部低点预选C=-1ANDREF(距前高天YA,1) =REF(距前低天YA,1)AND(距前高天YA =4ORLLV(缺口判断,距前高天YA)=-1OR判断YXA=-1),-1,0);

       低保留YX:=IF((低保留YXA=-1OR低保留YXB=-1)ANDL REF(H,距前高天YA+1),-1,0);

       AAAD:=IF(高保留YX=1AND低保留YX=-1ANDH REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1AND低保留YX=-1ANDL REF(L,REF(距前低天YA,1)+2),-1,0));

       极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);

       局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL))CIRCLEDOTCOLORYELLOW;

       DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;

       DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;




    通达信最新版135战法主图指标公式截图

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信最新版135战法主图指标公式 加入收藏