The scenario you describe is very common and can be frustrating for any type of investor. Many traders will identify a potentially profitable setup and place a limit order after hours so their order will be filled at their desired price or better when the stock market opens. The problem is that many buyers do the same thing, and the increased demand can cause the price of the stock to gap higher.
A limit order is ineffective when the price of the underlying jumps above the entry price because the limit price is the maximum amount the investor is willing to pay, and in this case, it is currently below the market price. You can minimize the chances of this situation happening again if you understand two types of orders: the buy-stop order and the buy-stop-limit order.
A buy-stop order is a type of order that is transformed into a market order once the stated stop price has been reached. To explain how this would work, let's consider a hypothetical example. Let's say the current price of XYZ Company is $12.86 and it looks like it is positioned to go higher. You may wish to place a buy-stop order with the stop price set at $13.01. This order would turn to a market order once the market price rose above $13.01. By using this type of order, you would eliminate the problem of not getting filled when the price rises above your desired entry price.
Unfortunately, by using this order you run the risk of getting filled at an unwanted level if the price surges drastically higher. For example, if the price of XYZ Company opens the next day at $17, the buy-stop order will be triggered and you will buy the shares near $17 instead of around $13, as you wanted.
Using an order known as a buy stop limit is a way for you to eliminate the chance of getting a bad fill and to limit the price that is paid for the asset. This order is similar to the buy-stop order, except that a limit price is also set as the maximum amount the investor is willing to pay. For example, assume a buy-stop-limit order is set on XYZ Company with a stop price at $13.01 and a limit price set at $15. If the price jumps to $17, this order will not get filled because you specified that you don't want to pay more than $15.
Once you are comfortable with these order types, you will increase the likelihood of your orders getting filled when and how you want them to be filled. If you want to get started trading check out Investopedia's list of the best stock brokers for day trading.