Order types: market, limit and stop orders explained
By Oalgo · Last reviewed
An order type tells the venue how to fill an order. A market order fills straight away at the best price available. A limit order fills only at your price or better. A stop order waits until price reaches a trigger level, then becomes a market order.
How do market, limit and stop orders differ?
#| Market | Limit | Stop | |
|---|---|---|---|
| What you set | The size only | A price | A trigger price |
| When it fills | Straight away | Only when price reaches your price or a better one | Only after price reaches the trigger |
| Fill price | What the venue can give at that moment. It can differ from the last price shown. | Your price or better | After the trigger it acts as a market order, so the price can differ from the trigger. |
| What you accept | The price | That it may never fill | The price after the trigger, and that it may never trigger |
| Often used for | Entering or leaving at once | Entering at a chosen price, or an exit target | A stop loss, or an entry once price moves past a level |
A stop-limit order is a stop that becomes a limit order instead of a market order. It sets a price limit after the trigger, so it can fail to fill if price moves past it.
What does a worked example look like?
#The last price is 100 and you want to buy. All prices here are made up, and real fills depend on the venue.
| Order | What you set | What happens | Fill price |
|---|---|---|---|
| Market | Size only | Fills at once. The best sell offer is 100.2. | 100.2, which is 0.2 above the last price |
| Buy limit | 98 | Price falls and the order fills at 98 or better. | 98 |
| Buy limit | 95 | Price never falls to 95. | No fill |
| Buy stop | 103 | Price rises through 103. The order becomes a market order, and the next price available is 103.4. | 103.4, which is 0.4 above the trigger |
The market order got the fill and paid 0.2 more than the last price. The limit order got its price and waited. The stop order got an entry above 103, and the price after the trigger was not the trigger.
How do order types appear in a test?
#- A candle shows its open, high, low and close, not the order of the trades inside it. A test can see that a candle reached a price. It cannot see how many orders were waiting at that price before yours.
- If one candle reaches both a stop and a target, the test cannot know which came first. Oalgo's test books the stop.
- If a candle opens beyond a stop, the test fills at the open, not at the stop price. The stop loss page shows an example.
- Slippage is the difference between the price a rule saw and the price it filled at. Market and stop orders can show it, because they fill at the price available.
Which order types does Oalgo use?
#In Oalgo you can tell Oalgo AI your rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue. Your Live Strategy sends your instructions, and your Supported Venue alone executes them as orders.
- The Go Live settings have an Entry orders section. Its order type is Market or Limit, and Market is the starting choice.
- With Limit chosen, you also set the number of limit retries (3 at first) and whether to then use a market order, or cancel.
- The exit target has its own order type in the same settings: Market or Limit, with Market as the starting choice.
- A Slippage warning setting (0.5% at first) only alerts you. It does not stop anything.
- The settings are locked while the Live Strategy runs. To change them, you stop it and start it again.
- Pressing Stop on a running Live Strategy cancels its open orders and closes its position at market price. The Go Live review says so before you start.
What can order types not tell you?
#No order type gives you both the price you want and a certain fill. Which one fits is a choice about what you accept: the price, a missed fill, or the price after a trigger. A fast move can carry price past your level between the trigger and the fill. A test of a limit order is an estimate, because candles hide the order of trades inside them.
Read next
- What is slippage? Why a fill differs from the chart priceSlippage is the gap between the price a trade was expected to fill at and the price it got. Learn why it happens and how a backtest counts it as a cost.
- What is a stop loss? How to set oneA stop loss closes a trade when price moves a set distance against it. Learn how a stop is set, what it cannot promise, and what a Live Strategy needs.