DIF:(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
IF(DIF 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)); { 顶背 :=REF(CLOSE,A2+1) 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),COLORYELLOW; D:SMA(K,9,3),COLORWHITE; J:3*K-2*D,COLORMAGENTA; IF(J A1:=BARSLAST(REF(CROSS(DIF,DEA),1)); B1:=REF(C,A1+1)>C AND REF(DIF,A1+1) KDJK:=STKINDI('',0,'KDJ.K',9,3,3); KDJD:=STKINDI('',0,'KDJ.d',9,3,3); RSIRSI1:=STKINDI('',0,'RSI.RSI1',6,12,24); RSIRSI2:=STKINDI('',0,'RSI.RSI2',6,12,24); A22:=BARSLAST(REF(CROSS(KDJK,KDJD),1));