通达信DMI超级转向指标(源码)

2014-06-03 09:05:00来源:本站整理浏览:376

通达信DMI超级转向指标公式
 


{DMI超级转向
N 14 2 100
M 6 1 100
ADXP 1 1 100}
TR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);
PDI1:=DMP*100/TR,COLORRED;
MDI1:=DMM*100/TR,COLORGREEN;
ADX:SMA(ABS(MDI1-PDI1)/(MDI1+PDI1)*100,M,1),COLORYELLOW,NODRAW;
ADXR:(ADX+REF(ADX,M))/2,COLORMAGENTA;
STICKLINE(ADX<=REF(ADXR,1),ADX,ADXR,2,0),COLORBLUE;
STICKLINE(ADX>REF(ADXR,1),ADX,ADXR,2,0),COLORRED;
PDI:PDI1,COLORYELLOW;
MDI:MDI1,COLORGREEN;
{传统MDI加进四条线 两句话较好}
CD0:16;
CD1:30;
TD0:60;
TD1:80;
DRAWTEXT(CROSS( PDI,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,PDI), PDI,'●死'),COLORBLUE;
DRAWTEXT(CROSS( ADX,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,ADX), ADX,'●死'),COLORBLUE;
DRAWTEXT(CROSS( PDI,MDI), MDI,'★金'), COLORYELLOW;
DRAWTEXT(CROSS( MDI,PDI), PDI,'★死'), COLORGREEN;
DRAWTEXT(CROSS( ADX,ADXP), ADXP,'★金'), COLOR000999 ;
DRAWTEXT(CROSS( ADXP,ADX), ADX,'★死'), COLORCYAN;


股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式