日均價(jià):=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
JF1:=SMA(SMA(EMA(日均價(jià),5)*2-MA(日均價(jià),5),3,1),3,1),COLOR999900; 補(bǔ)償:=FLOOR(((JF1-MA(JF1,5))/MA(JF1,5)*100)); 操作線:=SMA(SMA((EMA(日均價(jià),(5+ABS(補(bǔ)償)))),2,1),2,1),COLORWHITE LINETHICK4; 上軌:=操作線+2*STD(日均價(jià),10),COLORA08888; 下軌:=操作線-2*STD(日均價(jià),10); DRAWBAND(上軌,RGB(100,300,150),操作線,RGB(100,300,130)); DRAWBAND(下軌,RGB(50,50,50),操作線,RGB(100,100,300)); D_D:=MA(IF(L<=LLV(L,13),1,0),3); C_D1:=(3*C+2*O+L+H)/7; WMA5:(5*C_D1+4*REF(C_D1 ,1 )+3*REF(C_D1 ,2 )+2*REF(C_D1 ,3 )+REF(C_D1 ,4 ))/15 COLORYELLOW; C_D2:REVERSE(C_D1)+2*WMA5 COLORGREEN; DRAWBAND(WMA5,RGB(205,92,92),C_D2,RGB(28,134,238)); DRAWICON(CROSS(C_D2,WMA5*0.997),H*1.005,2); DRAWICON(CROSS(WMA5,C_D2*0.997),L*0.995,1); F:=C/O; STICKLINE(F>=1,C,O,2.8,1),COLORRED; STICKLINE(F>=1,C,H,0.00001,0),COLORRED; STICKLINE(F>=1,L,O,0.00001,0),COLORRED; STICKLINE(F<1,C,O,2.8,0),COLORCYAN; STICKLINE(F<1,O,H,0.00001,0),COLORCYAN; STICKLINE(F<1,L,C,0.00001,0),COLORCYAN; TYP := (HIGH + LOW + CLOSE)/3; CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6)); 差值1:=ABS(REF(CCI1,1)-CCI1); CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10)); CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20)); CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30)); CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60)); 差值5:=ABS(REF(CCI5,1)-CCI5); CCI:=CCI1+CCI2+CCI3+CCI4+CCI5; AAA:=(3*C+H+L+O)/6; VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3) +4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36; TJ111:=(ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5)) OR (VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1); VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3; VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3; 下跌:=IF(VAR1=VAR6,VAR6, DRAWNULL),COLORGREEN; 立樁量3:=FILTER(TJ111,5); TJ222:=IF(BARSLAST(立樁量3)=1 AND CLOSE>REF(HIGH,1),1, IF(BARSLAST(立樁量3)=2 AND CLOSE>REF(HIGH,2),1, IF(BARSLAST(立樁量3)=3 AND CLOSE>REF(HIGH,3),1,0))); 突破3:=TJ222=1; STICKLINE(CLOSE AND 下跌!= VAR6,REF(HIGH,BARSLAST(立樁量3)),REF(HIGH,BARSLAST(立樁量3)),10,1),COLORBLUE; {STICKLINE(CLOSE AND 下跌!= VAR6,REF(LOW,BARSLAST(立樁量3)), REF(LOW,BARSLAST(立樁量3)),10,1),COLORBROWN;} TJ3:=IF(BARSLAST(立樁量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立樁量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立樁量3)=3 AND CLOSE>REF(LOW,3),1,0))); 三天法則:=TJ3=1; 成立:=三天法則 AND 突破3; 條件成立:=FILTER(成立,5); DRAWTEXT(條件成立 AND 下跌!= VAR6,H*1.005,'成立') COLORBLUE; B1:=REF(C,1);B2:=REF(C,2); SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0)))); SM:=IF(REF(SS,1)!=0,REF(SS,1),IF(REF(SS,2)!=0,REF(SS,2),IF(REF(SS,3)!=0,REF(SS,3),IF(REF(SS,5)!=0,REF(SS,5),IF(REF(SS,6)!=0,REF(SS,6),IF(REF(SS,7)!=0,REF(SS,7),0)))))); {STICKLINE(SS=1 OR SM>=1 AND SS=0,B1,C,2.8,0),COLORBLUE; STICKLINE(SS=-1 OR SM<=-1 AND SS=0,B1,C,2.8,0),COLORYELLOW; STICKLINE(SS=2,B2,C,2.8,0),COLORBLUE; STICKLINE(SS=-2,B2,C,2.8,0),COLORYELLOW;} STICKLINE((SS=-1 OR SS=-2) AND SM>0,B2,B1,2.8,0),COLORGREEN; STICKLINE((SS=1 OR SS=2) AND SM<0,B2,B1,2.8,0),COLORYELLOW; AA:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) AND IF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5),REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) AND REF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1,REF(CLOSE,6)<REF(CLOSE,7)))); BB:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) AND IF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5),REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) AND REF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7)))); DRAWTEXT(AA AND CLOSE>REF(OPEN,2),LOW*0.99,'三平底'),COLORWHITE; DRAWTEXT(BB AND CLOSE<REF(CLOSE,2),HIGH*1.01,'三平頂'),COLORCYAN; MA60:MA(CLOSE,60) COLORGREEN; |
|