DIFF:((EMA(CLOSE,12) - EMA(CLOSE,26)))/EMA(C,26)*100,LINETHICK2;
DEA : EMA(DIFF,9);
: 2*(DIFF-DEA), COLORSTICK;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1) C AND REF(DIFF,A1+1) DIFF AND CROSS(DIFF,DEA);
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1) C AND REF(DIFF,C1+1) DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(B1 0,DIFF*1.05, 背离 ),coloryellow;
STICKLINE(((MACD REF(MACD,1)) AND (MACD 0)),0,MACD,1,0),colormagenta,LINETHICK4;
STICKLINE(((MACD REF(MACD,1)) AND (MACD 0)),0,MACD,1,0),colorligreen,LINETHICK4;