N:=14;MM:=6; CR月:MA("CR.CR#MONTH",5),COLOR00008C,LINETHICK2; DRAWTEXT(ISLASTBAR,CR月,'CR月'),COLOR00008C; TH:=SUM(IF(CLOSE>REF(CLOSE,1),AMO,0),26); TL:=SUM(IF(CLOSE<REF(CLOSE,1),AMO,0),26); TQ:=SUM(IF(CLOSE=REF(CLOSE,1),AMO,0),26); VR:100*(TH*2+TQ)/(TL*2+TQ),COLORWHITE; MVR:MA(VR,6),COLORYELLOW; DRAWTEXT(ISLASTBAR,VR,'VR'),COLORWHITE; DRAWTEXT(ISLASTBAR,MVR,'VR均'),COLORYELLOW; 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*1000/MTR,COLORMAGENTA,DOTLINE; MDI:DMM*1000/MTR,COLORBLUE,DOTLINE; ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*1000,MM),COLORLIRED,DOTLINE; ADXR:=EXPMEMA(ADX,MM); IF(ADX>ADXR,ADX,DRAWNULL),LINETHICK2,COLORLIRED,CIRCLEDOT; MID:=REF(HIGH+LOW,1)/2; CR:SUM(MAX(0,HIGH-MID),26)/SUM(MAX(0,MID-LOW),26)*100,COLORRED; DRAWTEXT(ISLASTBAR,CR,'CR'),COLORRED; DRAWTEXT(ISLASTBAR,ADX,'ADX'),COLORLIRED; CR1:=REF(MA(CR,10),10/2.5+1); CR2:=REF(MA(CR,20),20/2.5+1); CR3:=REF(MA(CR,40),40/2.5+1); CR4:=REF(MA(CR,62),62/2.5+1); CRJ:1/10*CR1+2/10*CR2+3/10*CR3+CR4*4/10,COLORGREEN; DRAWICON((C-REF(C,1))/REF(C,1)*100>9.7,ADX,15);
|