设为首页收藏本站

Discuz! Board

 找回密码
 注-册

QQ登录

只需一步,快速开始

搜索
查看: 3429|回复: 0

盼盼macd战法标识指标代码XC-2

[复制链接]
发表于 2011-5-31 20:58:08 | 显示全部楼层 |阅读模式
原文: http://blog.sina.com.cn/s/blog_53a4585a0100iz5o.html

1、当形成macd低位金叉后,会用黄色字体按1,2,3,4的顺序依次标识。
2、当形成macd高位死叉后,会用白色字体按1,2,3,4的顺序依次标识。
3、macd低位死叉,标识为白色D(dead)。
4、macd高位金叉,标识为黄色G(gold)。
5、红柱大浪接小浪,标识为↑。
6、绿柱变短又变长,标识为↓。

DIFF: EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE;
DEA: EMA(DIFF,9),COLORYELLOW;
MACD: 2*(DIFF-DEA), COLORSTICK ;

A3:=BARSLAST(MACD<=0);
DRAWTEXT(MACD>0 AND MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,1)<HHV(MACD,A3),MACD*1.3,'↑'),COLORYELLOW;

A:=BARSLAST(DIFF>=0);
B:=COUNT(REF(DIFF,1)<=REF(DEA,1) AND DIFF>DEA,A);
BC:=REF(DIFF,1)<=REF(DEA,1) AND DIFF>DEA;
A2:=BARSLAST(DIFF<=0);
B2:=COUNT(REF(DIFF,1)>=REF(DEA,1) AND DIFF<DEA,A2);
BD:=REF(DIFF,1)>=REF(DEA,1) AND DIFF<DEA;
DRAWTEXT(MACD<0 AND MACD<REF(MACD,1) AND COUNT(MACD>REF(MACD,1),3)=2,MACD,'↓'),COLORWHITE;
DRAWTEXT(DIFF<0 AND BD,DIFF,'D'),COLORWHITE;
DRAWTEXT(B=1 AND BC,DIFF*0.7,'1'),COLORYELLOW;
DRAWTEXT(B=2 AND BC,DIFF*0.7,'2'),COLORYELLOW;
DRAWTEXT(B=3 AND BC,DIFF*0.7,'3'),COLORYELLOW;
DRAWTEXT(B=4 AND BC,DIFF*0.7,'4'),COLORYELLOW;
DRAWTEXT(B=5 AND BC,DIFF*0.7,'5'),COLORYELLOW;
DRAWTEXT(DIFF>0 AND BC,DIFF,'G'),COLORYELLOW;
DRAWTEXT(B2=1 AND BD,DIFF*0.8,'1'),COLORWHITE;
DRAWTEXT(B2=2 AND BD,DIFF*0.8,'2'),COLORWHITE;
DRAWTEXT(B2=3 AND BD,DIFF*0.8,'3'),COLORWHITE;
DRAWTEXT(B2=4 AND BD,DIFF*0.8,'4'),COLORWHITE;
您需要登录后才可以回帖 登录 | 注-册

本版积分规则

小黑屋|手机版|Archiver|数码鹭岛 ( 闽ICP备05008334号 )  

counter

GMT+8, 2018-4-24 01:17 , Processed in 0.217082 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

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