超前版MACD指标源码[通达信公式]
相关标签: 超前版MACD指标源码,通达信macd实战源码 、 通达信macd指标公式 、 macd顶底背离指标源码 、 macd二次金叉指标源码 、 缠论macd指标源码 、 macd底必买指标源码 、 经典macd指标源码 、 macd指标选股公式源码 、 macd指标源码 、
通达信超前版MACD指标(副图,源码
论坛上看到很多同学说MACD指标反应滞后,影响看盘,但是MACD指标是看盘的最基本的指标,不能没有。
现将本人搜集经优化超前版MACD送上,希望大家喜欢。
优化版用法:买入时不用等金叉出现,卖出也不必等死叉才卖,见到黄色箭头买入,见到绿色箭头卖出!建议用60分钟(激进者可用30分钟)图来操作。
源码具体如下:
DIFF:EMA(CLOSE,7) - EMA(CLOSE,19);
DEA:EMA(DIFF,9);{本文来源:'www.cxh99.com' }
MACD:2*(DIFF-DEA),COLORSTICK;
A1:=BARSLAST(ref(CROSS(DIFF,DEA),1));
B1:=ref(C,A1+1)>C AND ref(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
A2:=BARSLAST(ref(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=ref(C,A2+1)>C AND ref("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("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)>C AND ref("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(ref(CROSS(DEA,DIFF),1));
D1:=ref(C,C1+1)<C AND ref(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
C2:=BARSLAST(ref(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=ref(C,C2+1)<C AND ref("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("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)<C AND ref("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;
KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;
RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;
MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;
KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;
RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;
STICKLINE(B1>0,-0.1,0,2,0),COLORRED;
STICKLINE(B2>0,-0.1,0,2,0),COLORFF00FF;
STICKLINE(B3>0,-0.1,0,2,0),COLORYELLOW;
STICKLINE(D1>0,0.1,0,2,0),COLOR00FF00;
STICKLINE(D2>0,0.1,0,2,0),COLORFFCC66;
STICKLINE(D3>0,0.1,0,2,0),COLORWHITE;
STICKLINE(MACD>ref(MACD,1) AND MACD>0,0,MACD,0,0),COLORRED;
STICKLINE(MACD<=ref(MACD,1) AND MACD>0,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD<ref(MACD,1) AND MACD<0,0,MACD,0,0),COLORCYAN;
STICKLINE(MACD>=ref(MACD,1) AND MACD<0,0,MACD,0,0),COLORMAGENTA;
STICKLINE(C>0,0,0,50,1),COLORBLUE;
DIFF,COLORGREEN;
DEA,COLORYELLOW;
强:IF(DIFF>MA(DIFF,2),DIFF,DRAWNULL),COLORRED;
弱:IF(DEA>MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA;
必买: IF(TROUGHBARS(3,15,1)=0 AND HIGH>LOW+0.01,1,-0),COLORYELLOW ,LINETHICK2;
必卖: IF(PEAKBARS(3,15,1)=1,1,-0),COLORGREEN,LINETHICK2;
如果以上指标公式不适用于您常用的行情软件
或者您想改编成选股公式,以便快速选出某种形态个股的话,
- 上一篇:国外经典MACD指标
- 下一篇:KDJ涨跌因子指标源码及运用法则
相关文章
-
没有相关内容