Your Bot's Kill Switch Probably Resets When It Restarts

A limit that lives in a variable is gone the moment the process restarts, and a process restarts for boring reasons: a deploy, a crash, a laptop lid, a reboot at 3am you slept through. Your system loses enough to trip the limit and correctly stops. Something restarts it. It reads the account, sees whatever the balance is now, treats that as the starting point, finds no drawdown at all, and begins trading again. That failure only ever appears on the day it mattered. This is the full chapter that fixes it, with the code.

    I respect your privacy. Unsubscribe at anytime.

    It Stays Tripped

    Once the daily limit fires, it stays fired for the session, through a restart and through a recovery. A limit that un-trips is a suggestion with extra steps.

    It Shrinks With You

    Size as a percentage of current equity, not a fixed amount. Fixed sizing risks the most when you can least afford it, which is arithmetic rather than bad luck.

    The Bug That Hid

    The first version of this saved nothing at all, silently, while every test passed. The chapter shows the bug, why it hid, and the one test that caught it in two seconds.