When you place a buy order, a portion of your cash will be earmarked (set aside) for payment. This amount will only be transacted once the order is matched.
When you place a sell order, a portion of your gold will be earmarked for sale. This amount will also only be transacted once the order is matched.