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

优化MACD源码附图

发布时间:2015/4/14 6:15:14  浏览次数:

 优化MACD使用方便,能够避免短线的下调线

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

K:=SMA(RSV,3,1),colorwhite;

D:=SMA(K,3,1),coloryellow;

J:=3*K-2*D,COLORFF00FF;

A:=250;

DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));

DEA:=EMA(DIFF,9),colorblue,LINETHICK0;

MACD:=2*(DIFF-DEA);

MM:=IF(MACD< 0,MACD,0);

JJ:=MM> REF(MM,1);

ZZ:=REF(JJ,1)=1;

准备:=(JJ AND ZZ)*DEA;

STICKLINE(准备=DEA,1,-1,2,1),COLORFFFF00;

JH:=HHV(MAX(K,MAX(D,J)),A);

DH:=HHV(MAX(DIFF,DEA),A);

SH:=INTPART(JH/DH)/2;

DIFF50:=SH*DIFF+50,COLORFFFF00;

DEA50:=SH*DEA+50,colorblue;

STICKLINE(DIFF50>DEA50,0,1.5*(DIFF50-DEA50),0,0),colorred;

STICKLINE(DIFF50<DEA50,0,1.5*(DIFF50-DEA50),0,0),COLORFFFF00;

红柱:IF(1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1.5*(DIFF50-DEA50),0),

STICK,;

绿柱:IF(1.5*(DIFF50-DEA50)<REF(1.5*(DIFF50-DEA50),1),

1.5*(DIFF50-DEA50),0),STICK,colorgreen;

缩头:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)>REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)< REF(1.5*(DIFF50-DEA50),1),1,0);

缩脚:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);

杀多:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)> REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)<REF(1.5*(DIFF50-DEA50),1),1,0);

诱空:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);

阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);

DRAWTEXT(FILTER(杀多,3) AND 杀多,1.5*(DIFF50-DEA50),'杀多'),COLORFF00FF;

DRAWTEXT(FILTER(缩头,3) AND 缩头,1.5*(DIFF50-DEA50)+0.2,'卖'),COLORFF00FF;

DRAWTEXT(FILTER(诱空,3) AND 诱空,1.5*(DIFF50-DEA50),'?洗盘'),COLOR00FF00;

DRAWTEXT(FILTER(缩脚,3) AND 缩脚,1.5*(DIFF50-DEA50)-0.2,'买'),COLOR00FF00;

DRAWTEXT(FILTER(阻力,16) AND 1.5*(DIFF50-DEA50)>=0,1.5*(DIFF50-DEA50)+0.01,'¤阻力'),COLOR00FFFF;

VRA:=REF(CLOSE,1);

VRB:=SMA(MAX(CLOSE-VRA,0),6,1)/SMA(ABS(CLOSE-VRA),6,1)*100; //本文来至程序化交易网 cxh99.com//

VRC:=(2*CLOSE+HIGH+LOW)/4;

VR0:=LLV(LOW,34);

VR1:=HHV(HIGH,34);

VR2:=EMA((VRC-VR0)/(VR1-VR0)*100,6);

VR3:=EMA(0.667*REF(VR2,1)+0.333*VR2,4);

VA1:=(REF(HIGH,1)+REF(LOW,1))/2;

VA2:=MA(CLOSE,20)+2*STD(CLOSE,20);

VA3:=REF(CLOSE,1);

VA4:=SMA(MAX(CLOSE-VA3,0),7,1)/SMA(ABS(CLOSE-VA3),7,1)*100;

VA5:=CROSS(79,VA4);

VA6:=FILTER(VA5,4);

VVD:=MA(CLOSE,80)-MA(CLOSE,10)/3;

VA7:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);

X1:=CROSS(VA1,VA2) OR VA6;

X2:=CROSS(84,VRB);

STICKLINE(X1 OR X2,1.5*(DIFF50-DEA50)*1.05,1.5*(DIFF50-DEA50)*1.08,3,0);

优化MACD源码附图

资源下载链接   资源大小:unknow
精品资源推荐

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