最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信日趋完善的MACD指标公式

    正文概述    2024-04-14 18:46:19  

    M:=7;N:=11;
    VAR1:=EMA(SLOPE(C,21)+C,34);
    VAR5:=EMA(C,2);
    VAR9:=VAR5-VAR1;
    ZJC:=VAR9;
    ZJH:=IF(C>O,(H-C)/(C-L)*(C-L)+ZJC,(H-C)/(O-L)*(O-L)+ZJC);
    ZJO:=IF(C>O,ZJH-(H-O)/(C-L)*(C-L),ZJH-(H-O)/(O-L)*(O-L));
    ZJL:=IF(C>O,ZJH-(H-L)/(H-O)*(H-O),ZJH-(H-L)/(H-C)*(H-C));
    WddiF:EMA(ZJC*5,10)-EMA(ZJC*5,20);
    WddeA:EMA(WDDIF,8);
    WDmacd:(WDDIF-WDDEA)*2,COLORSTICK;
    收盘值:ZJC,COLORLIBLUE,NODRAW;
    AA:=REF(ZJC,M)=HHV(ZJC,2*M+1);
    BB:=BacKSET(AA,M+1);
    CC:=FILTER(BB,M) AND ZJC=HHV(ZJC,M+1);
    A:=BArslAST(REF(CC,1));
    AA1:=REF(ZJC,2)=HHV(ZJC,2*2+1);
    BB1:=BACKSET(AA1,2+1);
    CC1:=FILTER(BB1,2) AND ZJC=HHV(ZJC,2+1);
    A1:=BARSLAST(REF(CC1,1));
    TJ:=REF(C,A1+1)ZJC AND CC1;
    DBL:=IF((REF(C,A+1)ZJC AND CC) OR TJ,8,DRAWNULL)COLORGREEN,NODRAW;
    顶背离:DRAWLINE(CC,ZJC,FILTER(DBL>0,5),ZJC,0)LINETHICK2,COLORGREEN;
    DRAWTEXT(DBL=8,ZJH*1.1,'顶背离')COLORGREEN;
    AA2:=REF(ZJC,N)=LLV(ZJC,2*N+1);
    BB2:=BACKSET(AA2,N+1);
    CC2:=FILTER(BB2,N) AND ZJC=LLV(ZJC,N+1);
    A2:=BARSLAST(REF(CC2,1));
    AA3:=REF(ZJC,2)=LLV(ZJC,2*2+1);
    BB3:=BACKSET(AA3,2+1);
    CC3:=FILTER(BB3,2) AND ZJC=LLV(ZJC,2+1);
    A3:=BARSLAST(REF(CC3,1));
    TJ1:=REF(C,A3+1)>C AND REF(ZJC,A3+1) XG:=IF((REF(C,A2+1)>C AND REF(ZJC,A2+1) 选股:DRAWLINE(CC2,ZJC,FILTER(XG>0,5),ZJC,0)LINETHICK2,COLORRED;
    DRAWTEXT(XG=8,ZJL*1.1,'底背离')COLORRED;
    STICKLINE(WDMACD>REF(WDMACD,1) AND WDMACD>0,0,WDMACD,0,0),COLORRED;
    STICKLINE(WDMACD0,0,WDMACD,0,0),COLORLIRED;
    STICKLINE(WDMACD>REF(WDMACD,1) AND WDMACD<0,0,WDMACD,0,0),COLORYELLOW;
    STICKLINE(WDMACD STICKLINE(C> O,ZJH,ZJL,0.01,0),COLORFF66FF;
    STICKLINE(C> O,ZJC,ZJO,2.1,0),COLORAA00AA;
    STICKLINE(C> O,ZJC,ZJO,1.9,0),COLORCC11CC;
    STICKLINE(C> O,ZJC,ZJO,1.6,0),COLORFF22FF;
    STICKLINE(C> O,ZJC,ZJO,1.2,0),COLORFF44FF;
    STICKLINE(C> O,ZJC,ZJO,0.7,0),COLORFF66FF;
    STICKLINE(C> O,ZJC,ZJO,0.2,0),COLORFF99FF;
    STICKLINE(C<=O OR C STICKLINE(C<=O OR C STICKLINE(C<=O OR C STICKLINE(C<=O OR C STICKLINE(C<=O OR C STICKLINE(C<=O OR C STICKLINE(C<=O OR C ZTB:=(C-REF(C,1))/REF(C,1)*100>9.91&&(C-REF(C,1))/REF(C,1)*100<10.6;
    DRAWTEXT(ZTB,IF(ZJC<0,ZJC*0.9,ZJC*1.1),'涨停板')COLORYELLOW;
    STICKLINE(C=H,ZJH,ZJL,0.0,0),COLORYELLOW;
    STICKLINE(ZTB,ZJC,ZJO,2.1,0),COLOR006666;
    STICKLINE(ZTB,ZJC,ZJO,1.9,0),COLOR008888;
    STICKLINE(ZTB,ZJC,ZJO,1.6,0),COLOR00AAAA;
    STICKLINE(ZTB,ZJC,ZJO,1.2,0),COLOR00CCCC;
    STICKLINE(ZTB,ZJC,ZJO,0.7,0),COLOR00EEEE;
    STICKLINE(ZTB,ZJC,ZJO,0.2,0),COLOR33FFFF;
    DTB:=(C-REF(C,1))/REF(C,1)*100<-9.9&&(C-REF(C,1))/REF(C,1)*100>-10.6;
    DRAWTEXT(DTB,IF(ZJC>0,ZJC*0.9,ZJC*1.1),'跌停板')COLORFF8800;
    STICKLINE(DTB,ZJO,ZJC,2.1,0),COLORFF0000;{蓝色}
    STICKLINE(DTB,ZJO,ZJC,1.9,0),COLORFF2200;
    STICKLINE(DTB,ZJO,ZJC,1.6,0),COLORFF4400;
    STICKLINE(DTB,ZJO,ZJC,1.2,0),COLORFF6600;
    STICKLINE(DTB,ZJO,ZJC,0.7,0),COLORFF8800;
    STICKLINE(DTB,ZJO,ZJC,0.2,0),COLORFFAA00;
    WZ:=HHV(WDDIF*2,200);
    DRAWTEXT(CURRBARSCOUNT=40+1,WZ*1.25,'-'),COLORYELLOW;
    DRAWTEXT(CURRBARSCOUNT=40+1,WZ*1.20,'【操作要领】'),COLORYELLOW;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*1.10,'0轴以上,与主图相比,阴k线若高收,后市下跌。')COLOR44FF00;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*1.00,'0轴以上,与主图相比,阳K线若下挫,后市下跌。')COLOR44FF00;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*0.90,'0轴以上,股价创新高但MACD柱状线缩短,后市下调或下跌。')COLOR44FF00;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*0.80,'0轴以下,与主图相比,阴K线若上移,后市上涨。'),COLORFF66FF;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*0.70,'0轴以下,与主图相比,阳K线若下挫,后市上涨。'),COLORFF66FF;
    DRAWTEXT(CURRBARSCOUNT=40,WZ*0.60,'0轴以下,股价创新低但MACD柱状线缩短或翻红,后市上涨。'),COLORFF66FF;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信日趋完善的MACD指标公式 加入收藏