If you want to buy a stock at the open and sell it at the close of a day without manually having to be there yourself you can follow these steps.
1. Buy at open
This is easy, just create a market order. Your position will automatically get filled at or as close to the open as possible. (Sometimes even before it opens)
2. Sell at Close
To do this you have to make a contingency order, or an order that is based off of some third party event. For instance if you set it up to sell your stock at 12 o’clock that order will automatically become a market order at 12 and should be filled.
Each broker has their own way of doing this, so you can either figure out how to use your brokers software to make a contingency order or simply call them up and place the trade over the phone.
Just remember that if the broker cannot fill the trade it will not go through. So, if you live in California and the trading day ends at 1 O’clock and you decide to place a contingency order to sell your stock at say 12:55 you are taking the risk that the broker will not have enough time to match it with another trade.