DEF:=EMA(C,13)-EMA(C,34);
DEA:=EMA(DEF,13);
MACD:=(DEF - DEA)*2;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,6,1),colorred;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,6,0),colorred;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,6,1),colorwhite;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,6,0),colorwhite;
主力:DEF,colorwhite;
趋势:DEA,coloryellow;
A333:=BARSLAST(REF(CROSS(主力,趋势),1));
B333:=REF(C,A333+1)>C AND REF(主力,A333+1)<主力 AND CROSS(主力,趋势);
A444:=BARSLAST(REF(CROSS(趋势,主力),1));
B444:=REF(C,A444+1)
底:=FILTER(B333>0,10);
顶:=FILTER(B444>0,10);
DRAWTEXT(底,主力,'底'),coloryellow;
DRAWTEXT(顶,主力,'顶'),coloryellow;