TR1:=MAX(Abs(H-REF(H,1)),ABS(L-REF(L,1)));
DMZ:=IF((H+L)<=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
DMF:=IF((H+L)>=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
DDZ:=SUM(DMZ,13)/(SUM(DMZ,13)+SUM(DMF,13));
DDF:=SUM(DMF,13)/(SUM(DMF,13)+SUM(DMZ,13));
ZX:=DDZ-DDF;
MZX:=SMA(ZX,30,10);
AD:=MA(MZX,30);
KX:=EMA(C,7)-EMA(C,19),COLORWHITE;
MX:=EMA(KX,9);
DX:=2*(KX-MX),COLORCYAN;
XG:crOSS(DX,KX);