DIF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIF,9);
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,1,0)COLOR00FF00; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0),COLORYELLOW; STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,1,0),COLORRED; 峰值:=DIF=REFX(HHV(DIF,2*9),9); 谷值:=DIF=REFX(LLV(DIF,2*9),9); DRAWLINE(谷值,DIF,谷值 AND DIF>REF(DIF,SUMBARS(谷值,2)-1),DIF,1); |
