You cannot buy based on today’s close price after you know today’s close price. Close price isn’t known even when the market closes, and may vary substantially from expected closing price after the closing price is published a few seconds to minutes after market closes. Orders for the closing auction are submitted all day, while the closing price is reported after the market closes. The closing price may vary substantially from what it was if you’d issued an order before the market closed. Also, there is a cutoff time for submitting closing orders.