← All work Case study · Risk

A kill switch for a manual options trader

Hard daily limits and an automatic stop-loss on every hand-placed trade. When a configured daily limit is breached, it automatically starts exiting open positions and blocks new entries.

Test copy running against a simulated broker. All figures are sample data.
Problem
Trading by hand, it was easy to keep going after a losing streak. On one day, quick back-to-back stop-outs took the account past its own daily loss limit before a person could react.
What we built
Six rules checked against the broker about once a second: daily loss, profit lock, maximum trades, a time cut-off, and days-before-expiry and event-day locks. A stop-loss is placed on every manual trade within seconds, by points, percent or the previous candle's low, and trailed up in steps you set; it's only ever moved up. The stop shrinks to fit the room left under the loss limit. A breach cancels pending orders and stops, sends market exits, checks each exit filled in the order book and blocks new entries for the rest of the day. Telegram alerts report each step, and a separate watchdog restarts the service if it hangs.
How it was tested
Every change runs against a simulated broker that reproduces real rejections before it goes live. One live failure was found and fixed this way: exits were refused for margin while a stop was still resting, so the software now cancels the stop and confirms the cancel before it exits.
Limits
It reacts after the broker has accepted an order, usually within one to two seconds; it can't stop an order being placed in the broker's app. If it can't read the account, it alerts you rather than act on a guess. It runs on a single server, with the watchdog as its only backup.

Want something like this for your own trading?

Tell us what you trade and what you'd like the software to do. You'll get questions or a rough scope within one working day.

Get a project estimate
Open in new tab