You can buy and sell on the same day as long as your funds are settled. You can buy with unsettled funds just do not sell before they settle because that is considered a "free ride" although this sounds good "they" do frown on it.