Stop-Loss Order
A stop-loss order is a resting sell order that triggers when price falls to a set level. It caps the loss on a position at roughly the distance between entry and stop. Once triggered it normally becomes a market order, so the fill can land below the stop price if the market gaps through it. A stop-loss turns an open-ended risk into a defined one, and the price is that it sometimes sells the low of a dip that would have recovered.
Both halves of that sentence can be measured. The evidence is the 12 strategy templates run on 59 ETFs from 2021-01-04 to 2026-10-02, with $10,000 starting cash, no margin and daily-decision rules, plus market profiles for SPY, QQQ, TLT, TQQQ, IWM and UVXY. The headline runs have no fees or slippage. The questions are how often a stop of a given width would have been hit on these funds, how large the overnight gaps were that a stop cannot control, and what the two templates that use trailing stops did.
Two related terms carry most of the detail. A trailing stop follows the price up and never moves down. A take-profit order is the matching exit above entry. The wider topic is risk management, which also covers position sizing and exposure caps. The numbers below are hypothetical results on one window and describe what happened, not what a stop will do on the next move.
How often a 10% drawdown arrived
One way to size a stop is to count how often a fund fell by the stop distance. The library counts episodes where a fund was 10% below its 20-day high, the trigger used by the dip buyer template. SPY had 11 such episodes covering 23 days in the 1,444 sessions of the window. QQQ had 21 episodes over 82 days and IWM had 26 over 67 days. TQQQ had 56 episodes over 478 days, and UVXY had 81 over 1,130 days. TLT had 3 episodes over 5 days.
TLT is the case that separates fast losses from slow ones. It fell 44.06% from its peak on 2021-01-04 to the low on 2023-10-19 and had not recovered by the end of the window. Yet it had only 3 episodes of a 10% drop from a 20-day high. The loss came as a slow decline, with TLT spending 35.18% of sessions above its 200-day average and crossing it 95 times. A fixed stop that sits 10% under entry would have been hit, since the cumulative decline was large. A tight stop on a rally would have been hit many times. The loss was spread across a long period, so a drawdown measured from a 20-day high rarely appeared.
For equity funds the picture is different. SPY's worst drop was 24.51%, from 2022-01-03 to 2022-10-12, with recovery on 2023-12-13. QQQ fell 35%, from 2021-11-19 to 2022-11-03. TQQQ fell 81.68% from 2021-11-19 to 2022-12-28, and recovery came on 2024-12-04. A stop at 10% or 15% would have been touched on the way down on all three. What the stop would have done next is the open question, because every one of those funds eventually recovered. SPY's buy-and-hold ended at $21,820.48 and QQQ's at $24,264.64. A stop that sells in 2022 and does not re-enter locks in the loss and misses the recovery.
The worst months give the same scale. SPY's worst month was September 2022 at -9%, and QQQ's was April 2022 at -13.14%. TQQQ lost 36.68% in April 2022 alone. IWM's worst month was April 2022 at -9.58%. A stop 10% below entry sits close to the worst month on SPY and well inside the worst month on TQQQ.
The kinds of stop and what each one does
A plain stop sits at a fixed price below entry. If a position is bought at $100 and the stop is set at $90, the stop triggers when the market trades at $90. The loss is capped near 10% before costs. A trailing stop sits a fixed percentage below the highest price reached since entry. In an uptrend it ratchets higher and never lowers. The exit is therefore a set distance from the peak, and a position can be closed with a gain after a large run.
A stop-limit order adds a limit price. It triggers at the stop but only sells at the limit price or better, which avoids a bad fill and risks no fill at all. In a fast decline the market can pass through the limit, and the position stays open. A market stop always fills, at whatever price the market offers.
A time stop is not a price level. The weekly 7% target template buys at the first open of each week, rests a +7% profit target, and exits Thursday afternoon if the trade is losing. That Thursday exit is a time-based stop. It caps how long a losing trade can run, and not how far it can fall.
Trend filters work as indirect stops. The 200-day regime filter holds cash when price closes below its 200-day average, which exits a falling fund without a fixed percentage. The golden cross does the same with a 50-day and a 200-day average. These rules decide at the close and act at the next open, so they accept a gap in exchange for ignoring intraday noise.
Why the fill can be worse than the stop price
A stop is a trigger and does not fix the fill price. The market can open below the stop level, and the first available price is then the fill. The size of that effect depends on the fund. The profiles in the library measure the average overnight gap, the move from one close to the next open.
SPY averaged an overnight gap of 0.44% and QQQ 0.59%. TLT averaged 0.54% and IWM 0.61%. The leveraged TQQQ averaged 1.78%, and UVXY averaged 2.53%. For a 10% stop on SPY, a typical gap is a small part of the distance. For a tight 2% stop on TQQQ, a typical gap is most of it, so the realised loss can be well past the stop level on days when the fund opens lower.
Overnight moves also carry most of the return on some funds. SPY's overnight log return was 49.65% against 29.84% intraday, which puts 62.46% of its return in the overnight session. TQQQ had 74.87% overnight. For TLT the overnight share was 136.58%, because the intraday return was negative. Stops work during the session. When most of the movement happens overnight, a resting stop is exposed to the one period it cannot act in.
The average intraday range shows how much room a stop needs during the day. SPY's was 1.15%, QQQ's 1.58%, IWM's 1.75% and TLT's 0.94%. TQQQ's was 4.74%, and UVXY's was 7.03%. A stop set inside a fund's normal daily range will trigger on noise. A 2% stop on SPY sits beyond its average range, while the same stop on TQQQ sits well inside its average range.
The average losing day gives another yardstick. SPY's average down day was -0.74%, QQQ's -1.06%, TQQQ's -3.22% and UVXY's -4.02%. A stop that is one or two average down days away from the price will be touched by ordinary variation, and that is the sense in which tight trails exit on noise.
What the two trailing-stop templates did
Two of the 12 templates use a trailing stop as the exit. The trend plus trailing stop template enters when price is above the 200-day average and exits only when a 15% trailing stop is hit. Across 59 ETFs its median CAGR was 2.61%, its median max drawdown was 31.15% and its median round trips were 4. It beat buy-and-hold on 20 of 59 funds. The median drawdown is the highest of any template except the monthly cycle at 36.63%, which shows the point of a wide stop. A 15% trail permits a 15% loss from the peak before it acts, and by the time it exits the position can be much further below the entry of a prior cycle.
The momentum breakout template buys after a +10% four-week burst and uses a 10% trailing stop. Its median CAGR was 0%, its median max drawdown was 20.1% and it made a median of 6 round trips. It beat buy-and-hold on 21 funds. The tighter stop gave a shallower median drawdown than the wider one on the trend template, and the entry rule fires rarely enough that the median fund earned nothing.
Compare these with rules that have no stop. The RSI mean reversion template has no stop and no target. Its median drawdown was 24.63% and it beat buy-and-hold on 25 funds. The RSI(2) snapback exits when RSI(2) recovers above 70, has no stop, and had the shallowest median drawdown of the twelve at 17.47% because it held positions only briefly, with a median of 166 round trips. Short holding time capped the drawdown without a stop at all.
The golden cross had a median drawdown of 21.84% with 3 round trips, and the 200-day regime filter 22.16% with 18. Both use an average crossing as the exit and beat the trailing-stop trend template on drawdown. Across the twelve, medians between 17.47% and 36.63% cover every exit style, and no stop type removed the drawdown. The exit rule changes how the loss arrives more than how large it is.
Stops also change how a fund's leverage matters. On the leveraged funds, a stop expressed as a percentage of price triggers much sooner in terms of the index move, since TQQQ's average down day is -3.22% against -1.06% for QQQ. A 10% trail on TQQQ is only a few average down days from the peak, and on QQQ it is further away in the same units.
Setting a stop in an automated strategy
In DeployQuant a stop is a block or a line of code in the strategy. A block reads as a sentence, for example WHEN the market opens, IF invested AND price is 15% below the highest close since entry, THEN sell the whole position. The AI builder can write the same rule from a description, such as "add a 15% trailing stop", and the code view takes the same instruction as an edit. Every change is checkpointed, so undoing it is one click, and the history lists each backtest run with its return.
The order type that implements the stop depends on the broker. Alpaca accepts stop, stop-limit and trailing stop orders. Charles Schwab accepts stop, stop-limit and trailing stop orders as well. Webull accepts stop and stop-limit orders and has no trailing stop type in the list, so a trailing exit on Webull has to be tracked by the strategy and sent as a sell order when it triggers. The broker pages for Alpaca, Webull and Charles Schwab list the order types and time in force.
A backtest decides on daily bars and fills on minute bars, so a stop in the backtest triggers on the minute that crosses the level. The trade list shows the fill price, and the decision log shows the prices and indicator values the strategy saw. That is how a stop that fired on noise can be told apart from one that fired on a real decline.
Limits on the platform side bound what a bad stop can do. Price bands refuse limit orders priced too far from the market. Per-order and per-position dollar caps never block an order that reduces exposure, so a stop-driven sale is not held up by them. Dry-run mode runs the whole order flow without sending an order to the broker, which allows a stop rule to be rehearsed before real money is involved. One switch pauses a single strategy, and another pauses every strategy on a broker connection.
Each strategy runs in its own sleeve, so a stop that sells everything sells only that strategy's positions. The other sleeves in the account are unchanged.
What this evidence covers
The window is 5.74 years and includes one large bear market, the 2022 decline, followed by a strong recovery. Stops that look protective in that decline look costly in the recovery that followed. A different window would weigh the two differently. The headline runs have no fees or slippage, and the 5 and 10 basis point cost runs are on each backtest page. Gap risk is described with averages here, and a single large overnight move can be much bigger than the average.
Only two templates use a trailing stop, and each has one stop width. The tests do not sweep stop distance across funds, so the table of medians cannot say which width is best. The per-fund backtest pages for the trend plus trailing stop template show the parameter variants for each fund.
Frequently asked questions
What is a stop-loss order?
A stop-loss order is a resting sell order that triggers when price falls to a set level. It caps the loss on a position, and once triggered it typically becomes a market order. The fill can be below the stop price if the market gaps through it.
What is the difference between a stop-loss and a trailing stop?
A plain stop sits at a fixed price. A trailing stop sits a fixed percentage below the highest price reached and only moves up. The trend plus trailing stop template uses a 15% trail and the momentum breakout template uses a 10% trail.
Can a stop-loss fill below the stop price?
Yes. If the market opens below the stop, the first available price is the fill. The average overnight gap was 0.44% on SPY, 1.78% on TQQQ and 2.53% on UVXY, so the exposure to gaps depends heavily on the fund.
Did stops reduce drawdowns in the backtests?
Not by themselves. The trend plus trailing stop template had a median max drawdown of 31.15% across 59 funds, while the RSI(2) snapback, which has no stop, had 17.47%. The exit rule changes how a loss arrives, and no exit style removed the drawdown.
How tight can a stop be before it triggers on noise?
It depends on the fund's daily range. SPY's average intraday range was 1.15%, TQQQ's was 4.74% and UVXY's was 7.03%. A stop inside a fund's normal range will trigger on ordinary variation.
Which brokers support trailing stop orders?
Per the broker pages, Alpaca and Charles Schwab list trailing stop orders. Webull lists limit, market, stop and stop-limit orders, so a trailing exit there is managed by the strategy.
Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.
Related terms
Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.