最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 趋势风向标指标公式自用DMI

    正文概述    2024-04-12 23:18:51  

    {自用DMI}
    N:=15;
    M:=5;
    TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
    HD := HIGH-REF(HIGH,1);
    LD := REF(LOW,1)-LOW;
    DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),N);
    DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),N);
    PDI: DMP*100/TR;
    MDI: DMM*100/TR;
    ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
    ADXR:(ADX+REF(ADX,M))/2;
    低吸:5,COLORRED;
    盘下:20;
    盘上:40;
    风险:60,POINTDOT;
    转向:75,COLORGREEN;
    DRAWTEXT(CROSS(PDI,5) AND ADX>60,PDI,'反多'),COLORYELLOW;
    DRAWTEXT(CROSS(MDI,5) AND ADX>60,MDI,'反空'),COLORgreen;
    DRAWTEXT(CROSS(75,ADX),ADX,'转向'),COLORred;
    DRAWICON(CROSS(PDI,MDI) AND CROSS(ADX,ADXR),ADX,1);
    DRAWICON(CROSS(MDI,PDI) AND CROSS(ADX,ADXR),ADX,2);
     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 趋势风向标指标公式自用DMI 加入收藏