N=8; RC:=REVERSE(C); RO:=REVERSE(O); RH:=REVERSE(L); RL:=REVERSE(H); RMA5:MA(RC,5); RMA10:MA(RC,10); RMA20:MA(RC,20); RMA30:MA(RC,30); RMA60:MA(RC,60),COLOR4080FF; RMA120:MA(RC,120); RMA250:MA(RC,250); R七號(hào)線:EMA(RC,7); STICKLINE(RC>RO, RO, RC, 8, 1),COLORRED; STICKLINE(RC<RO, RO, RC, 8, 0),COLORFFFF00; STICKLINE(RC=RO, RO, RC, 8, 1),COLORRED; STICKLINE(RC<=RO,RH,RL,0.3,0 ),COLORFFFF00; STICKLINE(RC>RO,RC,RH,0.3,0),COLORRED; STICKLINE(RC>RO,RO,RL,0.3,0),COLORRED; {新結(jié)構(gòu)波浪+三角形} AA12:=REF(HIGH,3)=HHV(HIGH,2*3+1); BB1:=FILTER(AA12,3); CC1:=BACKSET(BB1,3+1); qq1:=FILTER(CC1,3);{高點(diǎn)} AA2:=REF(LOW,3)=LLV(LOW,2*3+1); BB2:=FILTER(AA2,3); CC2:=BACKSET(BB2,3+1); qq2:=FILTER(CC2,3);{低點(diǎn)} EE1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; EE2:=(HIGH+LOW)/2; HH1:=(qq1 AND NOT(qq2 AND EE1>=EE2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; LL1:=(qq2 AND NOT(qq1 AND EE1<EE2)); HH2:=qq1 AND NOT(qq2 AND EE1>=EE2); XX1:=REF(BARSLAST(HH1),1)+1; FF1:=BACKSET(HH1 AND COUNT(LL1,XX1)>0,LLVBARS(IF(LL1,LOW,10000),XX1)); GG1:=FF1>REF(FF1,1); II1:=BACKSET(GG1,2); LDD:=II1>REF(II1,1); LL2:=LDD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; XX2:=REF(BARSLAST(LL2),1)+1; FF2:=BACKSET(LL2 AND COUNT(HH2,XX2)>0,HHVBARS(IF(HH2,HIGH,0),XX2)); GG2:=FF2>REF(FF2,1); II2:=BACKSET(GG2,2); HDD:=II2>REF(II2,1); {DRAWLINE(LDD,L,HDD,H,0),COLORWHITE,LINETHICK1,POINTDOT; DRAWLINE(HDD,H,LDD,L,0),COLORWHITE,LINETHICK1,POINTDOT;} JJ1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HDD),BARSLAST(LDD))+1); JJ2:=JJ1>REF(JJ1,1); {DRAWLINE(JJ2,IF(HDD,H,L),BARSTATUS=2,IF(BARSLAST(HDD)>BARSLAST(LDD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;} UU:=BACKSET(BARSTATUS=2,BARSLAST(LDD)+1); VV:=UU>REF(UU,1); WW:=BACKSET(VV,REF(BARSLAST(LDD),1)+2); XX:=WW>REF(WW,1); {DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;} UU2:=BACKSET(BARSTATUS=2,BARSLAST(HDD)+1); VV2:=UU2>REF(UU2,1); WW2:=BACKSET(VV2,REF(BARSLAST(HDD),1)+2); XXX2:=WW2>REF(WW2,1); YY2:=BACKSET(XXX2,REF(BARSLAST(HDD),1)+2); ZZZ2:=YY2>REF(YY2,1); {DRAWLINE(XXX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;} 底:-REF(L,BARSLAST(VV)),COLORred,LINETHICK2; 頂:-REF(H,BARSLAST(VV2)),Colorff6633,LINETHICK2; {StickLine(VV,頂,底,0,0),Colorff6633,linethick2; DRAWLINE(VV2,H,VV,L,0),Colorff6633,linethick2; StickLine(VV2 ,頂,底,0,0),Colorred,linethick2;} {DRAWLINE(VV,L,VV2,H,0),Colorred,linethick2;} {前二低:"1波浪主圖.前二低#day",COLORyellow,LINETHICK1; 前一高:"1波浪主圖.前一高#day",COLORRED,LINETHICK1;} 財(cái)線2:-REF(H,BARSLAST(XXX2)),PRECIS2,COLORFFFF00; {財(cái)線3:REF(H,BARSLAST(ZZZ2)),PRECIS2,COLOR4080FF;} A1:=ref(h,N)=hhv(h,2*N+1); B1:=filter(A1,N); C1:=backset(B1,N+1); W1:=filter(C1,N);{高點(diǎn)} A2:=ref(l,N)=llv(l,2*N+1); B2:=filter(A2,N); C2:=backset(B2,N+1); W2:=filter(C2,N);{低點(diǎn)} E1:=(ref(llv(l,2*N),1)+ref(hhv(h,2*N),1))/2; E2:=(h+l)/2;{高低點(diǎn)出現(xiàn)在同一K線上時(shí)可作取舍} H1:=(W1 AND not(W2 AND E1>=E2)) OR barstatus=2 OR barscount(c)=1; L1:=(W2 AND not(W1 AND E1<E2)); H2:=W1 AND not(W2 AND E1>=E2); X1:=ref(barslast(H1),1)+1; F1:=backset(H1 AND count(L1,X1)>0,llvbars (if(L1,l,10000),X1)); G1:=F1>ref(F1,1); I1:=backset(G1,2); LD:=I1>ref(I1,1);{過濾后低點(diǎn)} L2:=LD OR barstatus=2 OR barscount(c)=1; X2:=ref(barslast(L2),1)+1; F2:=backset(L2 AND count(H2,X2)>0,hhvbars (if(H2,h,0),X2)); G2:=F2>ref(F2,1); I2:=backset(G2,2); HD:=I2>ref(I2,1);{過濾后高點(diǎn)} R1:=backset(barstatus=2,barslast(HD)+1); S5:=R1>ref(R1,1); {前一高} T1:=backset(barstatus=2,barslast(LD)+1); U1:=T1>ref(T1,1); {前一低} R2:=backset(S5,ref(barslast(HD),1)+2); S2:=R2>ref(R2,1); {前二高} T2:=backset(U1,ref(barslast(LD),1)+2); U2:=T2>ref(T2,1); {前二低} T3:=backset(U2,ref(barslast(LD),1)+2); U3:=T3>ref(T3,1); {前三低} T4:=backset(U3,ref(barslast(LD),1)+2); U4:=T4>ref(T4,1); {前四低} R3:=backset(S2,ref(barslast(HD),1)+2); S3:=R3>ref(R3,1); {前三高} R4:=backset(S3,ref(barslast(HD),1)+2); S4:=R4>ref(R4,1); {前四高} drawline(-S2,-h,-S5,-h,1),Coloryellow,LINETHICK2;{短期壓力} drawline(-U2,-l,-U1,-l,1),Colorgreen,LINETHICK2;{短期支撐} drawline(-S3,-h,-S2,-h,1),Colorred;{中期壓力} drawline(-U3,-l,-U2,-l,0),Colorred;{中期支撐} drawline(-S4,-h,-S3,-h,1),COLORwhite;{長期壓力} drawline(-U4,-l,-U3,-l,0),COLORwhite;{長期支撐};
|