DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
macd:(DIF-DEA)*2,COLORSTICK;
X_1:=crOSS(DIF,DEA) AND DIF<(-0.1);
STICKLINE(X_1,0,(-0.18),1,0),COLORYELLOW;
DRAWTEXT(X_1,(-0.15),17),COLORRED;
X_2:=COUNT(CROSS(DIF,DEA),BArslAST(DEA>=0));
X_3:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(X_2=2,21)=1;
STICKLINE(X_3,0,(-0.18),1,0),COLORMAGENTA;
DRAWTEXT(X_3,(-0.3),18),COLORMAGENTA;
X_4:=BARSLAST(REF(CROSS(DIF,DEA),1));
X_5:=REF(CLOSE,X_4+1)>CLOSE AND DIF>REF(DIF,X_4+1) AND CROSS(DIF,DEA);
STICKLINE(X_5,0,0.13,1,0),COLORGREEN;
DRAWTEXT(X_5,0.18,19),COLORGREEN;
X_6:=BARSLAST(REF(CROSS(DEA,DIF),1));
X_7:=REF(CLOSE,X_6+1)
DRAWTEXT(X_1 AND X_3 AND X_5,0.51,20),COLORYELLOW,LINETHICK2;
DRAWTEXT(X_1 AND X_5,0.31,21),COLORLIBLUE,LINETHICK2;
上翘:IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
下拐:IF(DIF
X_8:=BARSLAST(REF(CROSS(rsi.RSI1,RSI.RSI2),1));
X_9:=REF(CLOSE,X_8+1)>CLOSE AND REF(RSI.RSI1,X_8+1)
X_10:=BARSLAST(REF(CROSS(RSI.RSI2,RSI.RSI1),1));
X_11:=REF(CLOSE,X_10+1)
DRAWTEXT(X_11>0,0.8,23),COLORGREEN;