The order must transact first( must be filled). When you place an order to buy, there must be another party willing to sell you the shares for whatever it is you are willing to pay. You can set a limit order to buy, denoting the most you are willing to pay for each share, or you can pay the ask, that means pay what the person is asking for their shares. Two sides to every trade. Once the order is completed as filled the shares then become part of your portfolio. I hope this helps