以下是趋势风向标指标公式自用DMI
趋势风向标指标公式自用DMI
{自用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);
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)