X:=BARSLAST(HIGH=HHV(HIGH,N)); LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1)))); Y:=BARSLAST(LOW=LLV(LOW,N)); HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1)))); A:=BARSLAST(CLOSE>=HH); B:=BARSLAST(CLOSE<=LL); AB:IF(A>B,HH,LL); TM:=CLOSE>=AB; TP:=CLOSE<AB; DRAWLINE(TP,HIGH,TP,OPEN,COLORCYAN); DRAWLINE(TP,LOW,TP,CLOSE,COLORCYAN); DRAWLINE(TM,HIGH,TM,CLOSE,COLORRED); DRAWLINE(TM,LOW,TM,OPEN,COLORRED); STICKLINE(TP,OPEN,CLOSE,COLORCYAN,0); STICKLINE(TM,OPEN,CLOSE,COLORRED,1); HH1:=BARSLAST((HH > REF(HH,1))); LL1:=BARSLAST((LL < REF(LL,1))); n=10,; 變色K線1 MID:=MA(CLOSE,20); UPPER:MID+2*STD(CLOSE,20); LOWER:MID-2*STD(CLOSE,20); V1:=(CLOSE-LOWER)/(UPPER-LOWER)*100; V2:=V1-EMA(V1,5); K1:=SUM(LLV(V2,4),4)/4; V3:=EMA(V2,64)*10; V4:=EMA(0.4*V2*(-1),3); V5:=-1*EMA(V2,39)*10; A:=V3>10; B:=V2>V4; D:=V5>10; E:=V3<=10||V2<=V4||V5<=10; KS:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100); RKS:=REF(KS,1); MLS:=RKS/KS>1.23 && RKS>13 && CLOSE/REF(CLOSE,1)>1.03; DRAWLINE(CLOSE>=OPEN && E,HIGH,CLOSE>=OPEN && E,LOW,COLORRED); STICKLINE(CLOSE>=OPEN && E,CLOSE,OPEN,COLORRED,0); DRAWLINE(CLOSE< OPEN && E,HIGH,CLOSE< OPEN && E,LOW,COLORGREEN); STICKLINE(CLOSE< OPEN && E,CLOSE,OPEN,COLORGREEN,0); DRAWLINE(OPEN> CLOSE && A,LOW,OPEN> CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN> CLOSE && A,CLOSE,OPEN,COLORYELLOW,0); DRAWLINE(OPEN<=CLOSE && A,LOW,OPEN<=CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN<=CLOSE && A,CLOSE,OPEN,COLORYELLOW,1); DRAWLINE(OPEN> CLOSE && B,LOW,OPEN> CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN> CLOSE && B,CLOSE,OPEN,COLORRED,0); DRAWLINE(OPEN<=CLOSE && B,LOW,OPEN<=CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN<=CLOSE && B,CLOSE,OPEN,COLORRED,1); DRAWLINE(OPEN> CLOSE && D,LOW,OPEN> CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN> CLOSE && D,CLOSE,OPEN,COLORGREEN,0); DRAWLINE(OPEN<=CLOSE && D,LOW,OPEN<=CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN<=CLOSE && D,CLOSE,OPEN,COLORGREEN,1); DRAWLINE(KS>13,HIGH,KS>13,LOW,COLORWHITE); DRAWLINE(MLS=1,HIGH,MLS=1,LOW,COLORMAGENTA); STICKLINE(KS>13,OPEN,CLOSE,COLORWHITE,1); STICKLINE(MLS=1,OPEN,CLOSE,COLORMAGENTA,1); HH:=HHV(HIGH,N); LL:=LLV(LOW,N); HH1:=BARSLAST((HH > REF(HH,1))); LL1:=BARSLAST((LL < REF(LL,1))); DRAWTEXT(CROSS(HH1,LL1),HH,'開(kāi)空'); DRAWTEXT(CROSS(LL1,HH1),LL,'開(kāi)多'); T:=IF(HH1>LL1,1,-1); G:=IF(HH1>LL1,HH,LL); DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLORCYAN); DRAWLINE(T=-1&&REF(T,1)=-1,G,T=-1&&REF(T,1)=-1,REF(G,1),COLORRED); 變色K線2 X1:=HHV(HIGH,N1); X2:=LLV(LOW,N2); D1:(X1+X2*2)/3,COLORGREEN; TMP:=D1-CLOSE; DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN); DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN); DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED); DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED); DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE); DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE); STICKLINE(TMP>0.00001,OPEN,CLOSE,COLORCYAN,1); STICKLINE(TMP<-0.00001,OPEN,CLOSE,COLORRED,1); ZQSX:EMA(EMA(C,10),10),NODRAW; B:=ZQSX>REF(ZQSX,1); K:=REFX(ZQSX,1)-ZQSX; DRAWSL(B,ZQSX,K,1,0,COLORRED),LINETHICK2; DRAWSL(NOT(B),ZQSX,K,1,0,COLORBLUE),LINETHICK2; N1,21; N2,7; 變色K線3 X1:=HHV(HIGH,30); X2:=LLV(LOW,90); X3:=LLV(LOW,90); X4:=HHV(HIGH,30); D2:(X3+X4*2)/3,COLORCYAN; D1:(X1+X2*2)/3,COLORYELLOW; TMP1:=D1-CLOSE; TMP2:=D2-CLOSE; DRAWLINE(TMP1>0.00001,HIGH,TMP1>0.00001,OPEN,COLORBLUE); DRAWLINE(TMP1>0.00001,LOW,TMP1>0.00001,CLOSE,COLORBLUE); DRAWLINE(TMP2<-0.00001,HIGH,TMP2<-0.00001,CLOSE,COLORMAGENTA); DRAWLINE(TMP2<-0.00001,LOW,TMP2<-0.00001,OPEN,COLORMAGENTA); DRAWLINE(TMP1<-0.00001&&TMP2>0.00001,HIGH,TMP1<-0.00001&&TMP2>0.00001,OPEN,COLORYELLOW); DRAWLINE(TMP1<-0.00001&&TMP2>0.00001,LOW,TMP1<-0.00001&&TMP2>0.00001,CLOSE,COLORYELLOW); DRAWLINE(ABS(TMP1)<0.00001,LOW,ABS(TMP1)<0.00001,OPEN,COLORWHITE); DRAWLINE(ABS(TMP1)<0.00001,HIGH,ABS(TMP1)<0.00001,OPEN,COLORWHITE); STICKLINE(TMP1>0.00001,OPEN,CLOSE,COLORBLUE,0); STICKLINE(TMP2<-0.00001,OPEN,CLOSE,COLORMAGENTA,0); STICKLINE(TMP1<-0.00001&&TMP2>0.00001,OPEN,CLOSE,COLORYELLOW,0); DRAWSL(OPEN-6>REF(HIGH,1)&&CLOSE>OPEN,OPEN,0,10,0,COLORRED); DRAWSL(OPEN-6>REF(HIGH,1)&&CLOSE<OPEN,OPEN,0,10,0,RGB(255,128,64)); DRAWSL(OPEN+6<REF(LOW,1)&&CLOSE>OPEN,OPEN,0,10,0,COLORYELLOW); DRAWSL(OPEN+6<REF(LOW,1)&&CLOSE<OPEN,OPEN,0,10,0,COLORGREEN); CROSS(C,D2),BK; CROSS(D2,C),SP; CROSS(D1,C),SK; CROSS(C,D1),BP; AUTOFILTER; |
|
來(lái)自: guoke0631 > 《期貨指標(biāo)》