股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 2723|回复: 2
打印 上一主题 下一主题

请哪位老师将MACD柱状背离改写成选股公式

[复制链接]

指标研习组

Rank: 11Rank: 11Rank: 11Rank: 11

听众
1
跳转到指定楼层
楼主
发表于 2016-10-2 20:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
10爱心果
HJ1:=1;
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:=REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0;
低柱背:=DRAWLINE(HJ4=HJ3,MACD,HJ6,MACD,0),COLORRED,LINETHICK2;
DRAWICON(HJ6,MACD*1.2,25);

爵★★★

Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21

听众
2
沙发
发表于 2016-10-2 21:38 | 只看该作者
{柱状背离}
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0;
回复

使用道具 举报

爵★★★

Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21

听众
2
板凳
发表于 2016-10-2 21:40 | 只看该作者
{柱状背离选股}
HJ1:=1;
DIF:=IF(HJ1=1,MACD.DIF,0);
DEA:=IF(HJ1=1,MACD.DEA,0);
MACD:=(DIF-DEA)*2;
HJ2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ3:=LLVBARS(MACD,HJ2+20);
HJ4:=IF(HJ3>HJ2,REF(MACD,HJ3),0);
HJ5:=MACD<0 AND MACD>HJ4 AND LOW=LLV(LOW,HJ2+20) AND HJ4<0;
HJ6:REF(HJ5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ3)<0 AND MACD<0;

忘写了这句:HJ1:=1;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-11-24 05:52 , Processed in 0.147777 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表