下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
通达信MACD+KDJ金叉共振指标公式
DRAWGBK(C0,RGB(1,1,1),RGB(1,1,1),0,'0',0);
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK0;
DEA:EMA(DIF,9),LINETHICK0;
A1:=BARSLAST(REF(crOSS(DIF,DEA),1));
B1:=REF(C,A1+1)CANDREF(DIF,A1+1)DIFANDCROSS(DIF,DEA);
A2:=BARSLAST(REF(CROSS(kdj.K(9,3,3),kdJ.D(9,3,3)),1));
B2:=REF(C,A2+1)CANDREF(KDJ.K(9,3,3),A2+1)KDJ.K(9,3,3)ANDCROSS
(KDJ.K(9,3,3),KDJ.D(9,3,3));
A3:=BARSLAST(REF(CROSS(rsi.RSI1(6,12,24),RSI.RSI2(6,12,24)),1));
B3:=REF(C,A3+1)CANDREF(RSI.RSI1(6,12,24),A3+1)RSI.RSI1(6,12,24)ANDCROSS
(RSI.RSI1(6,12,24),RSI.RSI2(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)CANDREF(DIF,C1+1)DIFANDCROSS(DEA,DIF);
C2:=BARSLAST(REF(CROSS(KDJ.D(9,3,3),KDJ.K(9,3,3)),1));
D2:=REF(C,C2+1)CANDREF(KDJ.K(9,3,3),C2+1)KDJ.K(9,3,3)ANDCROSS
(KDJ.D(9,3,3),KDJ.K(9,3,3));
C3:=BARSLAST(REF(CROSS(RSI.RSI2(6,12,24),RSI.RSI1(6,12,24)),1));
D3:=REF(C,C3+1)CANDREF(RSI.RSI1(6,12,24),C3+1)RSI.RSI1(6,12,24)ANDCROSS
(RSI.RSI2(6,12,24),RSI.RSI1(6,12,24));
STICKLINE(B10,110,100,3,0),COLORRED;
DRAWTEXT((B10),104.5,'macd底背离'),COLORRED;
STICKLINE(D10,110,100,3,0),COLORFF8000;
DRAWTEXT((D10),104.5,'MACD顶背离'),COLORFF8000;
STICKLINE(B20,0,-10,3,0),COLORFA00FA;
DRAWTEXT((B20),-6,'KDJ底背离'),COLORFA00FA;
STICKLINE(D20,0,-10,3,0),COLORGREEN;
DRAWTEXT((D20),-6,'KDJ顶背离'),COLORGREEN;
STICKLINE(B30,-20,-10,3,0),COLORYELLOW;
DRAWTEXT((B30),-15,'RSI底背离'),COLORYELLOW;
STICKLINE(D30,-20,-10,3,0),COLORCYAN;
DRAWTEXT((D30),-15,'RSI顶背离'),COLORCYAN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,9,3),LINETHICK0;
D:SMA(K,9,3),LINETHICK0;
J:3*K-2*D,LINETHICK0;
A:=CROSS(DIF,DEA)ANDCROSS(K,D)ANDCROSS(J,D);
STICKLINE(A,0,100,3,0),COLORYELLOW;
DRAWICON(A,92,25);DRAWICON(A,42,25);
DRAWTEXT(A,93,'★MACD_KDJ金叉共振'),COLORYELLOW;
DRAWTEXT(A,43,'★KDJ_MACD金叉共振'),COLORYELLOW;
日DIF:=MACD.DIF#DAY;
日DEA:=MACD.DEA#DAY;
日死叉:STICKLINE(日DIF日DEA,80,85,3,0),COLORFF8000;
日金叉:STICKLINE(日DIF日DEA,80,85,3,0),COLORRED;
DRAWTEXT(ISLASTBAR,82,'__日MACD'),COLORYELLOW;
周DIF:=MACD.DIF#WEEK(12,26,9);
周DEA:=MACD.DEA#WEEK(12,26,9);
周死叉:STICKLINE(周DIF周DEA,70,75,3,0),COLORFF8064;
周金叉:STICKLINE(周DIF周DEA,70,75,3,0),COLOR3232FF;
DRAWTEXT(ISLASTBAR,72,'__周MACD'),COLORYELLOW;
月DIF:=MACD.DIF#MONTH(12,26,9);
月DEA:=MACD.DEA#MONTH(12,26,9);
月死叉:STICKLINE(月DIF月DEA,60,65,3,0),COLORFF808C;
月金叉:STICKLINE(月DIF月DEA,60,65,3,0),COLOR5032FF;
DRAWTEXT(ISLASTBAR,62,'__月MACD'),COLORYELLOW;
N:=1;
月K:KDJ.K#MONTH,NODRAW,COLORWHITE,LINETHICK0;
月D:KDJ.D#MONTH,NODRAW,COLORYELLOW,LINETHICK0;
月J:KDJ.J#MONTH,NODRAW,COLORMAGENTA,LINETHICK0;
周K:KDJ.K#WEEK,NODRAW,COLORWHITE,LINETHICK0;
周D:KDJ.D#WEEK,NODRAW,COLORYELLOW,LINETHICK0;
周J:KDJ.J#WEEK,NODRAW,COLORMAGENTA,LINETHICK0;
日K:KDJ.K,NODRAW,COLORWHITE,LINETHICK0;
日D:KDJ.D,NODRAW,COLORYELLOW,LINETHICK0;
日J:KDJ.J,NODRAW,COLORMAGENTA,LINETHICK0;
K日金叉:=CROSS(日K,日D)AND(日D40OR日D60);
K周金叉:=CROSS(周K,周D)AND(周D40OR周D60);
K月金叉:=CROSS(月K,月D)AND(月D40OR月D60);
共振KDJ:=(K周金叉ANDK日金叉)OR(K周金叉ANDK月金叉)OR(K日金叉ANDK月金叉)OR(K日金叉AND
K周金叉ANDK月金叉);
STICKLINE(共振KDJ,0,50,3,0),COLORYELLOW;
DRAWICON(共振KDJ,42,25);
DRAWTEXT((K周金叉ANDK日金叉)OR(K周金叉ANDK月金叉)OR(K日金叉ANDK月金叉)OR(K日金叉AND
K周金叉ANDK月金叉),42,'★KDJ(日/周/月)共振'),COLORYELLOW;
NOTEXT月K:IF(N=3,月K,DRAWNULL),COLORWHITE,LINETHICK0;
NOTEXT月D:IF(N=3,月D,DRAWNULL),COLORYELLOW,LINETHICK0;
NOTEXT月J:IF(N=3,月J,DRAWNULL),COLORMAGENTA,LINETHICK0;
NOTEXT周K:IF(N=2,周K,DRAWNULL),COLORWHITE,LINETHICK0;
NOTEXT周D:IF(N=2,周D,DRAWNULL),COLORYELLOW,LINETHICK0;
NOTEXT周J:IF(N=2,周J,DRAWNULL),COLORMAGENTA,LINETHICK0;
NOTEXT日K:IF(N=1,日K,DRAWNULL),COLORWHITE,LINETHICK0;
NOTEXT日D:IF(N=1,日D,DRAWNULL),COLORYELLOW,LINETHICK0;
NOTEXT日J:IF(N=1,日J,DRAWNULL),COLORMAGENTA,LINETHICK0;
STICKLINE(日K=日D,30,35,3,0),COLOR8000FF;
STICKLINE(日K日D,30,35,3,0),COLOR009600;
DRAWTEXT(ISLASTBAR,27,'__日KDJ'),COLORWHITE;
STICKLINE(周K=周D,20,25,3,0),COLOR803CFF;
STICKLINE(周K周D,20,25,3,0),COLOR3C9600;
DRAWTEXT(ISLASTBAR,17,'__周KDJ'),COLORWHITE;
STICKLINE(月K=月D,10,15,3,0),COLOR8050FF;
STICKLINE(月K月D,10,15,3,0),COLOR649600;
DRAWTEXT(ISLASTBAR,7,'__月KDJ'),COLORWHITE;
0,LINETHICK1,DOTLINE,COLORWHITE;
50,LINETHICK1,COLORWHITE;
100,LINETHICK1,DOTLINE,COLORWHITE;
DRAwrECTREL(0,0,180,990,RGB(250,0,250));
DRAWTEXT_FIX(ISLASTBAR,0.111,0.03,0,'KDJ(日/周/月)'),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.18,0,'日K='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.18,0,日K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.31,0,'日D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.31,0,日D),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.44,0,'周K='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.44,0,周K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.57,0,'周D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.57,0,周D),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.70,0,'月K='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.70,0,月K),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.101,0.83,0,'月D='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.140,0.83,0,月D),COLORFFFFFF;
DRAWRECTREL(0,0,90,990,RGB(220,0,0));
DRAWTEXT_FIX(ISLASTBAR,0.023,0.03,0,'MACD(日/周/月)'),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.18,0,'日DIF='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.18,0,日DIF),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.31,0,'日DEA='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.31,0,日DEA),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.44,0,'周DIF='),COLORFFFFFF;
DRAWNUMBER_FIX(ISLASTBAR,0.05,0.44,0,周DIF),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.57,0,'周DEA='),COLORFFFFFF;
D
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 不能玩火教案反思
- 海岛冰轮初转腾说课稿
- 农忙季节临时帮工合同
- 通信设备公司人才引进合同样板
- 车辆报废回收企业管理办法
- 通信工程配电房建设协议
- 人力资源服务审批指南
- 网络应急演练
- 设备买卖合同签订预付款政策
- 肌腱断裂术后护理及功能锻炼
- 2024-2030年中国肉牛养殖产业前景预测及投资效益分析报告权威版
- 河北省石家庄市长安区2023-2024学年五年级上学期期中英语试卷
- 品牌经理招聘笔试题及解答(某大型国企)2025年
- 多能互补规划
- 珍爱生命主题班会
- 《网络数据安全管理条例》课件
- 消除“艾梅乙”医疗歧视-从我做起
- 天一大联考●皖豫名校联盟2024-2025学年高三上学期10月月考试卷语文答案
- GB/T 44291-2024农村产权流转交易 网络交易平台服务规范
- 八年级历史上册(部编版)第六单元中华民族的抗日战争(大单元教学设计)
- 全国农业技术推广服务中心公开招聘应届毕业生补充(北京)高频难、易错点500题模拟试题附带答案详解
评论
0/150
提交评论