通达信双飞雁通用副图源码
DIF:=EMA(C+SLOPE(C,12),12)-EMA(C+SLOPE(C,26),26);
DEA:=EMA(EMA(DIF+SLOPE(DIF,9),9)+SLOPE(EMA(DIF+SLOPE(DIF,9),9),6),6);
MACD:(DIF-DEA)*2,COLORRED;
DIFF:EMA(C+SLOPE(C,21),21)-EMA(C+SLOPE(C,63),63);
DEAD:EMA(EMA(DIFF+SLOPE(DIFF,6),6)+SLOPE(EMA(DIFF+SLOPE(DIFF,6),6),4),4);
DMAC:(DIFF-DEAD)*2,COLORSTICK;
南飞雁:REVERSE(DMAC),COLORGREEN;