Qidi tech x direction does not stop when coming to the end, keeps running and I have to switch the machine off. Machine is now standing. Very urgent

The bed size settings are wrong in the machine or the print software.
Marlin f/w has settings for bed size as does Repetier Host (that is what I use).
Any others will also have those settings.

If it is properly homed and the max bed size is correct, it will stop.

If your prints are not properly proportioned, then your steps/mm is incorrect which might also try to run it past the end.

This is usually caused by a bad stepper cable. It is a well known issue. If the machine is fairly new then contact QIDI and they will assist.