Ready to go further
Next: see how a trailing stop behaves
The trailing stop guide simulates 2,000 paths to show what a tight and a wide trail trade off.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- A stop loss (stop market) order becomes a market order when the stop price trades. It almost always fills, at a price that can be worse than the stop.
- A stop limit order becomes a limit order when the stop price trades. It fills only at the limit or better, so it controls the price and gives up the certainty of a fill.
- Neither is better in every case. In the four made-up scenarios below the stop limit did better in 2, worse in 1 and the same in 1 (calculated by us on 28 Oct 2026, exact).
- The stop limit risk is being left in a falling trade with no stop at all. The stop market risk is selling at the bottom of a dip.
- A bot needs to handle an unfilled stop limit, because the position is open and nothing is protecting it.
The setup
You buy 100 units at 100. The stop price is 98, so the plan is to lose at most (100 - 98) x 100 = $200. For the stop limit, the limit is 97.5: after the stop price trades, the order will sell at 97.5 or higher but not below it. Here is what each does in four situations. The fills are made up, and real fills depend on the market at that moment.
| Scenario | What the price does | Stop loss fill | Stop limit | Stop loss result | Stop limit result |
|---|---|---|---|---|---|
| Slow slide | Price drifts through 98 to 97.9 and keeps sliding to 96 | 97.9 | filled at 97.9 | -$210 | -$210 |
| Fast dip, then bounce | Price jumps from 98.2 to 96.5 with no trades between, then recovers to 99 | 97 | not filled, still open | -$300 | -$100 (paper) |
| Gap down, keeps falling | Price opens at 95 and falls to 92 | 95 | not filled, still open | -$500 | -$800 (paper) |
| Gap down, rebounds | Price opens at 95 and recovers to 99 | 95 | not filled, still open | -$500 | -$100 (paper) |
In the slow slide both orders fill at nearly the same price, so there is no difference. In the fast dip the stop loss sold at 97, near the low, for -$300, and the stop limit never filled, so the position was still open when the price came back to 99, with a paper result of -$100. In the two gap scenarios the price opened below the limit of 97.5, so the stop limit could not fill. When the price kept falling to 92, the open position was down $800, against $500 for the stop loss. When the price rebounded to 99, the open position was down only $100 against $500 locked in.
The lesson is not that one is safer. The stop loss gives you the certainty of leaving and the uncertainty of the price. The stop limit gives you the certainty of the price and the uncertainty of leaving.
Choosing between them
- Use a stop loss when leaving matters more than the exit price. A bot that must cap risk, with a position size set from the worst fill, usually wants the certainty of closing. See stop loss orders.
- Use a stop limit when the price matters and you can watch the trade. A thin market where a market order could sell far below the last price is the usual reason. The cost is monitoring an order that may not fill.
- Widen the gap between stop and limit. A limit further below the stop fills more often and gives up some price control. A limit right at the stop fills least often.
Where bots go wrong
- Not handling the unfilled case. The bot thinks the stop worked, and the position is still open.
- Sizing from the stop price. With either order, the loss is not capped at the stop. Size for the worst plausible fill, as in slippage.
- Testing with perfect fills. A backtest that fills every stop and every stop limit at its price is too kind, as in backtesting.
- Different broker rules. Some platforms trigger on the last trade, the bid or a mark price, and some do not allow stop limits in every market. Read the order rules of yours.
How to check your orders
Take the worst gap in your data and walk both orders through it. Ask what the bot does when the order does not fill, and test that path on its own in paper trading. Work out the position size with the position size calculator so the worst fill fits your risk, and see how a moving stop behaves in the trailing stop guide.
What this page does not tell you
It does not say which order to use. The prices and fills are made up, and this is education, not advice.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What is the difference between a stop limit and a stop loss order?
A stop loss becomes a market order when the stop price trades and nearly always fills, at any price. A stop limit becomes a limit order and fills only at the limit price or better, so it may not fill.
Which is better, a stop limit or a stop loss?
Neither in every case. A stop loss gives certainty of exiting and uncertainty of the price. A stop limit gives certainty of the price and uncertainty of exiting.
What happens if a stop limit order does not fill?
The position stays open and unprotected. A bot or a person has to notice and decide what to do, and the loss can grow while the price keeps falling.
Can a stop loss order lose more than expected?
Yes. After a gap or a fast fall it fills at the next available price, which can be well below the stop price.
Should a trading bot use stop limit orders?
Only if it handles the unfilled case explicitly and the tests use realistic fills. Many bots use a stop loss because closing the position matters more than the price.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education about order types. The prices and fills are made up and it does not consider your situation.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss