玉面佛 发表于 2016-4-10 09:02:45

MACD低位金叉二次金叉底背离三全项


DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),coloryellow;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),colorwhite;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次金叉'),coloryellow;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),colorred,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),colorgreen,LINETHICK4;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;



之前有股友向管理员反应公式第一句不完整,我很感谢这些股友提出来。
可能是楼主在编辑帖子的时候不小心漏了公式开头几个字母,现在管理员已经替楼主修改好,感谢大家支持!

橡皮猴子 发表于 2020-10-6 18:58:21

好公式,有错就改,楼主用心了,支持一下!

黄三 发表于 2018-7-26 18:11:47

谢谢分享,学习一下

笑口常开 发表于 2018-3-25 13:44:08

好公式,有错就改,楼主用心了,支持一下!:*

月亮 发表于 2017-5-8 14:29:32

谢谢楼主分享

小开 发表于 2017-4-1 22:07:40

学习试用看看

紫雨 发表于 2017-3-31 21:09:05

谢谢楼主提供,赞

会爆炸的闹特七 发表于 2016-10-17 21:04:03

喜欢 支持 加油

灵芝草 发表于 2016-10-9 17:58:21

学习,谢谢楼主分享
页: [1] 2
查看完整版本: MACD低位金叉二次金叉底背离三全项