【通達(dá)信】買賣趨勢(shì)
VAS1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100; 牛:SMA(VAS1,7,1); VAS2:=SMA(牛,5,1); 熊:IF(CROSS(牛,VAS2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAS2*2,VAS2); DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238)); N:=14;M:=6; TR:=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/TR COLORWHITE; MDI:=DMM*100/TR COLORGREEN; ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M); ADXR:=EXPMEMA(ADX,M); STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040; STICKLINE(ADX<ADXR,ADX,ADXR,3,1),COLORGRAY; STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADX<ADXR AND MDI>ADXR*0.97,ADX,ADXR,2,0) COLORRED; {一、PDI>MDI且趨勢(shì)向上;二、ADX;ADXR在PDI及MDI中間金叉 } 走強(qiáng):DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走強(qiáng)'),COLORYELLOW; 50,COLORMAGENTA; AV4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100; 趨勢(shì)線:=(EMA(4*SMA(AV4,6,1)-3*SMA(SMA(AV4,6,1),5,1),3)),LINETHICK1,COLORBLUE; VAR1:=((C+2*L)/3-LLV(L,8))/(HHV(H,8)-LLV(L,8))*100; VAR2:=SMA(VAR1,2,1); 走勢(shì)線:SMA(VAR2,2,1) COLORYELLOW; 強(qiáng)弱線:EMA(SMA(SMA((HHV((3*H+C)/4,3)-(2*C+3*L)/5)/(HHV((2*H+C)/3,3)-LLV(L,3))*100,3,1),3,1),3),COLORGREEN; DRAWTEXT(CROSS(強(qiáng)弱線,75) AND 走勢(shì)線>5,強(qiáng)弱線,'分上下'),COLORWHITE; DRAWTEXT(CROSS(強(qiáng)弱線,85) AND 走勢(shì)線<10,強(qiáng)弱線,'要漲'),COLORMAGENTA; DRAWTEXT(走勢(shì)線<11 AND 走勢(shì)線>REF(走勢(shì)線,1),走勢(shì)線,'盯'),COLORWHITE; DRAWTEXT(CROSS(98,趨勢(shì)線),88,'逃命'),COLORGREEN; 逃命:IF(CROSS(98,趨勢(shì)線),80,90),COLORWHITE; |
|
來(lái)自: sxdtztz > 《我的圖書(shū)館》