Limit Order Trading Strategy

Limit Order Trading Strategy (Video, Rules, Backtest, Example)

Different order types can result in vastly different outcomes, which is why it is important to understand the type of order you use. If you want your order to be filled at your specified price, go for a limit order. But what is a limit order strategy?

A limit order strategy is an order to buy or sell a security at a specific price or better. It comes with a specification of the maximum price to be paid or the minimum price to be received, known as the “limit price”.

In this post, we take a look at the limit order strategy, and at the end of the article, we make a backtest of a limit order strategy.

What is a limit order?

A limit order is an order to buy or sell a security at a specific price or better. It comes with a specification of the maximum price to be paid or the minimum price to be received, and this is known as the “limit price”. The limit order is usually placed away from the current market price, and it sits there waiting for the price to reach the specified level.

When the order is filled, it will only be at the specified limit price or a better price. So, it gives the trader more control of the price they get in at. However, there is no assurance of its execution, as the price might not get to the specified price, resulting in missed trading opportunities. While a limit order may be appropriate when you think you can get in at a better price, you may end up missing the trade entirely.

It is also important to note that for many brokers, a limit order is usually valid for a specific number of days until the order is filled or until the trader cancels the order.

Types of limit orders: buy limit order and sell limit order

There are two types of limit orders: the buy limit order and the sell limit order.

A buy limit order is an order to buy a security at the specified limit price or lower. The order is placed below the current market price with the hope that the price will fall lower to its level and then reverse.

A sell limit order, on the other hand, is placed above the current market price and can only be executed at the specified limit price or higher.

An example of a limit order (buy and sell limit order)

Let’s say Apple Inc’s (AAPL) stock is trading around $150 per share, and you believe it could fall to $130 in the coming days or weeks. You can set a buy limit order to purchase the stock at $130 per share, good ’til canceled. The order will remain open until the stock reaches the specified limit price, and your order gets filled at $130 or lower, or you cancel the order.

Similarly, if you want to sell Microsoft Corp.’s (MSFT) stock but think that its current price of $237 per share is too low and believe that it could rise to $300 per share in the coming weeks, you can set a sell limit order at $300. When the price rises to that level, your order will be filled at $300 or higher.

Which is better — stop or limit order?

It depends on what you want:

A limit order will only be filled at the specified limit price or better; whereas once a stop order triggers at the specified price, it will be filled at the prevailing price in the market so that it could get filled at a worse price.

The limit order gives you control of the price to get in at but there is no assurance of execution with limit orders. It may not be triggered before the market turns and makes the anticipated move, making you miss the move. On the other hand, the stop order allows you to get in along the momentum. If it doesn’t trigger, it means the expected move never happened and you won’t miss out on anything.

Limit orders can be seen in the order book, so the market can see your order and the anticipated move. Stop orders can’t be seen by the market, allowing you to mask your entry if you place huge orders.

Limit order strategy backtesting – some thoughts on limit orders

We used to day trade by using limit orders. For mean reversion strategies limit orders can work very well, and less so for trend following strategies. The reason is simple: Mean reversion involves buying on weakness and selling on strength, thus you can “wait” for the market to hit your orders.

That said, limit order strategies are a bit difficult to backtest (sometimes), and you need to be sure the data is correct.

We briefly explain how you can backtest a limit order strategy:

Let’s assume you have a trading idea that you want to enter positions straight after the open, for example, within the first 30 minutes. You hypothesize that plenty of stocks get “shaken out” during the first minutes, and the weak hands are filtered out for the more “knowledgeable” players. During the 2000s, this “shakeout” strategy was popular and worked reasonably well.

Whether or not the “shakeout” reasoning is still correct is not part of this article. But for the sake of argument, let’s assume so.

How do you go about backtesting such a strategy with proper trading rules and settings?

The first thing you would need is a proper dataset. The reason why is that you face two problems:

  • Fake prints. Many stocks show a low in the first minutes, which is incorrect. One of the reasons is trades that are reported from the day before (or even earlier).
  • Low volume. The low might be correct, but the stock is thinly traded, thus, you would likely get a partial fill or no fill at all. Actually, trading with limit orders means many trades are traded just a cent away from your limit price (coincidence, eh?).

Your backtest will most likely overrate the statistics and trading performance because of the two problems mentioned above and turn the strategy more or less useless when you start live trading. The problem is you are more likely to get the losers and not the winners!

This is not theory, we have seen traders ourselves being super optimists after backtesting only to get completely demotivated when the strategy shows losses instead of wins. Even worse, we have also been fooled by such promising backtests.

Can you remove the bad data in a backtest?

Yes, to a certain degree.

First, you can only use data between the open and the close. The open and close are mostly correct.

