文華指標(biāo)(2011-08-08 21:59:53)
程序化交易 TD:=VOL/REF(VOL,1); MFI:=(HIGH-LOW)/VOL; STICKLINE(TD>1.1&&MFI>=REF(MFI,1),OPEN,CLOSE,COLORGREEN,0); STICKLINE(TD<0.9&&MFI<REF(MFI,1),OPEN,CLOSE,COLORRED,0); STICKLINE(TD<0.9&&MFI>=REF(MFI,1),OPEN,CLOSE,COLORYELLOW,0); STICKLINE(TD>1.1&&MFI<REF(MFI,1),OPEN,CLOSE,COLORWHITE,0); DRAWLINE(TD>1.1&&MFI>REF(MFI,1),HIGH,TD>1.1&&MFI>=REF(MFI,1),LOW,COLORGREEN); DRAWLINE(TD<0.9&&MFI<REF(MFI,1),HIGH,TD<0.9&&MFI<REF(MFI,1),LOW,COLORRED); DRAWLINE(TD<0.9&&MFI>REF(MFI,1),HIGH,TD<0.9&&MFI>=REF(MFI,1),LOW,COLORYELLOW); DRAWLINE(TD>1.1&&MFI<REF(MFI,1),HIGH,TD>1.1&&MFI<REF(MFI,1),LOW,COLORWHITE); 定義x=(最高價-最低價)/成交量
1。當(dāng)天交易量是昨天的1.1倍以上,x 比昨天高,那么今天的顯示綠色。
2。當(dāng)天交易量是昨天的0.9倍以下,x比昨天低,今天顯示紅色。
3。當(dāng)交易量是昨天交易量的0.9倍以下,x比昨天高,顯示黃色。
4。當(dāng)天交易量是昨天的1.1倍以上,x比昨天低,顯示白色。
四周規(guī)則A
H1:=HHV(HIGH,20);
H2:=HHV(HIGH,10);
L1:=LLV(LOW,20);
L2:=LLV(LOW,10);
CROSS(CLOSE,REF(H1,1)),BK;
CROSS(REF(L1,1),CLOSE),SK;
CROSS(CLOSE,REF(H2,1)),BP;
CROSS(REF(L2,1),CLOSE),SP;
分形彼岸
H:=HIGH; L:=LOW; FXH:=REF(H,2)>REF(H,4)&&REF(H,2)>REF(H,3) && REF(H,2)>REF(H,1)&&REF(H,2)>H;
HH:=REF(H,BARSLAST(FXH)+2); FXL:=REF(L,2)<REF(L,4)&&REF(L,2)<REF(L,3) && REF(L,2)<REF(L,1)&&REF(L,2)<L;
LL:=REF(L,BARSLAST(FXL)+2);
MA21:=MA(CLOSE,21);
BKD:=VALUEWHEN(CLOSE>MA21 && CROSS(CLOSE,HH),CLOSE); SKD:=VALUEWHEN(CLOSE<MA21 && CROSS(LL,CLOSE),CLOSE);
CLOSE>MA21 && CROSS(CLOSE,HH),BPK; CLOSE<(BKD-15),SP;
CLOSE<MA21 && CROSS(LL,CLOSE),SPK; CLOSE>(SKD+15),BP;
麥哲倫指標(biāo)
A:=MA(HIGH,20); B:=MA(LOW,20); STICKLINE(CLOSE>B,OPEN,CLOSE,COLORRED,0); STICKLINE(CLOSE<B,OPEN,CLOSE,COLORGREEN,0); DRAWLINE(CLOSE>B,HIGH,CLOSE>B,LOW,COLORRED); DRAWLINE(CLOSE<B,HIGH,CLOSE<B,LOW,COLORGREEN); A1:=A-REF(A,1); BB:=REFX(A1,1); D:=IF(CLOSE>A,1,-1); DRAWSL(D=1,A,BB,1,0,COLORRED); DRAWSL(D=-1,A,BB,1,0,COLORGREEN); B1:=B-REF(B,1); BB2:=REFX(B1,1); D2:=IF(CLOSE>B,1,-1); DRAWSL(D2=1,B,BB2,1,0,COLORRED); DRAWSL(D2=-1,B,BB2,1,0,COLORGREEN);
黎明1分鐘
C:=CLOSE; H:=HIGH; L:=LOW; O:=OPEN; VAR1:=(HHV(HIGH,9)-LLV(LOW,9)); VAR2:=(HHV(HIGH,9)-CLOSE); VAR3:=(CLOSE-LLV(LOW,9)); VAR4:=VAR2/VAR1*100-70 ; VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100; VAR6:=(2*C+H+L)/4; VAR7:=SMA((VAR3/VAR1*100),3,1); VAR8:=LLV(LOW,34); VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1); VAR10:= IF(VAR9>100,VAR9-100,0); VARA:=HHV(HIGH,34); FXA:=VAR10*2; X:=SMA(FXA,2,1); FXB:=EMA((VAR6-VAR8)/(VARA-VAR8)*100,13); B1:=EMA(0.667*REF(FXB,1)+0.333*FXB,2); FXB-B1>0,BPK; FXB-B1<0,SPK;
杜鵑花1分鐘
MA5:=MA(CLOSE,3); MA10:=MA(CLOSE,10); MA20:=MA(CLOSE,20); DM1:= (REF(MA20,2)>REF(MA20,1)&&REF(MA20,1)>MA20); DM2:= (REF(MA10,2)>REF(MA10,1)&&REF(MA10,1)<MA10); GM1:= (REF(MA10,2)<REF(MA10,1)&&REF(MA10,1)<MA10); GM2:= (REF(MA5,2)<REF(MA5,1)&&REF(MA5,1)>MA5); CL0:=CLOSE; CL1:=REF(CLOSE,1); CL2:=REF(CLOSE,2); CL3:=REF(CLOSE,3); TM10:=(CL0>CL1&&CL1>=CL2)&&DM1&&DM2; TM11:=(CL0<CL1&&CL0>=CL2)&&DM1&&DM2; TM20:=(CL0<CL1&&CL1<=CL2)&&GM1&&GM2; TM21:=(CL0>CL1&&CL0<=CL2)&&GM1&&GM2; A:=VALUEWHEN(TM10||TM11,CLOSE); B:=VALUEWHEN(TM20||TM21,CLOSE); TM10||TM11||CROSS(CLOSE,B*1.01),BPK; TM20||TM21||CROSS(A*0.99,CLOSE),SPK;
方向值
FW:=(LOW+OPEN+CLOSE+HIGH)/4; FW1:=EMA(FW,F); FUE:=SLOPE(FW1,2); FU:=FW1-ABS(FUE)-F*6; FU1:=FW1+ABS(FUE)+F*6; MA6:=TSMA(LOW,F*3); MA9:=TSMA(HIGH,F*3); FX1:=SLOPE(MA6,W); FX11:=SLOPE(MA9,W); MA6<FU&&FUE>0&&FX1>0,BPK; MA9>FU1&&FUE<0&&FX11<0,SPK;
綜合擺動指標(biāo)
大師的原始參數(shù) A取為9
HI:=HHV(HIGH,A); DI:=LLV(LOW,A); W1:=((CLOSE-DI)-(HI-CLOSE))/(HI-DI)*50+50; VUP:=IF(W1>=50,VOL,0); VDN:=IF(W1<50,VOL,0); W2:=SUM(VUP,A); Q2:=SUM(VDN,A); MO:=CLOSE-REF(CLOSE,A); MUP:=IF(MO-REF(MO,1)>=0,MO-REF(MO,1),0); MDN:=IF(MO-REF(MO,1)<0,-(MO-REF(MO,1)),0); W3:=SUM(MUP,A); Q3:=SUM(MDN,A); DDI:=EMA(CLOSE,12) - EMA(CLOSE,26); DE:=EMA(DDI,9); MCD:=2*(DDI-DE); MCUP:=IF(MCD-REF(MCD,1) >=0,MCD-REF(MCD,1),0); MCDN:=IF(MCD-REF(MCD,1)<0,-(MCD-REF(MCD,1)),0); W4:=SUM(MCUP,A); Q4:=SUM(MCDN,A); AB:=ABS(CLOSE-REF(CLOSE,1)); STUP:=IF(CLOSE-REF(CLOSE,1)>=0,STD(AB,4),0); STDN:=IF(CLOSE-REF(CLOSE,1)<0,STD(AB,4),0); W5:=SUM(STUP,A); Q5:=SUM(STDN,A); DD:=(CLOSE-LLV(LOW,A))/(HHV(HIGH,A)-LLV(LOW,A))*100; FASTK:=SMA(DD,3,1); K:=SMA(FASTK,3,1); D:=SMA(K,3,1); DUP:=IF(D-REF(D,1)>=0,D-REF(D,1),0); DDN:=IF(D-REF(D,1)<0,-(D-REF(D,1)),0); W6:=SUM(DUP,A); Q6:=SUM(DDN,A); R1:=MA(W1,A)+ W2/(W2+Q2)*100+ W3/(W3+Q3)*100; R2:=W4/(W4+Q4)*100+ W5/(W5+Q5)*100+ W6/(W6+Q6)*100; RSI:((R1+R2)/6),COLORRED; RSIM:MA(RSI,A),COLORYELLOW; RSIMM:MA(RSIM,A),COLORGREEN; P1:80,COLORLIGHTGREY; P11:20,COLORLIGHTGREY; PARTLINE(LOW>0,P1,COLORLIGHTGREY); PARTLINE(LOW>0,P11,COLORLIGHTGREY);
趨勢指針
H:=HIGH; L:=LOW; A:=IF(HIGH>=REF(HIGH,1)&&HIGH>=REF(HIGH,2)&&HIGH>=REF(HIGH,3) &&HIGH>=REF(HIGH,4)&&HIGH>=REF(HIGH,5),LOW,0); B:=IF(LOW<=REF(LOW,1)&&LOW<=REF(LOW,2)&&LOW<=REF(LOW,3) &&LOW<=REF(LOW,4)&&LOW<=REF(LOW,5),HIGH,888888); P1:=IF(A>REF(L,1),REF(L,1),0); P2:=IF(A>REF(L,2)&&A<=REF(L,1),REF(L,2),0); P3:=IF(A>REF(L,3)&&A<=REF(L,1)&&A<=REF(L,2),REF(L,3),0); P4:=IF(A>REF(L,4)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3),REF(L,4),0); P5:=IF(A>REF(L,5)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF(L,4),REF(L,5),0); P6:=IF(A>REF(L,6)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF(L,4)&&A<=REF(L,5),REF(L,6),0); P7:=IF(A>REF(L,7)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF(L,4)&&A<=REF(L,5)&&A<=REF(L,6),REF(L,7),0); P8:=IF(A>REF(L,8)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF
(L,4)&&A<=REF(L,5)&&A<=REF(L,6)&&A<=REF(L,7),REF(L,8),0); P9:=IF(A>REF(L,9)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF
(L,4)&&A<=REF(L,5)&&A<=REF(L,6)&&A<=REF(L,7)&&A<=REF(L,8),REF
(L,9),0); P10:=IF(A>REF(L,10)&&A<=REF(L,1)&&A<=REF(L,2)&&A<=REF(L,3)&&A<=REF
(L,4)&&A<=REF(L,5)&&A<=REF(L,6)&&A<=REF(L,7)&&A<=REF(L,8)&&A<=REF
(L,9),REF(L,10),0); AA:=P1+P2+P3+P4+P5+P6+P7+P8+P9+P10; PP1:=IF(AA>REF(L,1),REF(L,1),0); PP2:=IF(AA>REF(L,2)&&AA<=REF(L,1),REF(L,2),0); PP3:=IF(AA>REF(L,3)&&AA<=REF(L,1)&&AA<=REF(L,2),REF(L,3),0); PP4:=IF(AA>REF(L,4)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3),REF
(L,4),0); PP5:=IF(AA>REF(L,5)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4),REF(L,5),0); PP6:=IF(AA>REF(L,6)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4)&&AA<=REF(L,5),REF(L,6),0); PP7:=IF(AA>REF(L,7)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4)&&AA<=REF(L,5)&&AA<=REF(L,6),REF(L,7),0); PP8:=IF(AA>REF(L,8)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4)&&AA<=REF(L,5)&&AA<=REF(L,6)&&AA<=REF(L,7),REF(L,8),0); PP9:=IF(AA>REF(L,9)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4)&&AA<=REF(L,5)&&AA<=REF(L,6)&&AA<=REF(L,7)&&AA<=REF
(L,8),REF(L,9),0); PP10:=IF(AA>REF(L,10)&&AA<=REF(L,1)&&AA<=REF(L,2)&&AA<=REF(L,3)
&&AA<=REF(L,4)&&AA<=REF(L,5)&&AA<=REF(L,6)&&AA<=REF(L,7)&&AA<=REF
(L,8)&&AA<=REF(L,9),REF(L,10),0); AAA:=PP1+PP2+PP3+PP4+PP5+PP6+PP7+PP8+PP9+PP10; C:=VALUEWHEN(AAA>0,AAA); T1:=IF(B<REF(H,1),REF(H,1),0); T2:=IF(B<REF(H,2)&&B>=REF(H,1),REF(H,2),0); T3:=IF(B<REF(H,3)&&B>=REF(H,1)&&B>=REF(H,2),REF(H,3),0); T4:=IF(B<REF(H,4)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3),REF(H,4),0); T5:=IF(B<REF(H,5)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4),REF(H,5),0); T6:=IF(B<REF(H,6)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4)&&B>=REF(H,5),REF(H,6),0); T7:=IF(B<REF(H,7)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4)&&B>=REF(H,5)&&B>=REF(H,6),REF(H,7),0); T8:=IF(B<REF(H,8)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4)&&B>=REF(H,5)&&B>=REF(H,6)&&B>=REF(H,7),REF(H,8),0); T9:=IF(B<REF(H,9)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4)&&B>=REF(H,5)&&B>=REF(H,6)&&B>=REF(H,7)&&B>=REF(H,8),REF
(H,9),0); T10:=IF(B<REF(H,10)&&B>=REF(H,1)&&B>=REF(H,2)&&B>=REF(H,3)&&B>=REF
(H,4)&&B>=REF(H,5)&&B>=REF(H,6)&&B>=REF(H,7)&&B>=REF(H,8)&&B>=REF
(H,9),REF(H,10),0); BB:=IF((T1+T2+T3+T4+T5+T6+T7+T8+T9+T10)
=0,888888,T1+T2+T3+T4+T5+T6+T7+T8+T9+T10); TT1:=IF(BB<REF(H,1),REF(H,1),0); TT2:=IF(BB<REF(H,2)&&BB>=REF(H,1),REF(H,2),0); TT3:=IF(BB<REF(H,3)&&BB>=REF(H,1)&&BB>=REF(H,2),REF(H,3),0); TT4:=IF(BB<REF(H,4)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3),REF
(H,4),0); TT5:=IF(BB<REF(H,5)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4),REF(H,5),0); TT6:=IF(BB<REF(H,6)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4)&&BB>=REF(H,5),REF(H,6),0); TT7:=IF(BB<REF(H,7)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4)&&BB>=REF(H,5)&&BB>=REF(H,6),REF(H,7),0); TT8:=IF(BB<REF(H,8)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4)&&BB>=REF(H,5)&&BB>=REF(H,6)&&BB>=REF(H,7),REF(H,8),0); TT9:=IF(BB<REF(H,9)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4)&&BB>=REF(H,5)&&BB>=REF(H,6)&&BB>=REF(H,7)&&BB>=REF
(H,8),REF(H,9),0); TT10:=IF(BB<REF(H,10)&&BB>=REF(H,1)&&BB>=REF(H,2)&&BB>=REF(H,3)
&&BB>=REF(H,4)&&BB>=REF(H,5)&&BB>=REF(H,6)&&BB>=REF(H,7)&&BB>=REF
(H,8)&&BB>=REF(H,9),REF(H,10),0); BBB:=TT1+TT2+TT3+TT4+TT5+TT6+TT7+TT8+TT9+TT10; D:=VALUEWHEN(BBB>0,BBB); UD:=IF(CLOSE>D&&REF(CLOSE,1)<=D,1,IF(CLOSE<C&&REF(CLOSE,1)>=C,-3,0)); K:=VALUEWHEN(UD<>0,UD); K>0,BPK; K<0,SPK;
火車軌指標(biāo)
MA1:=MA(HIGH,30); MA2:=MA(LOW,30); STICKLINE(CLOSE<MA2 && CLOSE>=OPEN,OPEN,CLOSE,COLORCYAN,1); STICKLINE(CLOSE<MA2 && CLOSE<OPEN,OPEN,CLOSE,COLORCYAN,0); DRAWLINE(CLOSE<MA2,HIGH,CLOSE>OPEN,CLOSE,COLORCYAN); DRAWLINE(CLOSE<MA2,LOW,CLOSE>OPEN,OPEN,COLORCYAN); DRAWLINE(CLOSE<MA2,HIGH,CLOSE<OPEN,OPEN,COLORCYAN); DRAWLINE(CLOSE<MA2,LOW,CLOSE<OPEN,CLOSE,COLORCYAN); DRAWLINE(CLOSE<MA2,HIGH,CLOSE=OPEN,LOW,COLORCYAN); STICKLINE(CLOSE>MA2 && CLOSE>=OPEN,OPEN,CLOSE,COLORRED,1); STICKLINE(CLOSE>MA2 && CLOSE<OPEN,OPEN,CLOSE,COLORRED,0); DRAWLINE(CLOSE>MA2,HIGH,CLOSE>OPEN,CLOSE,COLORRED); DRAWLINE(CLOSE>MA2,LOW,CLOSE>OPEN,OPEN,COLORRED); DRAWLINE(CLOSE>MA2,HIGH,CLOSE<OPEN,OPEN,COLORRED); DRAWLINE(CLOSE>MA2,LOW,CLOSE<OPEN,CLOSE,COLORRED); DRAWLINE(CLOSE>MA2,HIGH,CLOSE=OPEN,LOW,COLORRED); DRAWLINE(CLOSE>MA1,MA1,OPEN>MA1,MA2,COLORMAGENTA ); DRAWLINE(CLOSE<MA2,MA1,OPEN<MA2,MA2,COLORGREEN ); STICKLINE(CLOSE>=MA2 && CLOSE<=MA1 && CLOSE>=OPEN,OPEN,CLOSE,COLORYELLOW,1); STICKLINE(CLOSE>=MA2 && CLOSE<=MA1 && CLOSE<OPEN,OPEN,CLOSE,COLORYELLOW,0); DRAWLINE(CLOSE>=MA2 && CLOSE<=MA1,HIGH,CLOSE>OPEN,CLOSE,COLORYELLOW); DRAWLINE(CLOSE>=MA2 && CLOSE<=MA1,LOW,CLOSE>OPEN,OPEN,COLORYELLOW); DRAWLINE(CLOSE>=MA2 && CLOSE<=MA1,HIGH,CLOSE<OPEN,OPEN,COLORYELLOW); DRAWLINE(CLOSE>=MA2 && CLOSE<=MA1,LOW,CLOSE<OPEN,CLOSE,COLORYELLOW); DRAWLINE(CLOSE>=MA2 && CLOSE<=MA1,HIGH,CLOSE=OPEN,LOW,COLORYELLOW);
MA3:=MA(HIGH,30); A:=MA3-REF(MA1,1); B:=REFX(A,1); C:=IF(MA3>=REF(MA3,1) && REF(MA3,1)>=REF(MA3,2),1,0); DRAWSL(C=1,MA3,B,1,0,COLORMAGENTA);
MA4:=MA(LOW,30); D:=MA4-REF(MA4,1); E:=REFX(D,1); F:=IF(MA4>=REF(MA4,1) && REF(MA4,1)>=REF(MA4,2),1,0); DRAWSL(F=1,MA4,E,1,0,COLORMAGENTA);
MA5:=MA(HIGH,30); G:=MA5-REF(MA5,1); H:=REFX(G,1); I:=IF(MA5<=REF(MA5,1) && REF(MA5,1)<=REF(MA5,2),1,0); DRAWSL(I=1,MA5,H,1,0,COLORGREEN);
MA6:=MA(LOW,30); J:=MA6-REF(MA6,1); K:=REFX(J,1); L:=IF(MA6<=REF(MA6,1) && REF(MA6,1)<=REF(MA6,2),1,0); DRAWSL(L=1,MA6,K,1,0,COLORGREEN);
火車軌模型
MA30:=MA(CLOSE,30); SG:=(MA(HIGH,30)),COLORWHITE; XG:=(MA(LOW,30)),COLORWHITE;
RSG:=MA(HIGH,0),COLORWHITE; RXG:=MA(LOW,0),COLORWHITE;
FJD:=MA30>=REF(MA30,1) && REF(MA30,1)>=REF(MA30,2); FJK:=MA30<=REF(MA30,1) && REF(MA30,1)<=REF(MA30,2);
FJD && CLOSE>SG,BK; CROSS(XG,CLOSE),SP; FJK && XG>CLOSE,SK; CROSS(CLOSE,SG),BP;
|