Remote Physical Kill Switch for Unattended Trading Systems
Summary
This operational note describes using an internet-connected smart plug as an emergency way to stop an unattended trading system when remote login, network access, or the program itself has failed. One setup powers the strategy computer through the plug, allowing a remote power cut to stop it. Another setup cuts power to a router or switch, interrupting connectivity so the running program cannot send new orders.
The author positions this as a last-resort measure for situations where normal program shutdown and built-in risk controls are unavailable. Cutting power can cause unsaved data loss and is not a graceful shutdown. The note provides no testing evidence or guarantees about response time, plug connectivity, order handling, or the state of existing positions and open orders. Routine risk management, monitoring, and alerts remain necessary; the physical cutoff is only a supplementary emergency safeguard.
Key ideas
- A remotely controlled power outlet can provide an emergency way to stop order submission when normal access fails.
- Powering off the strategy computer stops the program, while powering off network equipment interrupts its connection to trading servers.
- The approach is intended for failures such as inaccessible remote tools or a stuck program, after normal shutdown methods are unavailable.
- Forced power loss can discard unsaved data, and the device does not replace routine risk controls or monitoring.
Tags
Full text
# emergency stop .. _emergency_stop: 在外出环境下的紧急停止方案 ================================================= 在实际交易中, 难免会遇到人在外面、无法第一时间回到电脑前, 但又需要 **立刻阻止策略继续报单** 的情况。 对于这类极端场景, 可以准备一套 **从物理链路上阻断报单** 的“最后一道防线”——使用远程遥控插座控制电脑或网络设备的供电。 .. note:: 如果可以正常远程登录到运行环境, 仍然 **优先通过程序自身的退出/风控逻辑** 来停止策略; 本文介绍的方案只用于“网络中断、远程工具失效、程序卡死/死循环”等, 无法正常操作时的 **兜底紧急手段** 。 适用场景 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 下面这些场景都可以考虑使用远程遥控插座作为补充手段: * 人不在机房/办公室, 无法直接操作运行策略的电脑 * 远程桌面/VPN 无法连接, 不能登录服务器手动停止程序 * 运行环境网络异常, 与远程服务器或交易终端的会话建立/恢复失败 * 程序出现死循环、界面无响应, 无法通过常规方式优雅退出 * 需要在数秒~数十秒内阻止程序继续发出新的报单 推荐做法: 使用远程遥控插座 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 市面上有很多可以通过手机 App 控制的 **远程遥控插座/智能插座** , 一般具备以下能力: * 支持 4G/5G 或通过家庭/公司网络连接互联网 * 在手机上安装 App 后, 可以远程开/关插座电源 * 一键断电, 立刻切断下游设备的供电或网络 对于无人监控环境下运行的策略, 可以从物理链路上做如下配置: * 将 **运行策略的电脑/服务器电源** 接在远程遥控插座上, 需要紧急停机时, 在手机 App 中关断插座电源, 电脑随之断电, 程序立即停止, 不会再继续报单 * 或者, 将 **用于联网的路由器/交换机等网络设备电源** 接在远程遥控插座上, 紧急情况下关闭插座, 网络被切断, 程序虽然暂时仍在运行, 但已无法向交易服务器发送新的报单 重要提示 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. warning:: 通过远程遥控插座断电, 对电脑来说相当于“强制断电”, 可能造成未保存数据丢失, 请只在 **确属紧急情况** 时使用。 该方案的主要目的在于 **尽快阻止程序继续发送报单** , 而不是优雅关闭系统; 日常风险控制仍应依赖合理的仓位管理、风控规则和监控告警, 远程插座仅作为极端情况下的补充。
Shown in full with attribution under the source's licence. Licence: Apache-2.0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.