---
id: document_item.recommendations-for-terminal-setup-for-autotrading
page_type: documentation_article
title: "在服务器上进行自动交易时的终端设置建议"
description: "在服务器上运行 Moonbot 的建议：VDS 模式、固定为 4096 MB 的页面文件，以及可降低内存和处理器负载的设置。"
section: documentation
category: "策略 / 策略的应用"
url: https://moonbot.eu/zh/documentation/strategy-usage/recommendations-for-terminal-setup-for-autotrading?format=md
locale: zh
alternate_ru: https://moonbot.eu/documentation/strategy-usage/recommendations-for-terminal-setup-for-autotrading?format=md
alternate_en: https://moonbot.eu/en/documentation/strategy-usage/recommendations-for-terminal-setup-for-autotrading?format=md
parent: https://moonbot.eu/zh/documentation/strategy-usage?format=md
previous: https://moonbot.eu/zh/documentation/strategy-usage/features-of-short-strategy-settings?format=md
next: null
status: published
updated_at: 2026-11-11T21:54:55+03:00
---

# 在服务器上进行自动交易时的终端设置建议

1. 进入 **Menu →** **System Settings** ，并在 **System Settings** 窗口中：
   1. 勾选 **VDS optimized mode** （VDS 优化模式）复选框——该选项可以节省服务器资源：存储和绘制图表所占用的内存和 CPU 更少，更多资源会留给算法运行
   2. 强烈建议为服务器设置固定大小的分页文件（虚拟内存），大小为 **4096 MB**
      1. **手动设置：**\
         点击 **Set PageFile** **→ Control Panel** 按钮，将打开 **系统属性**（System Properties）窗口。在 **性能** （Performance）区域点击 **设置...**（Settings...）按钮，然后切换到 **高级** （Advanced）选项卡，在 *虚拟内存* （Virtual memory）部分点击 **更改...**（Change...）。取消勾选 **自动管理所有驱动器的分页文件大小**（Automatically manage paging file size），选择磁盘（通常为 C:），然后选择 **自定义大小** （Custom size）并填写：
         1. 初始大小（MB）：4096
         2. 最大值（MB）：4096 \
            然后点击 **确定** （OK）并重启服务器。
      2. **自动设置：** \
         点击 **Set PageFile → Registry** 按钮。如果终端不是以管理员身份运行的，会出现提示 *“Please run the bot as Administrator!”* ——这时请关闭 Moonbot，右键点击 **MoonBot.exe** 文件并选择 以管理员身份运行。然后再次打开 **System Settings** 并点击 **Set PageFile →** **Registry**。分页文件将被设置为 4096 MB。请重启服务器。
   3. 建议设置 Windows **自动登录** 。在 **Login** 字段中输入账户名，在 **Password** 字段中输入该账户的密码，然后点击 **AutoLogin** 按钮。如需重置 Windows 自动登录设置，请点击 **Reset AutoLogin** 按钮。
   4. 如需让 Moonbot 在 Windows 启动时自动运行，请点击 **Autostart on windows startup** 按钮。然后重启服务器进行检查——终端应当自动启动。
2. 请务必在服务器上关闭 **Windows 更新**和 **Windows Defender**，以免系统在更新过程中关闭终端——否则订单将留在交易所，而不再受 Moonbot 管理。
3. 请务必在服务器上关闭**自动调整夏令时** **（夏令时与标准时间的自动切换）**，或将时区设置为 **(UTC) 协调世界时**。
4. 使用 **MoonShot** 策略且价格区间较短（**MShotPriceMin** 与 **MShotPrice** 之间不超过 0.5%）时，建议设置参数 **MShotAddDistance=50**，并设置 **MShotUsePrice=Trade**——这样用于重新挂单的价格将取自最新一笔成交，终端能够更快地作出反应。这在合约交易中尤为重要。
5. 在侧重快速交易的策略中（价格区间较短的 **MoonShot** 、**MoonStrike**、设置较小跌幅的 **Drops** ），建议将 **HFT** 参数（整数）设为非零值，该参数位于 **Buy conditions** 选项卡。

   **工作原理：**\
   **HFT** 参数用于设定订单被视为有效的时间区间（毫秒）。如果 **HFT=0**，该参数不生效——订单会一直有效，直到成交，或被手动撤单、由策略撤单。

   **为什么需要它：**\
   当运行 Moonbot 终端的服务器 ping 值（响应时间）突然升高时，挂单指令可能需要很长时间才能到达交易所。如果设置了较短的 **HFT** “窗口”，订单延迟到达交易所时将不会被接受。这有助于避免订单在市场条件已经变化后才挂出，从而导致不利的买入。

   **示例：**\
   在 ping 为 10–20 ms 的 **Vultr** 服务器上，可以设置 **HFT=100**。如果交易所拒绝接受订单，可以将 **HFT** 增加到 200–300 ms。\
   如果带有 **HFT** 参数的订单未被接受，Moonbot 会通过 Telegram 发送通知。\
   此类系统消息的频率可以在 **Settings →** **Advanced →** **Remote** 选项卡中设置，参数为 **Send System reports not more than once a minute**（系统报告每分钟最多发送一次）。
6. **AutoStart** 选项卡的设置
   1. 启用 **Auto stop on API errors** 选项。用滑块将错误次数设为 **3–4**。在下方勾选 **Restart not earlier** 复选框，并将值设为 **20 分钟** ——这是再次启动前的最短时间间隔；
   2. 此外，还可以使用 **Auto stop by ping** 参数——当 ping 超过设定阈值时触发自动停止。建议根据您服务器的性能，将其设为 **100 ms 及以上**。

## 导航

路径: [首页](https://moonbot.eu/zh?format=md) / [文档](https://moonbot.eu/zh/documentation?format=md) / [策略](https://moonbot.eu/zh/documentation/strategies?format=md) / [策略的应用](https://moonbot.eu/zh/documentation/strategy-usage?format=md) / 在服务器上进行自动交易时的终端设置建议

上级栏目: [策略的应用](https://moonbot.eu/zh/documentation/strategy-usage?format=md)

上一页: [SHORT 策略的设置特点](https://moonbot.eu/zh/documentation/strategy-usage/features-of-short-strategy-settings?format=md)
