通达信MACD交叉战法指标公式源码附图
SHORT:=5;
LONG:=34;
MID:=5;
龙头:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),LINETHICK3,NODRAW;
龙尾:EMA(龙头,MID),LINETHICK3,NODRAW;
海平面:(龙头-龙尾)*2,COLORBLUE;
DRAWBAND(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),RGB(255,98,255),EMA((EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)),MID),RGB(0,166,0));
IF(龙头>龙尾,龙头,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(龙尾<龙头,龙尾,DRAWNULL),COLORYELLOW,LINETHICK1;