DIF:(EMA(CLOSE,12)-EMA(CLOSE,26))*100,coloryellow,LINETHICK2;
DEA:EMA(DIF,9),colorgreen,LINETHICK1;
MACD:(DIF-DEA)*2,COLORSTICK;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
IF(DIF<DEA,DIF,DRAWNULL),colorgreen;
DD:=C=HHV(C,180);
EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
顶背离:=(DD AND EE AND DEA< HHV(DEA,180))*DEA;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
交时1:=FROMOPEN<240;
交时2:=交时1<=0;
交时3:=1;
定时1:=IF(DATE>20150330,交时2,交时3);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),colorred,LINETHICK2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,3),,colorwhite,DOTLINE,LINETHICK1;
D:=SMA(K,9,3),coloryellow;
J:=3*K-2*D,colormagenta;
IF(J<D,J,DRAWNULL),COLORFFEE44;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA);
/*KDJ(9,3,3)*/
RSV1=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; KDJK:=SMA(RSV1,3,1); KDJD:=SMA(K,3,1); J:=3*K-2*D;
/*RSI(6,12,24)*/
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6 ,1)/SMA(ABS(CLOSE-LC),6 ,1)*100,colorwhite;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,coloryellow;
A22:=BARSLAST( REF( CROSS( KDJK,KDJD) ,1));
B2:=REF(CLOSE,A22+1)>CLOSE AND REF(KDJK,A22+1)<KDJK AND CROSS(KDJK,KDJD);
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(CLOSE,A3+1)>CLOSE AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
DRAWTEXT(B1 AND 定时1 ,DEA-0.20,'▲MACD底背'),colormagenta;
MDJ:=CROSS(DIF,DEA) AND DEA<0;
DRAWTEXT(MDJ AND 定时1 ,DEA-1,'--低金叉'),colorwhite;
A:=CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(J,D);
/*FILLRGN(k,D,( k>D ),colormagenta);*/
FILLRGN(DIF,DEA,( DIF>DEA AND 定时1 ),colorred);
aa1:=COUNT(CROSS(DIF,DEA),3)>0;
aa2:=COUNT(CROSS(K,D),3)>0;
aa3:=CROSS(DIF,DEA) OR CROSS(K,D);
aa4:=DEA<24;
MA20:=MA(CLOSE,20);
aa5:=COUNT( MA20>=REF(MA20,1),3)=3;
aa6:=COUNT(CROSS(CLOSE,MA20),2)>0;
aa8:=aa1 AND aa2 AND aa3 AND aa4 AND aa5 ;
aa9:=aa1 AND aa2 AND aa3 AND aa4 AND aa5 AND aa6 ;
DRAWTEXT(aa8 AND 定时1 ,20 ,'--超级金叉'),coloryellow;
DRAWGBK (aa8 AND 定时1 ) ,coloryellow;
DRAWTEXT( WEEKDAY>4 AND FILTER( WEEKDAY>4 ,180) , LLV(DIF,20) ,'设计编写:与庄同行 '),coloryellow;
DRAWTEXT(aa9 AND 定时1 ,20 ,'--超级金叉'),colorred;
DRAWGBK (aa9 AND 定时1 ) ,color0099ff;