DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIFF,9),HICK1,COLORFFFF00;QDIF:DIFF,COLORRED,HICK2;D:=BACKSET(DIFF<REF(DIFF,1),2);PARTLINE1(D,DIFF),COLOR33FF33,HICK2;MACD:(DIFF-DEA)*2;STICKLINE(MACD>=0ANDMACD>=REF(MACD,1),0,MACD,0,0),COLORRED;STICKLINE(MACD>=0ANDMACD<=REF(MACD,1),0,MACD,0,0),REEN;STICKLINE(MACD<=0ANDMACD>=REF(MACD,1),0,MACD,0,0),COLORFF00FF;STICKLINE(MACD<=0ANDMACD<=REF(MACD,1),0,MACD,0,0),COLOR00FFFF;多转空:=((((LLV(MACD,4)>0)AND(MACD<REF(MACD,1)))AND(REF(MACD,1)>REF(MACD,2)))AND(REF(MACD,2)>REF(MACD,3)));空转多:=((((HHV(MACD,4)<0)AND(MACD>REF(MACD,1)))AND(REF(MACD,1)<REF(MACD,2)))AND(REF(MACD,2)<REF(MACD,3)));DRAWICON(多转空,MACD*,5),COLOR00FF00;DRAWICON(空转多,MACD*,4),COLOR0000FF;STICKLINE(多转空,5,0,2,0),COLORFF8000;STICKLINE(空转多,5,0,2,0),COLOR00FFFF;VERTLINE(多转空,3),COLORFF0000;VERTLINE(空转多,0),COLOR00FFFF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>CANDREF(DIFF,A1+1)<DIFFANDCROSS(DIFF,DEA);DRAWTEXT(IF(B1>0,1,0),DEA,'底背离');C1:=BARSLAST(REF
期货指标公式文华财经期货指标优化精品MACD指标 来自淘豆网m.daumloan.com转载请标明出处.