手机端
当前位置:爱约股 > 公式技巧 > 将DMI选股指标合并

将DMI选股指标合并

下面二个选股公式一个是系统指标DMI 另一个为改了参数的DMI指标 (1): N:=3;MM:=2; 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*100/MTR; MDI:= DMM*100/MTR; ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM); ADXR:=EXPMEMA(ADX,MM); AA:CROSS(PDI,MDI); (2): N:=14;MM:=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&&HD>LD,HD,0),N); DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N); PDI:= DMP*100/MTR; MDI:= DMM*100/MTR; ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM); ADXR:=EXPMEMA(ADX,MM); CROSS(ADX,ADXR); 请老师将上面二个公式合并成一个指标 谢谢老师了

爱约股解答:

N1:=3;MM1:=2;

MTR1:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N1);

HD1:=HIGH-REF(HIGH,1);

LD1:=REF(LOW,1)-LOW;

DMP1:=EXPMEMA(IF(HD1>0&&HD1>LD1,HD1,0),N1);

DMM1:=EXPMEMA(IF(LD1>0&&LD1>HD1,LD1,0),N1);

PDI1:= DMP1*100/MTR1;

MDI1:= DMM1*100/MTR1;

ADX1:= EXPMEMA(ABS(MDI1-PDI1)/(MDI1+PDI1)*100,MM1);

ADXR1:=EXPMEMA(ADX1,MM1);

XG1:=CROSS(PDI1,MDI1);      

 

 

N2:=14;MM2:=6;

MTR2:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N2);

HD2:=HIGH-REF(HIGH,1);

LD2:=REF(LOW,1)-LOW;

DMP2:=EXPMEMA(IF(HD2>0&&HD2>LD2,HD2,0),N2);

DMM2:=EXPMEMA(IF(LD2>0&&LD2>HD2,LD2,0),N2);

PDI2:= DMP2*100/MTR2;

MDI2:= DMM2*100/MTR2;

ADX2:= EXPMEMA(ABS(MDI2-PDI2)/(MDI2+PDI2)*100,MM2);

ADXR2:=EXPMEMA(ADX2,MM2);

XG2:=CROSS(ADX2,ADXR2);

TAG:
分享至:

相关推荐