Second, perhaps the best option is to subscribe to a data provider that has good data. We recommend Norgate. They only provide daily data (not intraday) but our experience is that this is the best data, but it comes at a bit steeper price than most other providers. But if it can save you from unnecessary losses, we believe it’s worth the price.

Limit order strategy – a backtest

Let’s show you an example of a simple backtested trading strategy that involves a limit order. Because we are skeptical of using low and high data when backtesting, we use the open as a limit order.

First, let’s backtest the following trading rules without using a limit order:

  • Buy at the close when the 2-day RSI drops below 10.
  • Sell at the close when the close ends higher than yesterday’s high (this is the QS exit).

When we backtest the strategy on Nasdaq 100 and its corresponding ETF with the ticker code QQQ, we get the following equity curve:

Since its inception, the strategy has generated 0.89% per trade (10.4% annual returns) while only being invested 18% of the time. In other words, buying the dip has worked well (but there is, of course, no guarantee it will continue doing so in the future).

However, buying at the close is “after the fact”. In real life and trading, it can be done by buying just a few seconds before the close (like we do ourselves), or during after hours.

Another option is to use a limit order the next trading day. But that has the disadvantage that you are not invested through the night, which over the last three decades is where all the gains have come from. We have covered and backtested that in an article about 8 Night Strategies Trading.

Let’s change the trading rules:

  • Yesterday ended with a 2-day RSI below 10; and
  • Today’s open is lower than yesterday’s close;
  • Then we buy today’s OPEN.
  • Sell at the close when the close ends higher than yesterday’s high.

We put in an opening only (OPG) limit order which equals yesterday’s closing price. We do an opening-only limit price and do not utilize the range down to the LOW price due to the fact that many LOW readings are not correct.

When we backtest the new open limit order trading rule, we get the following equity curve:

We get a lot fewer trades and less exposure time invested in the market (from 18% to 9%). But the average gain per trade goes up to 1.12% from 0.89%. As a result of the fewer trades, annual returns drop to 7.6%. The higher average gain per trade is not enough to offset the lower time invested.

Trading is always about different trade-offs. This is one of them. By using a limit order the next trading day you miss many profitable trades, but the average gain per trade might go up (and perhaps also max drawdown).

List of trading strategies

We have written over 1000 articles on this blog since we started in 2012. Many articles contain specific trading rules that can be backtested for profitability and performance metrics.

The Amibroker code for the backtested positional trading strategy is included in the package.

The trading rules are compiled into a package where you can purchase all of them (recommended) or just a few of your choice. We have hundreds of trading ideas in the compilation.

The strategies are taken from our source of what are the different types of trading strategies. The strategies are an excellent resource to help you get some trading ideas.

The strategies also come with logic in plain English (plain English is for Python traders).

For a list of the strategies we have made please click on the green banner:

These strategies must not be misunderstood for the premium strategies that we charge a fee for:

FAQ limit order strategy

We end the article with a few frequently asked questions about the limit order strategy:

What is a limit order?

A limit order is used in trading to buy or sell a security at a specific price or better. Limit orders are typically used to protect profits and limit losses.

What is the benefit of using limit orders?

The main benefit of using limit orders is that traders can set a specific price point and guarantee that their order is executed at that price or better. This eliminates the risk of placing a market order and having the trade filled at an unfavorable price. It also helps to protect against slippage, which is the difference between the expected price of a trade and the price at which it is filled.

Is a limit order a good idea?

It depends on your time frame and the liquidity of the stock you are looking at. Are you planning to own a stock for many years and the stock is liquid, you are probably better off buying at the market and forgetting about it.

Are you a swing or short-term trader, you would probably use a limit order not to get too much slippage.

How do you profit from a limit order?

It’s difficult to measure the profits directly from a limit order – it’s probably an indirect saving. The main benefit is potentially less slippage, but it comes at a cost: If the limit order is too low you won’t get filled.

What is the disadvantage of a limit order strategy?

The main disadvantage is that you might not get filled. Unlike a market order, you are not guaranteed to get a fill.

What types of limit orders are there?

There are two types of limit orders: buy limit orders and sell limit orders. A buy limit order is an order to buy a security at or below a specified price, while a sell limit order is an order to sell a security at or above a specified price.

How do limit orders work?

Limit orders are placed with a broker, who will then attempt to fill the order at the specified price. If the price of the security moves in the opposite direction of the order, the order will not be filled. If the price of the security moves in the direction of the order, the order will be filled at the specified price or better.

What is a limit order strategy?

A limit order strategy is a trading strategy that uses limit orders to buy and sell securities. This strategy is typically used to protect profits and limit losses by setting predetermined entry and exit points. The goal of a limit order strategy is to take advantage of specific price points in the market while minimizing risk.

Similar Posts