从刚接触股票时的到处找公式,到现在回归本源,使用经典公式,不得不说感触很多.......... {DMI-RSI-KDJ合一副图} LC:=REF(CLOSE,1); RSI1:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; RSI2:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100; DRAWBAND(RSI1,RGB(200,0,200),RSI2,RGB(0,255,0)); RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:SMA(RSV,3,1),COLORWHITE,LINETHICK2; D:SMA(K,3,1),COLORYELLOW,LINETHICK2; 50,POINTDOT,COLORWHITE; N:=14;M:=6; 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 AND HD>LD,HD,0),N); DMM:=EXPMEMA(IF(LD>0 AND LD>HD,LD,0),N); PDI:=DMP*100/MTR; MDI:=DMM*100/MTR; ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M); ADXR:=EXPMEMA(ADX,M); STICKLINE(ADX>=ADXR,79,80,2,1),COLOR0055AA; STICKLINE(ADX<ADXR,79,80,2,1),COLOR353500; STICKLINE(PDI>=MDI,19,20,2,1),COLOR0000AA; STICKLINE(PDI<MDI,19,20,2,1),COLOR33AA33; |
