TR:=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))));
DIZ:=SUM(DMZ,13)/(SUM(DMZ,13)+SUM(DMF,13));
DIF:=SUM(DMF,13)/(SUM(DMF,13)+SUM(DMZ,13));
DDI:DIZ-DIF,COLORSTICK;
ADDI:SMA(DDI,30,10);
AD:MA(ADDI,5);