|
AA:= SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),P);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),P);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),P);
PDI:= DMP*100/AA;
MDI:= DMM*100/AA;
ADX:= MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
TJ1:=cross(PDI,MDI);
TJ2:=CROSS(PDI,ADX);
TJ3:=CROSS(PDI,ADXR);
TJ4:=TJ1 AND TJ2 OR TJ2 AND TJ3 OR TJ1 AND TJ3 OR TJ1 AND TJ2 AND TJ3;
XG:TJ4 AND C/REF(C,1)>=1.05; |
|