MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),3);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),3);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),3);
pdi:=DMP*100/MTR;
mdi:=DMM*100/MTR;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,2);
ADXR:=EXPMEMA(ADX,2);
TYP:=(HIGH+LOW+CLOSE)/3;
C14:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DIF:=EMA(CLOSE,6)-EMA(CLOSE,13);
DEA:=EMA(DIF,5);
macd:=(DIF-DEA)*2;
XG:crOSS(ADX,ADXR) AND C14>REF(C14,1)*1.5 AND PDI>REF(PDI,1) AND MacD>REF(MACD,1)*2 AND MACD>0 ;