{
  "id": 13224783,
  "title": "A restart silently disabled our trailing stop — and the crash fix is what hid it",
  "url": "https://urgent.news/2026/10/09/a-restart-silently-disabled-our-trailing-stop-and-the-crash-fix-is",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-09T21:49:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/xuks124/a-restart-silently-disabled-our-trailing-stop-and-the-crash-fix-is-what-hid-it-cgo"
  },
  "original_language": "en",
  "account": "The bot's trailing stop, which protects against significant losses, was disabled silently when the bot restarted. This occurred because the bot failed to carry over the distance to the stop-loss number from the previous session. As a result, the trailing stop could not \"arm\" and remained inactive for the entire life of the position. The bot's position stayed open, the log remained clean, and the issue went unnoticed. The trailing stop is a type of stop-loss that adjusts as the trade moves in favor, locking in profits rather than letting them evaporate. The issue arose from a guard that was supposed to prevent division by zero, but instead made the trailing stop unreachable. Additionally, a separate rule that cut trades deemed inactive due to insufficient progress was also affected, mistakenly closing profitable trades. The issue was only discovered after three specific dates: when the failed stop-loss updates were made visible, when a recovered position crashed the bot due to a divide-by-zero error, and when the root cause was fixed. The silent failure cost the bot a net loss of around -5% overall, as well as closing profitable trades as losses. The incident highlights the importance of proper handling of missing data and the need for robust error detection and reporting mechanisms.",
  "summary": "The short version: when our bot restarts, it takes back ownership of positions that are already open. To do that it rebuilds its internal picture of each position — and it forgot to carry over one number: the distance to the stop-loss. Without it, the trailing stop could never arm. Not \"armed late\" — never, for the entire remaining life of that position. The process stayed alive. The position…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}