DIF:(EMA(CLOSE,12)-EMA(CLOSE,26))/EMA(CLOSE,26)*100,COLOR2222FF;DEA:EMA(DIF,9),COLOR22FF22;DRAWBAND(DIF,RGB(228,0,0),DEA,RGB(0,228,0));MACD:2*(DIF-DEA),COLORFF8800,NODRAW;STICKLINE(MACD>0,0,MACD,,-1),COLOR55DDDD;STICKLINE(MACD<0,0,MACD,,-1),COLORFF5500;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RDIF:(EMA(RSI,12)-EMA(RSI,26))/EMA(RSI,26)*100,COLORFFFFFF;RDEA:EMA(RDIF,9),COLOR00FFFF;阻力位:REF(HHV(RDIF,21),1),COLORFF8800,,DOTLINE;{N日内DIF的最高值}支撑位:REF(LLV(RDIF,21),1),COLORFF0088,,DOTLINE;{N日内DIF的最低值} RMACD:2*(RDIF-RDEA),COLORSTICK,COLORFFFF88; MARDEA:EMA(RDIF,120),COLOR333333;{参数N1可自己定义,60--250之间}MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);YXF:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDCROSS(DX,MA(DX,2)),1,0);加仓:IF(FILTER(YXF=1,5),1,0),COLORFF00FF,NODRAW;STICKLINE(加仓=1,0,RMACD,,0),COLORFF00FF;{绝佳买点}快DIF:=(2*EMA(CLOSE,12)-EMA(EMA(CLOSE,12),12))-(2*EMA(CLOSE,26)-EMA(EMA(CLOSE,26),26));慢DEA:=2*EMA(快DIF,9)-EMA(EMA(快DIF,9),9);动能MACD:=3*(快DIF-慢DEA);VARF1:=MA(HHV(HIGH,485),17);VARF2:=MA(HHV(HIGH,222),17);VARF3:=MA(HHV(HIGH,96),17);VARF4:=MA(LLV(LOW,485),17);VARF5:=MA(LLV(LOW,222),17);VARF6:=MA(LLV(LOW,96),17);VARF7:=MA((VARF4*+VARF5*+VARF6*+VARF1*+VARF2*+VARF3*)/6,17);VARF8:=MA((VARF4*+VARF5*+VARF6*+VARF1*+VARF2*+VARF3
通达信指标公式源码 强弱MACD指标副图 来自淘豆网m.daumloan.com转载请标明出处.