公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 大智慧公式 > 正文 → 正文

反向推算macd 便于看盘

发布时间:2014/10/24 6:54:43  浏览次数:

input: short (5,1,20), long(26,1,60),M(9,1,30);
 DIFF: EMA(CLOSE, short)-EMA(CLOSE, long ),color0066ff,LINETHICK0,LAYER0;
 partline(DIFF,DIFF>=ref(DIFF,1),rgb(255,0,0),DIFF<ref(DIFF,1),rgb(0,255,0)),linethick1;
 DEA:EMA(DIFF,M),COLOR00BB00,LINETHICK1,LAYER0;
 MACD: (DIFF-DEA)*2,COLORSTICK;
 partline(DIFF,DIFF>=ref(DIFF,1),rgb(255,0,0),DIFF<ref(DIFF,1),rgb(0,255,0)),linethick2;
 FILLRGN(DIFF,DEA,DIFF>DEA,rgb(255,0,0),DIFF<DEA,rgb(0,255,0)),linethick2;
中轴:0,LAYER0,Coloreeeeee,LINETHICK1;
 jcsc:=(M-1)/(M+1)*dea/(1-2/(m+1));{计算出金叉死叉时的Diff值}
dd:=(macd/2+(dea*(m-1)/(M+1)))/(1-2/(m+1));{计算出明日macd=macd时的Diff值}
xx:=(diff*(short+1)*(long+1)-(long+1)*(short-1)*ema(c,short)+(short+1)*(long-1)*ema(c,long))/(2*((long+1)-(short+1)));{计算今日Diff=diff的对应股价}
js:=(jcsc*(short+1)*(long+1)-(long+1)*(short-1)*ema(c,short)+(short+1)*(long-1)*ema(c,long))/(2*((long+1)-(short+1)));{计算金叉死叉的对应股价}
ddd:=(dd*(short+1)*(long+1)-(long+1)*(short-1)*ema(c,short)+(short+1)*(long-1)*ema(c,long))/(2*((long+1)-(short+1)));{计算macd柱体变向时的对应股价};

DRAWTEXTABS(3,0,'DIFF拐头股价:'+numtostrn(xx,2)),ColorFFFFFF,LINETHICK3;
 DRAWTEXTABS(175,0,'MACD柱体变向对应股价:'+numtostrn(ddd,2)),Color00A5FF,LINETHICK3;
 DRAWTEXTABS(410,0,'金叉死叉对应股价:'+numtostrn(js,2)),COLOR00BB00,LINETHICK3;

PARTLINE(DIFF,CROSS(DIFF,DEA) AND DIFF<-0.2,RGB(255,245,12)),CROSSDOT,LINETHICK5;
 PARTLINE(DIFF,CROSS(DIFF,DEA) AND DIFF>0,RGB(252,24,212)),CROSSDOT,LINETHICK5;
 PARTLINE(DIFF,CROSS(DIFF,DEA) AND DIFF>-0.2 AND DIFF<0,RGB(200,80,20)),CROSSDOT,LINETHICK7;
 PARTLINE(DIFF,CROSS(DEA,DIFF) AND DIFF>0,RGB(125,245,252)),CIRCLEDOT,LINETHICK5;

反向推算macd 便于看盘

资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识