这是平时自已用的,看着很直观,出线黄点和绿点表示ADX线已经拐头,出现红绿箭头表示金叉和死叉。更多应用多体会。
N:=14;MM:=6;
{STICKLINE(C>0,10,50,10,0),COLOR2B5500;}
STICKLINE(C,50,50,8,0.5),LINETHICK2,COLOR008000;
STICKLINE(C,20,20,8,0.5),LINETHICK2,COLOR008000;
STICKLINE(C,60,60,2,0),LINETHICK2,COLOR008000;
STICKLINE(C,10,10,8,0.5),LINETHICK2,COLOR008000;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:DMP*100/MTR,NODRAW;
MDI:DMM*100/MTR,NODRAW;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM),NODRAW;
ADXR:EXPMEMA(ADX,MM),COLORC87800,LINETHICK2;