DIFF:=EMA(CLOSE,13) - EMA(CLOSE,34); DEA:=EMA(DIFF,13); MACD:=2*(DIFF-DEA/2); AH:=HHV(MACD,13*1); AL:=LLV(MACD,13*0.3); STICKLINE(MACD>0,MACD,0,1,0),COLOR0000AA,LINETHICK1; STICKLINE(MACD<0,MACD,0,1,0),COLOR008800,LINETHICK1; 趨勢(shì)線:=EMA(MACD,34); IF(趨勢(shì)線>REF(趨勢(shì)線,1),趨勢(shì)線,DRAWNULL),COLORYELLOW; IF(趨勢(shì)線<=REF(趨勢(shì)線,1),趨勢(shì)線,DRAWNULL),COLORFF5000; DRAWBAND(趨勢(shì)線,RGB(255,255,0),REF(趨勢(shì)線,1),RGB(0,88,255)); K:=SMA(MACD,2,1); D:=SMA(K,2,1); J:=SMA(D,2,1); STICKLINE(MACD>0,0.000001,0.000003,3,0),COLORRED; STICKLINE(MACD<0,0.000001,0.000003,3,0),COLORGREEN; DRAWTEXT_FIX(C>O,0.01,0.9,0,' 微信公眾號(hào):程序化指標(biāo) 網(wǎng)址:WWW.HONGHAIE.COM '),COLORRED; IF(K>REF(K,1),K,DRAWNULL),COLORRED; IF(K<=REF(K,1),K,DRAWNULL),COLORGREEN; IF(D>REF(D,1),D,DRAWNULL),COLORRED; IF(D<=REF(D,1),D,DRAWNULL),COLORGREEN; IF(J>REF(J,1),J,DRAWNULL),COLORRED,LINETHICK2; IF(J<=REF(J,1),J,DRAWNULL),COLORGREEN,LINETHICK2; STICKLINE(REF(MACD,1)<MACD,MACD,REF(MACD,1),3,0),COLORYELLOW; STICKLINE(MACD=AH,AH,K,3,0),LINETHICK1,COLORRED; STICKLINE(REF(MACD,2)>MACD,MACD,REF(MACD,1),3,1),COLORGREEN;
|