通达信愚公MACD转大智慧愚公MACD
源码如下:
SHORT:=6;
LONG:=9;
MID:=3;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
暗度陈仓:IF(DIF>=REF(DIF,1),DIF,DEA),LINETHICK2,COLORRED;
明修栈道:IF(DIF
FILLRGN(DIF,DEA,DIF>DEA,RGB(500,180,280),DIF
DRAWICON(barslast(明修栈道<>暗度陈仓)=1,DIF,12),align1,layer0;
DRAWICON(REF(暗度陈仓,1)>REF(明修栈道,1) AND 暗度陈仓>=明修栈道 AND 明修栈道>REF(明修栈道,1) AND 暗度陈仓>REF(暗度陈仓,1),明修栈道,7),VALIGN2,align1,layer0;
DRAWICON(明修栈道>暗度陈仓,明修栈道,6),align1,layer3;
|