相關標簽:
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,'當連續上漲到高位時,ADX下穿ADXR或下穿60時賣出;'),COLORGREEN;
DRAWTEXT_FIX(1,0.5,0.11,1,'當連續下跌到低位時,ADX下穿60時買入;'),COLORYELLOW;
DRAWTEXT_FIX(1,0.5,0.21,1,'當在低位盤整一段時間后,ADX上穿20時啟動;'),COLORMAGENTA;DRAWTEXT_FIX(C>O,0.01,0.9,0,' www.kzuj.com.cn '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'
程序化交易模型'),COLORRED;