Sorry, I am new to this terminology, I assume this means to move the long shares over to cover the short shares? In this example, are the margin requirements different since you own the shares? Reading online it seems there is a 150% margin requirement, but if you already hold the shares, it seems like there should be effectively no additional needed. For my specific use, I was trying to model some trading strategies and built a simple trading simulator. Since the trading would be entirely automatic, it wouldn't be at risk of making an error about which to do.
Yes, it basically zeroes out your account and you have no open positions on that stock. Regarding margin requirements shorting against the box, I had to look. It does in fact still require the same margin as holding the short overnight, plus an additional 5% on the long position.