SQX:=(C-MA(CLOSE,13))*100;
DIFF:EMA(MA(SQX,7),1),COLORWHITE;
DEA:EMA(DIFF,7),COLORYELLOW;
MACD:(DIFF-DEA)*2,COLORSTICK;
STICKLINE(CROSS(DIFF,DEA) AND DIFF<-0.1,35.5,10.5,2,1),COLORYELLOW,LINETHICK2;
低金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.1,15,0),COLORYELLOW,LINETHICK0;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
STICKLINE(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,55.5,35.5,2,1),COLORFF00FF,LINETHICK2;
二金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,28,0),COLORFF00FF,LINETHICK0;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
STICKLINE( REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),55.5,70.5,2,1),COLORRED,LINETHICK2;
底离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),40,0),COLORRED,LINETHICK0;
DRAWLINE(A1=0,DEA,底离,DEA,0),COLOR33FF33,LINETHICK2;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶离:=REF(CLOSE,A2+1)
STICKLINE( REF(CLOSE,A2+1)
{顶离_:IF(REF(CLOSE,A2+1)
压: DRAWLINE(A2=0,DEA,顶离,DEA,0),COLORFFBB99,LINETHICK2;
A3:=CROSS(DIFF,DEA) AND DEA<0;
STICKLINE(FILTER(COUNT(A3,21)=2,10),53,68,2,1),COLORWHITE,LINETHICK2;
负二金叉_:IF(FILTER(COUNT(A3,21)=2,10),53,0),COLORWHITE,LINETHICK0;
{DRAWICON(CROSS(DIFF,DEA) ,DIFF,1);
DRAWICON(CROSS(DEA,DIFF) , DEA,2);}
金叉:if(CROSS(DIFF,DEA),diff,0),color00ff00,stick,linethick2;
死叉:if(CROSS(DEA,DIFF),diff,0),colorff0099,stick,linethick2;