经典MACD金叉死叉指标 (源码)
2012-03-17 09:26:00来源:本站整理浏览:3094
通达信经典MACD金叉死叉指标公式股票软件源码如下:
SHORT:=12;LONG:=26;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
A1:=CROSS(DEA,DIF);
A2:=BARSLAST(CROSS(DIF,DEA));
死叉:IF(A1,INTPART((C/REF(C,A2)-1)*100)/10,0),COLOR00FF00;
{www.gpxiazai.com 股票软件下载网_通达信股票指标公式}
DRAWICON(CROSS(DIF,DEA),0,1);{1号图标显示红箭头};下破0轴: REF(DIF,1)>0 AND DIF<0,COLORCYAN;空中加油:REF("MACD.DIF",1)<REF("MACD.DIF",2) AND REF("MACD.MACD",1)<REF("MACD.MACD",2)
AND REF("MACD.DIF",1)-REF("MACD.DEA",1)>0
AND REF("MACD.DIF",1)<"MACD.DIF"
AND REF("MACD.DIF",1)-REF("MACD.DEA",1)<0.03
AND REF("MACD.MACD",1)<"MACD.MACD",COLORRED;
- 上一篇公式:MACD支撑线指标 (源码)
- 下一篇公式:抄底追买指标 (源码)