%>
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIFF,9),COLORYELLOW; AB:EMA(DIFF,27) ; MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2; MA5:=MA(C,5); MA10:=MA(C,10); MA20:=MA(C,20); MA30:=MA(C,30); MA60:=MA(C,60); DD:=DYNAINFO(4); BB:=C; HH:=SUM(C*V,240)/SUM(V,240),COLORYELLOW; B1:=BB>HH; B2:=DEA>AB AND AB>0; B3:=CROSS(DEA,DIFF) AND DIFF>0; B4:=C>DD; 高位出货:=B1 AND B2 AND B3 AND B4; DRAWTEXT(高位出货,DIFF ,' ←出货'), COLORGREEN; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1),COLORFFFFFF; D:=SMA(K,3,1),COLOR00FFFF; J:=3*K-2*D,COLORFF00FF; 买入1:=IF(CROSS(J,2),100,0)/100,COLOR0099FF,LINETHICK2; 底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2 ; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2,NODRAW;