Whoops, you're right, MT4 does support partial closing.

So what is the script doing?