Quote from giggollo:
Unfortunately, IB will liquidate your positions at 3:50pm even if you have MOC orders in for them. This is a major oversight by IB in designing their liquidation algorithms..either they're still using an algorithm designed before MOC orders existed, or whoever designed the algorithm totally forgot about MOC orders. It does not make sense because NASDAQ rules dictate that MOC orders cannot be cancelled after 3:50pm anway, and so if IB is evaluating your account for potential liquidation at 3:50pm as they do, they should consider positions for which MOC orders have been placed as "closed positions". Instead what ends up happening right now, is that if you place MOC orders and your SMA is less than zero at 3:50pm, they liquidate your positions and then the MOC orders still get executed (they cannot be cancelled after 3:50pm) resulting in you taking home net positions opposite to what you had before 3:50pm. This needs to be fixed by IB soon and i think they're already aware of it.
This will be changed in the near future.