MTR :=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1); HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SMA(IF(HD>0 ,HD,0),N,1);
DMM:= SMA(IF(LD>0 ,LD,0),N,1);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
MTRz := SMA(MAX(MAX(ABS(OPEN-CLOSE),ABS(CLOSE-REF(CLOSE,1))),ABS(OPEN-REF(CLOSE,1))),N,1);
HDz := CLOSE-REF(CLOSE,1);
LDz := REF(OPEN,1)-OPEN;
DMPz:= SMA(IF(HDz>0 ,HDz,0),N,1);
DMMz:= SMA(IF(LDz>0 ,LDz,0),N,1);
PDIz:=DMPz*100/MTRz;
MDIz:=DMMz*100/MTRz;
多:(PDI+PDIz)/2;
空:(MDI+MDIz)/2;
ADX:=SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1);
ADXR:=(ADX+REF(ADX,N))/2;
VHF:=(HHV(CLOSE,z)-LLV(CLOSE,z))/SUM(ABS(CLOSE-REF(CLOSE,1)),z)*100-10;
DRAWICON(CROSS(多,空)AND VHF>18 AND ADXR>17 ,多,1);
DRAWICON(CROSS(空,多)AND VHF>18 AND ADXR>17,多,2);
|
