IE:
your balance: $100
you order: Cover max STOCK worth $5m (order goes in, will take a couple of minutes to go through)
10 seconds later you order (before cover has been completed): Buy max STOCK at $50/share. HSX calculates that you can afford 2 STOCKs and orders them. (will take a couple of minutes to go through)
(1-2 mins later): Cover goes through. Your balance goes up to $5m +$100
10 seconds later: Buy goes through. You now own 2 x STOCKS valued at approx $100.
It does the trades in order. You just have to have the money already when you place it. HSX isn't going to upsize your order automatically just because you now have more money when the transaction goes through.
My only advice to you if this is really bugging you, is to keep more cash handy.