These are the same items from Stale Price Bug and The Safety Net That Isn't There, put in one place. Nothing here is gated — read it, use it, done. If you'd rather I ran through these against your actual code instead of doing it yourself, there's a form at the bottom.
Entry-price path
- Trace the exact variable your stop-loss/take-profit is computed from, from the moment it's read to the moment the protective order is placed. Is anything re-read after a fill, or is it the same value the whole way through?
- If an order function computes a real execution price internally, confirm that price actually gets returned to the caller — not just logged.
- Check every call site of your position-close function for argument order, especially after any signature change. A shifted keyword argument won't raise an exception; it'll just quietly change behavior.
- Pull one real trade from your logs and manually verify signal price → decision → fill price → protective order levels, end to end. Reading the code is not the same as checking what actually happened.
Exit / risk-limit path
- For every stop-loss, kill-switch, or emergency-exit path, trace it to an actual order-submission call — the same one your entry logic uses. If the exit path reaches a different, thinner function (or none), that's worth a hard look.
- For every risk counter that's supposed to accumulate over time (daily P&L, loss streak, drawdown), find every call site that updates it and confirm each one actually passes a real, non-default value — not just that the accumulator logic itself is correct in isolation.
- Don't trust "well-tested" as a proxy for "connected." A correctly implemented safety class that's never imported into the live path is just documentation.
- If you can, deliberately trigger your emergency path once in a controlled setting and confirm — from the exchange's own records, not your bot's logs — that an order actually happened. Your bot's own logs aren't an independent witness; if the bug is that they lie, they'll lie convincingly.
Want a second pair of eyes
I'll personally check these against your bot
Drop your email and I'll reach out — one message from me, not a drip campaign. Free, no commitment, and if I don't see anything obviously wrong I'll tell you that too.