DIF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIF,9); MACD:(DIF-DEA)*2,COLORSTICK; MACD2:=EMA(MACD,2); MM1:=IF(MACD< 0,MACD,0); JJ1:=MM1> REF(MM1,1); ZZ1:=REF(JJ1,1)=1; 抄底區(qū):(JJ1 AND ZZ1)*DEA,POINTDOT,COLORRED;{MACD藍柱縮短---指今日比昨天短} STICKLINE(抄底區(qū)=DEA,DEA,DIF,3,0),COLORRED; DIFF:=EMA(CLOSE,26) - EMA(CLOSE,12); DEAF:=EMA(DIFF,9); MACDF:=2*(DIFF-DEAF), COLORSTICK,COLOR5454FF; MM:=IF(MACDF< 0,MACDF,0); JJ:=MM> REF(MM,1); ZZ:=REF(JJ,1)=1; 逃頂區(qū):(JJ AND ZZ)*DEAF,POINTDOT,COLORRED;{MACD藍柱縮短---指今日比昨天短} STICKLINE(逃頂區(qū)=DEAF,DEA,DIF,3,0),COLORGREEN; STICKLINE(MACD>MACD2 AND MACD>0,0,MACD,0.1,0),COLORRED; STICKLINE(MACD>MACD2 AND MACD<0,0,MACD,0.1,0),COLORLIGRAY; STICKLINE(MACD<MACD2,0,MACD,0.1,0),COLORLIGREEN; STICKLINE(MACD>=0 OR MACD<=0,0,0,50,1),COLORGREEN; VARX1:=LLV(DEA,25); VARX3:=DEA-(DIF-DEA); 壓力線:REF(HHV(DIF,25),1),COLORGREEN; 支撐線:IF(DIF<VARX1 AND DEA=VARX1,MIN(HHV(VARX1,5),VARX3),VARX1),COLORRED; A2:=BARSLAST(REF(CROSS(DEA,DIF),1)); A11:=BARSLAST(REF(CROSS(DIF,DEA),1)); M底背:=REF(CLOSE,A11+1)>CLOSE AND DIF>REF(DIF,A11+1) AND CROSS(DIF,DEA),COLORLIGRAY; STICKLINE(M底背,DIF,支撐線,2,0),COLORYELLOW; DRAWTEXT(M底背,DIF,' M底背'),COLORYELLOW; GJ:=MAX(C,O); H4:=HHV(GJ,4); GT2:=DEA<REF(DEA,1) AND REF(DEA,1)>REF(DEA,2); A2T:=BARSLAST(REF(GT2,1)); 頂背離:=REF(H4,A2T+1)<H4 AND DIF<ref(dif,a2t+1) and="" gt2; STICKLINE(頂背離,壓力線,DIF,2,0),COLORGREEN; DRAWTEXT(頂背離,REF(DEA,A2)*0.5,' 頂背離'),COLORGREEN; XGS:=CROSS(壓力線,DIF); DRAWICON(XGS,壓力線,2); XGD:=CROSS(DIF,支撐線); DRAWICON(XGD,支撐線,1); XG1:=CROSS(DIF,DEA); DRAWICON(XG1,DEA,11); XG3:=CROSS(DEA,DIF); DRAWICON(XG3,DIF,12); 抄底:=XGS AND XG1; DRAWTEXT(抄底,DIF,' 底'),COLORWHITE; 獲利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE; VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL); VOLUME1:=CURRBARSCOUNT=1 AND PERIOD=5,VVOL; VOLUME:=VOL; V3:=VOLUME1>=REF(VOLUME,1)*1.5; XGY:=C>OPEN AND VOLUME1 AND VOLUME AND V3; 虛擬成交量:=XGY=1; 即時虛擬量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL/FROMOPEN*240,DRAWNULL); 成交量:=IF(CURRBARSCOUNT>1,VOL,即時虛擬量); 五日均量:=MA(VOL,5); 預警:=虛擬成交量 OR (成交量>=五日均量*2 AND (L-O)/O*100>=-1); STICKLINE(預警,XGY*0.3,0,-1,-1),COLOR00C0C0;
|