Guides to 24/7 trading agents rarely say where the agent runs. On a laptop, closing the lid suspends the bot, but the position stays open in your exchange account. Whether it is still protected depends on where the stop lives. A conditional order resting on the exchange can trigger while the laptop sleeps. A stop that exists only as if price <= stop: in your script does nothing until the process wakes up.
Why the script stop goes blank
A local stop needs three things: a market-data connection, a loop that compares price to the stop, and a call that sends the order. When the machine suspends, all three freeze. After wake-up the script sees the latest price, and by then the market may already have gone through your level and kept going. An exchange-side stop is different, because the exchange watches it whether or not your client is online. Trigger rules (trigger source, mark vs last price, reduce-only) vary by exchange, so check your exchange's docs.
Check before you close the lid
On the exchange's open orders or conditional orders page, look for a stop on the closing side of each position. Its quantity should cover the position, and its trigger price should be the one you expect. If there isn't one, the stop exists only in your script. Here is the same check with a read-only API key and ccxt:
import os, ccxt ex = getattr(ccxt, os.environ["EXCHANGE"])({ "apiKey": os.environ["KEY"], "secret": os.environ["SECRET"]}) orders = ex.fetch_open_orders() for p in ex.fetch_positions(): size = float(p.get("contracts") or 0) if size == 0: continue close_side = "sell" if p["side"] == "long" else "buy" stops = [o for o in orders if o["symbol"] == p["symbol"] and o["side"] == close_side and (o.get("triggerPrice") or o.get("stopPrice"))] covered = sum(o["amount"] or 0 for o in stops) print(p["symbol"], p["side"], size, "stop qty:", covered, [o.get("triggerPrice") or o.get("stopPrice") for o in stops]) I haven't run this against a live account for this post, so treat it as a starting point. Some exchanges list trigger orders separately from regular open orders and need an extra flag (with some ccxt exchanges, params={"trigger": True}). triggerPrice can also come back empty. Spot accounts have no positions, so on spot you compare balances instead. Whatever the script prints, confirm it on the exchange page, because the output alone doesn't prove that a position is unprotected or that it is safe.
If you can't find a stop, place one on the exchange. The other option is to not let the bot hold positions on a machine that sleeps.
What this doesn't answer
Two questions need logs from an actual reproduction, so I'm leaving them open. First, what does the bot do with the bars it missed during sleep? A REST backfill plus a WebSocket reconnect might feed it a duplicate bar and fire the same order twice. Second, when cron jobs come due during sleep, are they skipped, or do they run late?
If you need true 24/7, run the bot on a server that doesn't sleep.
This article was drafted with AI assistance.

