精 彩 内 容 呈 现
N:=(0,1,1);
ZYGA:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
ZYGB:=BACKSET(ZYGA=0 AND REF(ZYGA,1)=1,2);
ZYGC:=IF(ZYGB=1 AND REF(ZYGB,1)=0,-1,0);
章鱼哥A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
章鱼哥B:=BACKSET(章鱼哥A=0 AND REF(章鱼哥A,1)=1,2);
章鱼哥C:=IF(章鱼哥B=1 AND REF(章鱼哥B,1)=0,1,0);
QKPD:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
JQTG:=BARSLAST(章鱼哥C=1);
JQDD:=BARSLAST(ZYGC=-1);
XZZQ:=LOWRANGE(L);
DZZQ:=TOPRANGE(H);
DBLAA:=IF(ZYGC=-1 AND REF(JQTG,1)>REF(JQDD,1) AND LLV(L,JQTG+1)<REF(LLV(L,JQTG+1),1),-1,0);
DBLAB:=IF(ZYGC=-1 AND REF(JQTG,1)<=REF(JQDD,1) AND (JQTG>=4 OR LLV(QKPD,JQTG)=-1 OR LLV(L,JQDD+2)<REF(LLV(L,JQDD+1),1)),-1,0);
DBLS:=IF((DBLAA=-1 OR DBLAB=-1) AND L<REF(H,JQTG+1),-1,0);
DTIME:=11;
A:=H=HHV(H,DTIME*5) AND HHV(H,DTIME*5)>REF(HHV(H,DTIME*5),1);
B:=L=LLV(L,DTIME*5) AND LLV(L,DTIME*5)<REF(LLV(L,DTIME*5),1);
CC1:DRAWLINE(A,H,B,L,0),LINETHICK2,COLOR0000FF;
CC2:DRAWLINE(B,L,A,H,0),LINETHICK2,COLOR0000FF;
YP:=IF((JQDD<4 AND HHV(QKPD,JQDD)!=1) OR REF(DBLS,JQDD)=0,1,0);
PD:=IF(章鱼哥C=1 AND REF(JQDD,1)<=REF(JQTG,1) AND YP=1 AND DZZQ>REF(XZZQ,JQDD+1) AND DZZQ>REF(XZZQ,JQDD) AND DZZQ>REF(DZZQ,JQTG),1,0);
GBLA:=IF(章鱼哥C=1 AND REF(JQDD,1)>REF(JQTG,1) AND HHV(H,JQDD+1)>REF(HHV(H,JQDD+1),1),1,0);
GBLB:=IF(章鱼哥C=1 AND REF(JQDD,1)<=REF(JQTG,1) AND REF(DBLS,JQDD)=-1 AND (JQDD>=4 OR HHV(QKPD,JQDD)=1),1,0);
GBL:=IF((GBLA=1 OR GBLB=1 OR PD=1) AND H>REF(L,JQDD+1),1,0);
YPA:=IF((JQTG<4 AND HHV(QKPD,JQTG)!=1) OR REF(GBL,JQTG)=0,1,0);
PDA:=IF(ZYGC=-1 AND REF(JQTG,1)<=REF(JQDD,1) AND YPA=1 AND XZZQ>REF(DZZQ,JQTG+1) AND XZZQ>REF(DZZQ,JQTG) AND XZZQ>REF(XZZQ,JQDD),-1,0);
DBLA:=IF(ZYGC=-1 AND REF(JQTG,1)>REF(JQDD,1) AND LLV(L,JQTG+1)<REF(LLV(L,JQTG+1),1),-1,0);
DBLB:=IF(ZYGC=-1 AND REF(JQTG,1)<=REF(JQDD,1) AND (JQTG>=4 OR LLV(QKPD,JQTG)=-1 OR PDA=-1),-1,0);
DBL:=IF((DBLA=-1 OR DBLB=-1) AND L<REF(H,JQTG+1),-1,0);
JQTGA:=BARSLAST(GBL=1);
JQDDA:=BARSLAST(DBL=-1);
YPX:=IF((JQDDA<4 AND HHV(QKPD,JQDDA)!=1) OR REF(DBL,JQDDA)=0,1,0);
PDX:=IF(章鱼哥C=1 AND REF(JQDDA,1)<=REF(JQTGA,1) AND YPX=1 AND DZZQ>REF(XZZQ,JQDDA+1) AND DZZQ>REF(XZZQ,JQDDA) AND DZZQ>REF(DZZQ,JQTGA),1,0);
GBLXA:=IF(章鱼哥C=1 AND REF(JQDDA,1)>REF(JQTGA,1) AND HHV(H,JQDDA+1)>REF(HHV(H,JQDDA+1),1),1,0);
GBLXB:=IF(章鱼哥C=1 AND REF(JQDDA,1)<=REF(JQTGA,1) AND REF(DBL,JQDDA)=-1 AND (JQDDA>=4 OR HHV(QKPD,JQDDA)=1),1,0);
GBLX:=IF((GBLXA=1 OR GBLXB=1 OR PDX=1) AND H>REF(L,JQDDA+1),1,0);
YPXA:=IF((JQTGA<4 AND HHV(QKPD,JQTGA)!=1) OR REF(GBLXA,JQTGA)=0,1,0);
PDXA:=IF(ZYGC=-1 AND REF(JQTGA,1)<=REF(JQDDA,1) AND YPXA=1 AND XZZQ>REF(DZZQ,JQTGA+1) AND XZZQ>REF(DZZQ,JQTGA) AND XZZQ>REF(XZZQ,JQDDA),-1,0);
DBLXA:=IF(ZYGC=-1 AND REF(JQTGA,1)>REF(JQDDA,1) AND LLV(L,JQTGA+1)<REF(LLV(L,JQTGA+1),1),-1,0);
DBLXB:=IF(ZYGC=-1 AND REF(JQTGA,1)<=REF(JQDDA,1) AND (JQTGA>=4 OR LLV(QKPD,JQTGA)=-1 OR PDXA=-1),-1,0);
DBLX:=IF((DBLXA=-1 OR DBLXB=-1) AND L<REF(H,JQTGA+1),-1,0);
章鱼A:=BARSLAST(GBLX=1);
章鱼LA:=BARSLAST(DBLX=-1);
YPYX:=IF((章鱼LA<4 AND HHV(QKPD,章鱼LA)!=1) OR REF(DBLX,章鱼LA)=0,1,0);
PDYX:=IF(章鱼哥C=1 AND REF(章鱼LA,1)<=REF(章鱼A,1) AND YPYX=1 AND DZZQ>REF(XZZQ,章鱼LA+1) AND DZZQ>REF(XZZQ,章鱼LA) AND DZZQ>REF(DZZQ,章鱼A),1,0);
GBLYXA:=IF(章鱼哥C=1 AND REF(章鱼LA,1)>REF(章鱼A,1) AND HHV(H,章鱼LA+1)>REF(HHV(H,章鱼LA+1),1),1,0);
GBLYXB:=IF(章鱼哥C=1 AND REF(章鱼LA,1)<=REF(章鱼A,1) AND REF(DBLX,章鱼LA)=-1 AND (章鱼LA>=4 OR HHV(QKPD,章鱼LA)=1),1,0);
GBLYX:=IF((GBLYXA=1 OR GBLYXB=1 OR PDYX=1) AND H>REF(L,章鱼LA+1),1,0);
YPYXA:=IF((章鱼A<4 AND HHV(QKPD,章鱼A)!=1) OR REF(GBLYXA,章鱼A)=0,1,0);
PDYXA:=IF(ZYGC=-1 AND REF(章鱼A,1)<=REF(章鱼LA,1) AND YPYXA=1 AND XZZQ>REF(DZZQ,章鱼A+1) AND XZZQ>REF(DZZQ,章鱼A) AND XZZQ>REF(XZZQ,章鱼LA),-1,0);
DBLYXA:=IF(ZYGC=-1 AND REF(章鱼A,1)>REF(章鱼LA,1) AND LLV(L,章鱼A+1)<REF(LLV(L,章鱼A+1),1),-1,0);
DBLYXB:=IF(ZYGC=-1 AND REF(章鱼A,1)<=REF(章鱼LA,1) AND (章鱼A>=4 OR LLV(QKPD,章鱼A)=-1 OR PDYXA=-1),-1,0);
DBLYX:=IF((DBLYXA=-1 OR DBLYXB=-1) AND L<REF(H,章鱼A+1),-1,0);
AAAD:=IF(GBLYX=1 AND DBLYX=-1 AND H>REF(H,REF(章鱼A,1)+2),1,IF(GBLYX=1 AND DBLYX=-1 AND L<REF(L,REF(章鱼LA,1)+2),-1,0));
JDBL:=IF(AAAD=0,GBLYX+DBLYX,AAAD);DRAWTEXT_FIX(C>O,0,0.2,0,'更多实用指标公式,请关注微信公众号:通达信指标公式'),COLOR333333;
JBJD:IF(JDBL=-1,L,IF(JDBL=1,H,DRAWNULL)),CIRCLEDOT,COLORLIMAGENTA;DRAWTEXT_FIX(1,0.07,1,0,''),COLORC0C0C0;
DRAWTEXT(JDBL=1,JBJD,'卖'),COLORFFFFFF;DRAWTEXT(JDBL=-1,JBJD,'买'),COLORFFFFFF;
C1:DRAWLINE(JDBL=-1,JBJD,JDBL=1,JBJD,0),DOTLINE,COLORWHITE;
C2:DRAWLINE(JDBL=1,JBJD,JDBL=-1,JBJD,0),DOTLINE,COLORWHITE;
JD:=IF(N=1,C2=C1 AND 章鱼哥A AND JDBL=1,DRAWNULL);
Μ×:=IF(N=1,C2=C1 AND ZYGA AND JDBL=-1,DRAWNULL);
A1:=BARSLAST(JD);B1:=CURRBARSCOUNT=CONST(A1)+1;D1:=BARSLAST(B1); SS1:=CONST(REF(H,D1));
A2:=REF(A1,A1+1)+A1+1;B2:=CURRBARSCOUNT=CONST(A2)+1;D2:=BARSLAST(B2); SS2:=CONST(REF(H,D2));
A3:=REF(A2,A1+1)+A1+1;B3:=CURRBARSCOUNT=CONST(A3)+1;D3:=BARSLAST(B3); SS3:=CONST(REF(H,D3));
DA1:=BARSLAST( Μ×);DB1:=CURRBARSCOUNT=CONST(DA1)+1;DD1:=BARSLAST(DB1); 低1:=CONST(REF(L,DD1));
DA2:=REF(DA1,DA1+1)+DA1+1;DB2:=CURRBARSCOUNT=CONST(DA2)+1;DD2:=BARSLAST(DB2); 低2:=CONST(REF(L,DD2));
DA3:=REF(DA2,DA1+1)+DA1+1;DB3:=CURRBARSCOUNT=CONST(DA3)+1;DD3:=BARSLAST(DB3); 低3:=CONST(REF(L,DD3));
SJXFDA:= 低1< 低2 AND SS2> SS1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)> 低2;
ZSA1:=IF(SJXFDA AND CONST(C)< SS1,DB2,DRAWNULL);
STICKLINE(ZSA1,CONST(C), 低2,0,0),COLORLIMAGENTA;
ZSA2:=IF(SJXFDA AND CONST(C)< SS1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSA2,CONST(C), 低2,0,0),COLORLIMAGENTA;
DRAWLINE(ZSA1=1,CONST(C),ZSA2=1,CONST(C),0),DOTLINE,COLORLIMAGENTA;
DRAWLINE(ZSA1=1, 低2,ZSA2=1, 低2,0),COLORLIMAGENTA;
ZSAC1:=IF(SJXFDA AND CONST(C)>= SS1,DB2,DRAWNULL);
STICKLINE(ZSAC1, SS1, 低1,0,0),COLORLIMAGENTA;
ZSAC2:=IF(SJXFDA AND CONST(C)>= SS1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSAC2, SS1, 低1,0,0),COLORLIMAGENTA;
DRAWLINE(ZSAC1=1, SS1,ZSAC2=1, SS1,0),COLORLIMAGENTA;
DRAWLINE(ZSAC1=1, 低1,ZSAC2=1, 低1,0),COLORLIMAGENTA;
SJXFDB:= 低1> 低2 AND SS1> SS2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)< SS2;
鱼哥1:=IF(SJXFDB AND CONST(C)> 低1,B2,DRAWNULL);
STICKLINE(鱼哥1,CONST(C), SS2,0,0),COLORGREEN;
鱼哥2:=IF(SJXFDB AND CONST(C)> 低1,ISLASTBAR,DRAWNULL);
STICKLINE(鱼哥2,CONST(C), SS2,0,0),COLORGREEN;
DRAWLINE(鱼哥1=1, SS2,鱼哥2=1, SS2,0),COLORGREEN;
DRAWLINE(鱼哥1=1,CONST(C),鱼哥2=1,CONST(C),0),DOTLINE,COLORGREEN;
鱼哥C1:=IF(SJXFDB AND CONST(C)<= 低1,B2,DRAWNULL);
STICKLINE(鱼哥C1, SS2, 低1,0,0),COLORGREEN;
鱼哥C2:=IF(SJXFDB AND CONST(C)<= 低1,ISLASTBAR,DRAWNULL);
STICKLINE(鱼哥C2, SS2, 低1,0,0),COLORGREEN;
DRAWLINE(鱼哥C1=1, SS2,鱼哥C2=1, SS2,0),COLORGREEN;
DRAWLINE(鱼哥C1=1, 低1,鱼哥C2=1, 低1,0),COLORGREEN;
SJXSLA:= 低1> 低2 AND SS2> SS1 AND DA2>A1 AND A1>DA1 AND A2>DA2 AND CONST(C)> 低1;
ZSC1:=IF(SJXSLA AND CONST(C)< SS1,DB2,DRAWNULL);
STICKLINE(ZSC1,CONST(C), 低1,0,0),COLORYELLOW;
ZSC2:=IF(SJXSLA AND CONST(C)< SS1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSC2,CONST(C), 低1,0,0),COLORYELLOW;
DRAWLINE(ZSC1=1,CONST(C),ZSC2=1,CONST(C),0),DOTLINE,COLORYELLOW;
DRAWLINE(ZSC1=1, 低1,ZSC2=1, 低1,0),COLORYELLOW;
ZSCC1:=IF(SJXSLA AND CONST(C)>= SS1,DB2,DRAWNULL);
STICKLINE(ZSCC1, SS1, 低1,0,0),COLORYELLOW;
ZSCC2:=IF(SJXSLA AND CONST(C)>= SS1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSCC2, SS1, 低1,0,0),COLORYELLOW;
DRAWLINE(ZSCC1=1, SS1,ZSCC2=1, SS1,0),COLORYELLOW;
DRAWLINE(ZSCC1=1, 低1,ZSCC2=1, 低1,0),COLORYELLOW;
SJXSLB:= 低1> 低2 AND SS1< SS2 AND DA1>A1 AND A2>DA1 AND DA2>A2 AND CONST(C)< SS1;
ZSD1:=IF(SJXSLB AND CONST(C)> 低1,B2,DRAWNULL);
STICKLINE(ZSD1,CONST(C), SS1,0,0),COLORLICYAN;
ZSD2:=IF(SJXSLB AND CONST(C)> 低1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSD2,CONST(C), SS1,0,0),COLORLICYAN;
DRAWLINE(ZSD1=1, SS1,ZSD2=1, SS1,0),COLORLICYAN;
DRAWLINE(ZSD1=1,CONST(C),ZSD2=1,CONST(C),0),DOTLINE,COLORLICYAN;
ZSDC1:=IF(SJXSLB AND CONST(C)<= 低1,B2,DRAWNULL);
STICKLINE(ZSDC1, SS1, 低1,0,0),COLORLICYAN;
ZSDC2:=IF(SJXSLB AND CONST(C)<= 低1,ISLASTBAR,DRAWNULL);
STICKLINE(ZSDC2, SS1, 低1,0,0),COLORLICYAN;
DRAWLINE(ZSDC1=1, SS1,ZSDC2=1, SS1,0),COLORLICYAN;
DRAWLINE(ZSDC1=1, 低1,ZSDC2=1, 低1,0),COLORLICYAN;
VAR3:=LLV(H,240);
VAR4:=100*(C-VAR3)/VAR3;
VAR5:=(C-LLV(L,528))/(HHV(H,528)-LLV(L,528))*100;
VAR6:=(C-LLV(C,530))/(HHV(C,530)-LLV(C,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND H>L+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(C,2)-EMA(C,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
APP:=(VOL)/((H-L)*(2)-ABS(C-O));
ZL:=IF((H>O),(APP)*(H-L),IF((L<O),(APP)*(H-O+C-L),(VOL)/(2)));
SF:=IF((H>O),0-(APP)*(H-C+O-L),IF((L<O),0-(APP)*(H-L),0-(VOL)/(2)));
库存能量:=MA(ZL+SF,2);
库存平均:=MA(ZL+SF,5);
GET:=ZIG(3,5),COLORYELLOW,LINETHICK3;
PL5:=ZIG(3,5);
EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);
EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
PL10:=ZIG(3,10);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);
EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
PL20:=ZIG(3,20);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);
EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN2 AND DTJZ10=1,L*0.97,' [类2买]'),COLORFFFFFF;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.97,'[1买]'),COLORFFFFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'[2卖]'),LINETHICK2,COLORFFFFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.97,'[2买]'),LINETHICK2,COLORFFFFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.03,'[1卖]'),LINETHICK3,COLORFFFFFF;
M:=20;T:=10;
M1:MA(C,M),COLORMAGENTA,LINETHICK2;
判:IF(M1<REF(M1,1),M1,DRAWNULL),COLORGREEN,LINETHICK2;
使用说明:
无
.点击下方通达信指标公式公众号名片,关注星标后,每天免费获取更多精彩指标公式!
温馨提示
如果你喜欢本文,请分享到朋友圈,想要获得更多信息,请关注我。