Risk
Daily loss limit and kill switch explained
A bot without a hard stop will keep trying to win it back. That is not discipline. That is a loop. These two controls are the difference between a tool and an unattended drain.
These controls do not make trading safe. They cap how fast a bad loop can spend. Markets can gap through a stop. APIs can lag. Design for “halt and ping me,” not “cannot lose.”
Daily loss limit
A number, in quote currency or percent of the bot’s allocated stack, measured from midnight UTC (or your chosen reset). If realized plus marked losses for the day reach that number, the bot stops opening new positions, writes a log, sends Telegram, and stays halted until you clear a flag by hand.
Example: allocate $200 to the bot. Daily limit 5% = $10. That is a budget, not theatre.
DAILY_LOSS_LIMIT_USD=10 HALT_FILE=/home/YOU/bots/openclaw/HALT
Kill switch
- Local flag: if HALT exists, the loop returns before any order call.
- Exchange permissions: withdraw disabled; you can delete the API key from your phone in one minute.
- Process: systemctl stop openclaw on the VPS.
Reset rules
Do not auto-resume after a halt without a human. Bots that try again at midnight recreate the revenge-trade pattern you were trying to delete.
Wire it to Telegram
- When the limit hits, the message should be dull and specific: HALT daily loss 10.40 / 10.00 USD. new entries disabled.
Get the full walkthrough
The paid guide includes the source, config template, and deploy script. 50% off: $19.99 (was $39.99). One-time.
Get the ebook — $19.99Educational product. Trading can lose money. Not financial advice.