这个文件是我作为评测人员收到的第一个任务,我看了一下介绍,大概是止盈止损工具,我现在挂模拟了,估计不会开单,我先挂一阵看看。
# 🛡 EA WATCHDOG V2 - 用户指南
## 概述
EA Watchdog V2 是一款 MetaTrader 4 智能交易系统,旨在监控并保护其他交易机器人开出的订单。
它通过自动检测缺少止损 (SL) 或止盈 (TP) 的订单,并发出警报或自动添加这些保护措施,从而起到安全防护的作用。
### 用途
许多交易智能交易系统在没有立即设置止损/止盈保护的情况下开出订单,使其暴露于市场波动之中。 EA Watchdog 通过以下方式确保您的所有订单受到保护:
- 监控来自指定 EA 的所有订单
- 在可配置的时间窗口内检测缺失的止损/止盈
- 通过 Telegram 通知发出警报
- 根据您的配置自动保护订单
- 管理盈利仓位的追踪止损
## 主要功能
### 🔍 双重操作模式
#### 1. 监控模式(仅监控)
- 检测未设置止损/止盈的订单
- 发送 Telegram 警报
- 不会修改任何订单
- 非常适合无需干预的监控
#### 2. 自动保护模式(主动保护)
- 检测未设置止损/止盈的订单
- 自动添加缺失的保护
- 管理追踪止损
- 发送确认通知
### ⚙️ 选择性保护控制
选择要保护的内容:
- 启用止损:为订单添加止损
- 启用止盈:为订单添加止盈
- 启用追踪止损:激活追踪止损追踪止损
根据您的交易策略灵活搭配!
### ⏱️ 智能延迟系统
OrderAgeSeconds 参数可防止误报:
- 等待 X 秒后再检查订单
- 让您的交易机器人有时间设置止损/止盈
- 默认值:10 秒(可调节,5-30 秒)
### 🎯 高级过滤
- 魔数:仅监控特定 EA
- 交易品种过滤:监控特定货币对(例如,XAUUSD、EURUSD)
- 反垃圾邮件:每个订单仅处理一次
### 💬 Telegram 集成
实时通知,包含:
- 订单详情(单号、交易品种、类型)
- 保护状态(已添加的内容)
- 特定模式下的消息
- 清晰、格式化的提醒
## 配置
### 基本设置
WorkMode = AUTO_PROTECT // 选择运行模式
MagicToWatch = 123456 // 您的 EA 的魔数
UseSymbolFilter = true // 启用交易品种过滤筛选
SymbolToWatch = "XAUUSD" // 要监控的交易品种
OrderAgeSeconds = 10 // 检查订单前等待时间
### 保护设置
EnableSL = true // 添加止损
EnableTP = true // 添加止盈
EnableTrailing = true // 启用追踪止损
StopLossPoints = 300 // 止损点数距离(点数)
TakeProfitPoints = 600 // 止盈点数距离(点数)
TrailingPoints = 200 // 追踪止损点数距离(点数)
### Telegram 设置
EnableTelegram = true
BotToken = "your_bot_token" // 来自 @BotFather
ChatID = "-1001234567890" // 您的群组/频道 ID
## 安装
### 步骤 1:编译 EA
1. 打开 MetaTrader 4
2. 按 F4 打开 MetaEditor
3. 打开EA_Watchdog_V2.mq4
4. 按 F7 编译
5. 验证:0 个错误,0 个警告
### 步骤 2:启用 WebRequest
1. MT4 → 工具 → 选项
2. 选项卡:智能交易系统
3. 勾选“允许 WebRequest 请求以下 URL”
4. 添加 URL:https://api.telegram.org(无尾斜杠)
5. 点击“确定”
6. 重启 MT4(至关重要!)
### 步骤 3:附加到图表
1. 打开任意图表(多品种监控时,品种无关紧要)
2. 从导航器拖动 EA_Watchdog_V2
3. 配置参数
4. 启用“允许实时交易”
5. 点击“确定”
### 步骤 4:验证运行情况
检查“智能交易系统”选项卡:
EA WATCHDOG V2
模式:自动保护(或仅监控)
Magic: 123456 |交易品种:XAUUSD
配置 - SL:1 TP:1 Trail:1
## 使用场景
### 场景 1:全面保护(默认)
工作模式 = AUTO_PROTECT
启用止损 = true
启用止盈 = true
启用追踪止损 = true
结果:监控程序添加止损、止盈并管理追踪止损
### 场景 2:仅止损 + 追踪止损
工作模式 = AUTO_PROTECT
启用止损 = true
启用止盈 = false
启用追踪止损 = true
结果:对于不使用止盈的策略,仅启用止损和追踪止损
### 场景 3:仅监控
工作模式 = WATCHDOG_ONLY
结果:在不修改订单的情况下,提醒您注意不安全的订单
===================================================
# 🛡 EA WATCHDOG V2 - USER GUIDE
## Overview
EA Watchdog V2 is a protective MetaTrader 4 Expert Advisor designed to monitor and secure orders opened by other trading bots. It acts as a safety layer by automatically detecting orders missing Stop Loss (SL) or Take Profit (TP) and either alerting you or adding these protections automatically.
### Purpose
Many trading EAs open orders without immediate SL/TP protection, leaving them exposed to market volatility. EA Watchdog ensures all your orders are protected by:
- Monitoring all orders from specified EAs
- Detecting missing SL/TP within a configurable time window
- Alerting via Telegram notifications
- Auto-protecting orders based on your configuration
- Managing trailing stops for profitable positions
## Key Features
### 🔍 Dual Operation Modes
#### 1. WATCHDOG Mode (Surveillance Only)
- Detects orders without SL/TP
- Sends Telegram alerts
- Does NOT modify any orders
- Perfect for monitoring without intervention
#### 2. AUTO-PROTECT Mode (Active Protection)
- Detects orders without SL/TP
- Automatically adds missing protections
- Manages trailing stops
- Sends confirmation notifications
### ⚙️ Selective Protection Control
Choose what to protect:
- EnableSL: Add Stop Loss to orders
- EnableTP: Add Take Profit to orders
- EnableTrailing: Activate trailing stop
Mix and match based on your trading strategy!
### ⏱️ Smart Delay System
OrderAgeSeconds parameter prevents false detections:
- Waits X seconds before checking an order
- Allows your trading bot time to set SL/TP
- Default: 10 seconds (adjustable 5-30 seconds)
### 🎯 Advanced Filtering
- Magic Number: Monitor specific EA only
- Symbol Filter: Watch specific pairs (e.g., XAUUSD, EURUSD)
- Anti-Spam: Each order processed only once
### 💬 Telegram Integration
Real-time notifications with:
- Order details (ticket, symbol, type)
- Protection status (what was added)
- Mode-specific messages
- Clear, formatted alerts
## Configuration
### Basic Setup
WorkMode = AUTO_PROTECT // Choose operation mode
MagicToWatch = 123456 // Your EA's magic number
UseSymbolFilter = true // Enable symbol filtering
SymbolToWatch = "XAUUSD" // Symbol to monitor
OrderAgeSeconds = 10 // Wait before checking orders
### Protection Settings
EnableSL = true // Add Stop Loss
EnableTP = true // Add Take Profit
EnableTrailing = true // Enable trailing stop
StopLossPoints = 300 // SL distance (in points)
TakeProfitPoints = 600 // TP distance (in points)
TrailingPoints = 200 // Trailing distance (in points)
### Telegram Setup
EnableTelegram = true
BotToken = "your_bot_token" // From @BotFather
ChatID = "-1001234567890" // Your group/channel ID
## Installation
### Step 1: Compile the EA
1. Open MetaTrader 4
2. Press F4 to open MetaEditor
3. Open EA_Watchdog_V2.mq4
4. Press F7 to compile
5. Verify: 0 errors, 0 warnings
### Step 2: Enable WebRequest
1. MT4 → Tools → Options
2. Tab Expert Advisors
3. Check Allow WebRequest for listed URL
4. Add URL: https://api.telegram.org (no trailing slash)
5. Click OK
6. RESTART MT4 (critical!)
### Step 3: Attach to Chart
1. Open any chart (symbol doesn't matter for multi-symbol monitoring)
2. Drag EA_Watchdog_V2 from Navigator
3. Configure parameters
4. Enable Allow live trading
5. Click OK
### Step 4: Verify Operation
Check the Experts tab for:
EA WATCHDOG V2
Mode: AUTO-PROTECT (or WATCHDOG ONLY)
Magic: 123456 | Symbol: XAUUSD
Config - SL:1 TP:1 Trail:1
## Use Cases
### Case 1: Full Protection (Default)
WorkMode = AUTO_PROTECT
EnableSL = true
EnableTP = true
EnableTrailing = true
Result: Watchdog adds SL, TP, and manages trailing stop
### Case 2: SL Only + Trailing
WorkMode = AUTO_PROTECT
EnableSL = true
EnableTP = false
EnableTrailing = true
Result: For strategies that don't use TP, only SL and trailing
### Case 3: Monitoring Only
WorkMode = WATCHDOG_ONLY
Result: Alerts you about unsafe orders without modifying them
|