分享

通达信前高前底MACD指标公式

 Swming888 2023-07-22 发布于江西

图片

DIFF:=EMA(CLOSE,3)-EMA(CLOSE,15);

DEA:=EMA(DIFF,9);

MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;

中:0,LINETHICK1,COLORRED;

VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);

VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);

VA2R:=CONST(BARSLAST(VA2)+1);

QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);

前高:DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA,LINETHICK3;

VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);

VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);

VA4R:=CONST(BARSLAST(VA4)+1);

BD:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(C)));

前低:DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),COLORCYAN,LINETHICK3;

E:=(HIGH+LOW+OPEN+2*CLOSE)/5;

明日阻力:=2*E-LOW;

明日支撑:=2*E-HIGH;

明日突破:=E+(HIGH-LOW);

明日反转:=E-(HIGH-LOW);

今日阻力:=REF(明日阻力 , 1);

今日支撑:=REF(明日支撑 , 1);

DRAWTEXT_FIX(C!=0,0.8,0.18,0,STRCAT('支撑:',STRCAT(CON2STR(明日支撑,2),' 元'))),COLORRED;

DRAWTEXT_FIX(C!=0,0.8,0.28,0,STRCAT('反转:',STRCAT(CON2STR(明日反转,2),' 元'))),COLORYELLOW;

X1:=IF(MA(C,5)>MA(C,10),20,0);

X2:=IF(MA(C,20)>MA(C,60),10,0);

X3:=IF(KDJ.J>KDJ.K,10,0);

X4:=IF(MACD.DIF>MACD.DEA,10,0);

X5:=IF(MACD.MACD>0,10,0);

X6:=IF(V>MA(V,60),10,0);

X7:=IF(WINNER(C)>0.5,10,0);

X8:=IF(C/REF(C,1)>1.03,10,0);

XX:=X1+X2+X3+X4+X5+X6+X7+X8;

DRAWTEXT_FIX(V>O,0.8,0.080,0,STRCAT('均线量化评分:',STRCAT(CON2STR(XX,2),' '))),COLORFFFFFF;

DRAWTEXT(ISLASTBAR,DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),STRCAT(' 前低:',CON2STR(DRAWLINE(VA4 AND CURRBARSCOUNT<=VA4R,MACD,REF(VA4,1),REF(MACD,1),1),2))),COLORCYAN;

DRAWTEXT(ISLASTBAR,DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),STRCAT(' 前高:',CON2STR(DRAWLINE(VA2 AND CURRBARSCOUNT<=VA2R,MACD,REF(VA2,1),REF(MACD,1),1),2))),COLORMAGENTA;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约