您现在的位置: 南方财富网 >> 股票知识 >> 股票公式 >> 正文
南方财富搜索

macd背离公式

2010-9-29 6:54:39   来源:不详   佚名
    
 {macd背离二*}{主图}
v1:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));
v2:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水岭:IF(MA(CLOSE,17)<v2,v2,MA(CLOSE,17)),COLORFF00FF,LINETHICK1;
ma10:=MA(C,10),COLORWHITE,LINETHICK1;
ma30:MA(C,30),COLOR00ff00,LINETHICK2;
stickline(ma10>= REF(ma10,1),ma10,ref(ma10,1),8,1),COLORRED,LINETHICK2;
stickline(ma10< REF(ma10,1),ma10,ref(ma10,1),8,1),COLORff9900,LINETHICK2;
A1:=BARSLAST(REF(CROSS("MACD.DIFF"(12,26,9),"MACD.DEA"(12,26,9)),1));
B1:=REF(C,A1+1)> C AND REF("MACD.DIFF"(12,26,9),A1+1)<"MACD.DIFF"(12,26,9)
AND CROSS("MACD.DIFF"(12,26,9),"MACD.DEA"(12,26,9));
DRAWTEXT(B1> 0,L-0.02,'底背离'),COLOR00FFFF;{底背离}
C1:=BARSLAST(REF(CROSS("MACD.DEA"(12,26,9),"MACD.DIFF"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIFF"(12,26,9),C1+1)>"MACD.DIFF"(12,26,9) AND CROSS("MACD.DEA"(12,26,9),
"MACD.DIFF"(12,26,9));
DRAWTEXT(D1> 0,H+0.16,'顶背离'),COLOR00FF00;{顶背离}
Jm:=CROSS("Macd.DIFF"(12,26,9),"Macd.DEA"(12,26,9));
Jma:=CROSS("Macd.DEA"(12,26,9),"Macd.DIFF"(12,26,9));
Drawtext (Jm,l,'金*'),colorwhite;{金*}
Drawtext (Jma,h,'死*'),coloryellow;{死*}
JmCOUNT:=COUNT(Jm,BARSLAST("Macd.DEA"(12,26,9)>=0));
Jmtj:1*("Macd.DEA"(12,26,9)<0 and Count(JmCount=2,21)=1);
JmaCOUNT:=COUNT(Jma,BARSLAST("Macd.DEA"(12,26,9)>=0));
Jmatj:1*("Macd.DEA"(12,26,9)>0 and Count(JmaCount=2,21)=1);
Drawtext (Jmtj,l,'二次金*'),colorwhite;{macd二次金*}
Drawtext (Jmatj,h,'二次死*'),colorwhite;{macd二次死*}
(责任编辑:张元缘)
    南方财富网声明:股市资讯来源于合作媒体及机构,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。
商务进行时
每日必读
学院24小时排行
证券导读
热图推荐

关于南方财富网版权声明诚聘英才广告服务网站地图友情链接
特此声明:广告商的言论与行为均与南方财富网无关
www.southmoney.com
南方财富网 © 版权所有 闽ICP备09035581号