PPU:=SUM(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),8);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0&&HD>LD,HD,0),8);
DMM:=SUM(IF(LD>0&&LD>HD,LD,0),8);
pdi:= DMP*100/PPU;
mdi:= DMM*100/PPU;
ADX:= MA(ABS(MDI-PDI)/(MDI+PDI)*100,5);
ADXR:=(ADX+REF(ADX,5))/2;
DI:=PDI<=3;
A:=FILTER(DI,5);
YYD:=(C-REF(C,1))/REF(C,1)*100>=9.91 AND H=C ;
YYA:=BArslAST(YYD);
SA:A AND YYA<=10;