EA manages the positions looking at their magic numbers. So if you want to close a position(s) outside of the EA quickly you need to use this script.
If your EA uses automatic magic number, you need to set the auto_magic_number option to true. Otherwise set it to false and use the same magic number with the EA. The other inputs are straightforward.