MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14); HD :=HIGH-REF(HIGH,1); LD :=REF(LOW,1)-LOW; DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14); DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14); PDI:=DMP*100/MTR; MDI:=DMM*100/MTR; ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6); ADXR:EXPMEMA(ADX,6); DRAWTEXT_FIX(1,0.5,0.01,1,'當連續(xù)上漲到高位時,ADX下穿ADXR或下穿60時賣出;'),COLORGREEN; DRAWTEXT_FIX(1,0.5,0.11,1,'當連續(xù)下跌到低位時,ADX下穿60時買入;'),COLORYELLOW; DRAWTEXT_FIX(1,0.5,0.21,1,'當在低位盤整一段時間后,ADX上穿20時啟動;'),COLORMAGENTA; |
|
來自: 鬼舞十七 > 《技術(shù)指標》