{
  "id": 12989731,
  "title": "Our code silently replaced our own $50 daily loss limit with $142",
  "url": "https://urgent.news/2026/10/09/our-code-silently-replaced-our-own-50-daily-loss-limit-with-142",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-09T00:18:32.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/xuks124/our-code-silently-replaced-our-own-50-daily-loss-limit-with-142-226k"
  },
  "original_language": "en",
  "account": "The short version: a $50 daily loss limit was silently overridden by the bot's code to $142 over 42 trading days. This undisclosed bug went unnoticed as the logs showed no errors, even though the account experienced a worst single day loss of $100.26, which is still below the $142 limit. The issue was discovered by comparing the configured limit ($50) against actual account performance (5 out of 42 days closed worse than $50). The fix involved updating the code to always choose the stricter limit between the calculated daily cap and the rule value.",
  "summary": "The short version: we set a hard daily loss limit of $50. For at least the 42 trading days we can measure, the number actually running was about $142. Nothing crashed. No alarm fired. The logs were clean. We found it by hand, weeks later, by comparing what we had written down with what the machine had actually done. \"Daily loss limit\" in plain words: a ceiling on how much the account may lose in…",
  "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."
}