您现在的位置:  股票知识 > 股票公式 > 大智慧股票公式 > 正文
南财搜索

大智慧公式编写教程 变色的MACD

2016-07-30 11:20    股票知识   zhishi.southmoney.com
    
大智慧公式编写教程 变色的MACD 南方财富网小编为您提供
 

不错的变色MACD,周MACD金叉也能同时显示。背离或周金买入是不错的买点

源码

DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26))*20,colorwhite,LINETHICK1;
DEA:EMA(DIFF,13),coloryellow,LINETHICK1;
VMACD:2*(DIFF-DEA), COLORSTICK;
MACD1:=2*(DIFF-DEA);
MACD2:=wma(MACD1,3);
STICKLINE(MACD1>MACD2 and macd1>0,0,MACD1,2,0),colorred;
STICKLINE(MACD1>MACD2 and macd1<0,0,MACD1,2,0),coloryellow;
STICKLINE(MACD1<MACD2,0,MACD1,1,0),colorcyan;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(背离,0,3,2,0),COLOR00FF00;
DRAWTEXT(背离,5.2,' 背离');
s3:=BARSLAST(cross(diff,dea));
s4:=ref(s3,s3+1);
s5:=dea>ref(dea,s4);
s6:=dea;
上成立:=cross(diff,dea) and s5;
下成立:=cross(diff,dea) and s6;
L1:=(EMA(CLOSE,3) - EMA(CLOSE,13));
L2:=EMA(L1,9);
L3:=BARSLAST(cross(L1,L2));
L4:=ref(L3,L3+1);
L5:=L2;
变盘:cross(L1,L2) and L5,LINETHICK0,ColorD6FF9C;
STICKLINE(变盘,5,-5,4,1),ColorD6FF9C;
成立距今:BARSLAST(cross(diff,dea)),LINETHICK0;
L6:=BARSCOUNT(CLOSE);
DRAWICON(CROSS(L1,L2),DIFF,7),ALIGN2,LAYER0;
DRAWICON(CROSS(L2,L1),DIFF,8),ALIGN2,LAYER0;
VERTLINE(上成立,3),Coloryellow;
VERTLINE(下成立,3),Colorred;
PARTLINE(DIFF,DIFF>DEA),COLORff11cc,LINETHICK1;
PARTLINE(DIFF,DIFF>DEA AND DIFF<0),COLORred,LINETHICK1;
ls:=if(DIFF>DEA AND DIFF>0,1,0);
加速上扬:if(ref(ls=0,1) AND ls=1,0.1,0);
xg1:cross(MACD1,MACD2) {and macd1<0},linethick0;
m1:=Vmacd>ref(Vmacd,1) and diff<dea;
绿柱短了:m1 and count(m1,10)=1 and c>ma(c,55) and count(Vmacd<0,5)>=5,linethick0;
drawtext(绿柱短了,Vmacd,'绿柱短了');
周DIF:="MACD.DIFF#WEEK"(26,12,9);
周DEA:="MACD.DEA#WEEK"(26,12,9);
周金▲:DRAWTEXT(CROSS(周DIF,周DEA),周DIF,'周金'),COLORRED;
日周同金:DRAWTEXT(CROSS(周DIF,周DEA) AND 上成立,周DIF,'▲日周同金'),COLORYELLOW;
SCT:=BARSLAST(CROSS(DEA,DIFF));
JC:CROSS(DIFF,DEA) AND SCT<6 AND BETWEEN(DIFF-DEA,0,0.05),LINETHICK0;
DRAWTEXT(JC,VMACD,'卷土重来');

 
更多股票公式相关资讯请关注南方财富网
 
(股票知识网zhishi.southmoney.com)
    股票知识网声明:资讯来源于合作媒体及机构,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。
商务进行时
股票知识学习
联盟广告

关于股票知识网 -版权声明 -诚聘英才 -广告服务 -网站地图 -
特此声明:广告商的言论与行为均与股票知识网无关
zhishi.southmoney.com
股票知识网 © 版权所有 闽ICP备09035581号