通达信阿牛MACD与阿牛KD周线金叉共振指标源码
{8阿牛MACD}
DIF:EMA(CLOSE,6)-EMA(CLOSE,13);
DEA:EMA(DIF,5);
MACD:(DIF-DEA)*2,COLORSTICK;
DIFF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
{金叉共振}
VAR0004:="MACD.DIF#WEEK"(6,13,5);
VAR0005:="MACD.DEA#WEEK"(6,13,5);
VAR0006:="MACD.MACD#WEEK"(6,13,5);
VAR7:="MACD.DIF#MONTH"(6,13,5);
VAR8:="MACD.DEA#MONTH"(6,13,5);
月金叉:IF(CROSS(VAR7,VAR8),-0.5,0)LINESTICK, COLORRED,LINETHICK2;
周金叉:IF(CROSS(VAR0004,VAR0005),-0.3,0)LINESTICK, COLORRED,LINETHICK2;
零轴金叉:IF(CROSS(VAR0004,0),0.1,0)LINESTICK,COLORYELLOW,LINETHICK2;