DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);DEA:EMA(DIFF,9);:2*(DIFF-DEA), COLORSTICK,LINETHICK2;A1:=BARSLAST(REF(OSS(DIFF,DEA),1));:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);底背:DRAWLINE(A1=0,DEA,底,DEA,0),COLORYELLOW,LINETHICK4;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));:=REF(CLOSE,A2+1)
DIFF AND CROSS(DEA,DIFF);顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; JC := DEA-DIFF;绿柱面积:=IF(MACD<0 SUM(MACD,BARSLAST(JC<0)),0);红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);本次最低价:=LLV(L,B