EA CopyTrade WS

Tổng Quan EA CopyTrade WebSocket

EA CopyTrade WebSocket (v3.40) là Expert Advisor hoạt động trên MetaTrader 5, chức năng sao chép lệnh tự động từ tài khoản Master sang tài khoản Slave qua kết nối WebSocket cực nhanh.

Đặc Điểm Nổi Bật

Yêu Cầu Hệ Thống

EA CopyTrade WebSocket Overview

EA CopyTrade WebSocket (v3.40) is a MetaTrader 5 Expert Advisor that automatically copies trades from a Master account to a Slave account via a high-speed WebSocket connection.

Key Features

System Requirements

Yêu Cầu Tài Khoản & Vốn

CẢNH BÁO RỦI RO: Sao chép lệnh và giao dịch luôn có rủi ro mất vốn. Hãy chắc chắn bạn hiểu rõ rủi ro trước khi sử dụng.

Loại Tài Khoản

Bắt buộc: Tài khoản phải là tài khoản Cent (đơn vị tính bằng cent).
LoạiĐơn VịVí Dụ
CentCent (1/100 USD)$10 = 1000 cent
StandardUSDKhông phù hợp

Đòn Bẩy

Yêu cầu: Tối thiểu x1000, khuyến nghị vô cực (Unlimited).
Đòn BẩyPhù Hợp
x1000Tối thiểu chấp nhận được
x2000Khá tốt
UnlimitedTốt nhất (khuyến nghị)

Vốn Bắt Đầu

Lưu ý quan trọng: Vì tài khoản Cent, vốn thể hiện dưới dạng cent. 1 USD = 100 cent.
Loại Tài KhoảnVốn Bắt ĐầuHiển Thị Trong MT5
Cent (Live)$2,000200,000 cent
Demo (Test)$200,000200,000
QUAN TRỌNG: Tài khoản demo cần $200,000 (200,000) để test vì lot size sẽ khác với tài khoản Cent live. Kết quả demo không đảm bảo kết quả live.

Tóm Tắt

Yêu CầuChi Tiết
Loại tài khoảnCent
Đòn bẩyTối thiểu x1000, khuyến nghị Unlimited
Vốn live$2,000 (hiển thị 200,000 cent)
Vốn demo test$200,000
Rủi roLuôn có rủi ro mất vốn khi sao chép và giao dịch

Account & Capital Requirements

RISK WARNING: Copy trading and trading always carry the risk of capital loss. Make sure you understand the risks before using.

Account Type

Required: Account must be a Cent account (unit = cents).
TypeUnitExample
CentCent (1/100 USD)$10 = 1000 cent
StandardUSDNot suitable

Leverage

Required: Minimum x1000, recommended Unlimited.
LeverageSuitability
x1000Minimum acceptable
x2000Good
UnlimitedBest (recommended)

Starting Capital

Important: On a Cent account, balance is shown in cents. 1 USD = 100 cents.
Account TypeStarting CapitalShown in MT5
Cent (Live)$2,000200,000 cent
Demo (Test)$200,000200,000
IMPORTANT: Demo accounts need $200,000 (200,000) to test because lot sizes differ from live Cent accounts. Demo results do not guarantee live results.

Summary

RequirementDetails
Account typeCent
LeverageMinimum x1000, recommended Unlimited
Live capital$2,000 (shows as 200,000 cent)
Demo test capital$200,000
RiskAlways carry risk of capital loss in copy trading

Cài Đặt EA

Bước 1: Tải File EA

  1. Nhấn nút "Download EA Copy Trade" trên cùng trang web
  2. File sẽ được tải về dạng .ex5 (đã build sẵn, không cần compile)
  3. Mở MT5 → File → Open Data Folder → MQL5 → Experts
  4. Copy file EA_Copy_CopyTrade_WS.ex5 vào thư mục Experts

Bước 2: Cài Đặt Trên Chart

  1. Mở MT5 → Navigator (Ctrl+N) → Expert Advisors
  2. Kéo EA_Copy_CopyTrade_WS vào chart muốn copy
  3. Hộp thoại hiện ra → vào tab "Common" → tick:
    • Allow Algo Trading
    • Allow DLL imports (bắt buộc)
  4. Vào tab "Inputs" → cấu hình tham số
  5. Nhấn OK

Bước 3: Cấu Hình WebRequest (Quan Trọng)

Bắt buộc: Phải thêm URL Server vào danh sách WebRequest trước khi EA có thể kết nối.
  1. MT5 → Tools → Options → Expert Advisors
  2. Tick "Allow WebRequest for listed URL"
  3. Thêm URL sau vào danh sách:
    • https://auth.forexcopy.workers.dev
    • https://ea.forexcopy.workers.dev
    • https://api.telegram.org
  4. Nhấn OK → Restart MT5

Bước 4: Kiểm Tra

  1. Mở chart với EA đã cài
  2. Kiểm tra tab Experts ở dưới → thấy log "Master1 đã kết nối"
  3. Kiểm tra tab Journal → không có lỗi đỏ
  4. Panel trên chart hiển thị: Copy State: Waiting Active hoặc Connected
Hướng dẫn cài đặt Hướng dẫn cài đặt 2

EA Installation

Step 1: Download EA File

  1. Click the "Download EA Copy Trade" button above
  2. File downloads as .ex5 (pre-built, no compile needed)
  3. Open MT5 → File → Open Data Folder → MQL5 → Experts
  4. Copy EA_Copy_CopyTrade_WS.ex5 into the Experts folder

Step 2: Install on Chart

  1. Open MT5 → Navigator (Ctrl+N) → Expert Advisors
  2. Drag EA_Copy_CopyTrade_WS onto the chart to copy
  3. In the dialog, go to "Common" tab → check:
    • Allow Algo Trading
    • Allow DLL imports (required)
  4. Go to "Inputs" tab → configure parameters
  5. Click OK

Step 3: Configure WebRequest (Critical)

Required: Add Server URL to WebRequest list before EA can connect.
  1. MT5 → Tools → Options → Expert Advisors
  2. Check "Allow WebRequest for listed URL"
  3. Add these URLs:
    • https://auth.forexcopy.workers.dev
    • https://ea.forexcopy.workers.dev
    • https://api.telegram.org
  4. Click OK → Restart MT5

Step 4: Verify

  1. Open chart with EA installed
  2. Check Experts tab below — see "Master1 connected"
  3. Check Journal tab — no red errors
  4. Panel on chart shows: Copy State: Waiting Active or Connected
Installation steps Installation steps 2

Cấu Hình Kết Nối

Tham Số Kết Nối

Tham SốGiá Trị Mặc ĐịnhMô Tả
InpMasterID"Master1"ID Master cần copy
InpWorkerWSSUrlwss://auth.forexcopy.workers.dev/wsWebSocket URL
InpRecvTimeoutMs200Receive timeout (ms)
InpSilenceWatchdogSec60Watchdog timeout (sec)
InpCopyExistingOnStartfalseCopy lệnh đang mở khi khởi động

Các Bước Cấu Hình

  1. Mở MT5 → Navigator → Expert Advisors
  2. Kéo EA vào chart → hiện hộp thoại Inputs
  3. Nhập InpMasterID = ID Master (ví dụ: "Master1")
  4. Nhập InpWorkerWSSUrl = URL Server
  5. Các tham số khác giữ mặc định hoặc tu chỉnh
  6. Nhấn OK

Reconnect Strategy

Exponential backoff: 1s → 2s → 4s → 8s → 16s → 32s → 60s → ...

Kiểm Tra Kết Nối

Hộp thoại cài đặt EA Hộp thoại cài đặt EA 2

Connection Configuration

Connection Parameters

ParameterDefaultDescription
InpMasterID"Master1"Master ID to copy from
InpWorkerWSSUrlwss://auth.forexcopy.workers.dev/wsWebSocket URL
InpRecvTimeoutMs200Receive timeout (ms)
InpSilenceWatchdogSec60Watchdog timeout (sec)
InpCopyExistingOnStartfalseCopy open trades on start

Setup Steps

  1. Open MT5 → Navigator → Expert Advisors
  2. Drag EA to chart → Inputs dialog appears
  3. Enter InpMasterID = Master ID (e.g., "Master1")
  4. Enter InpWorkerWSSUrl = Server URL
  5. Other parameters keep default or adjust
  6. Click OK

Reconnect Strategy

Exponential backoff: 1s → 2s → 4s → 8s → 16s → 32s → 60s → ...

EA settings dialog EA settings dialog 2

Global TP/SL Guardian — Bảo Vệ Tài Khoản

Guardian là tính năng quan trọng nhất để bảo vệ tài khoản. Nó hoạt động liên tục, kể cả khi WebSocket mất kết nối.

Cơ Chế Hoạt Động

  1. Mỗi tick — EA tính tổng lợi nhuận NET = Profit + Swap + Commission của tất cả lệnh có Magic Number trùng khớp
  2. So sánh — Nếu profit ≥ TP ngưỡng → ĐÓNG TẤT CẢ
  3. So sánh — Nếu loss ≥ SL ngưỡng → ĐÓNG TẤT CẢ
  4. Pause — Sau khi đóng, EA tạm dừng copy (paused) cho đến khi Master đóng hết lệnh

3 Chế Độ Tính Toán

Chế ĐộCông ThứcVí Dụ
MODE_MONEYTP/SL = giá trị tiền trực tiếp ($)InpTP_Value = 50 → Đóng khi lãi $50
MODE_PERCENT_BALANCETP/SL = Balance × value / 100Balance $1000, value = 5 → Đóng khi lãi $50 (5%)
MODE_PERCENT_EQUITYTP/SL = Equity × value / 100Equity $1000, value = 10 → Đóng khi lỗ $100 (10%)

Hành Vi Pause / Unpause

Lưu ý: Guardian tính NET PROFIT = Profit + Swap + Commission. Commission đọc từ lịch deal (HistoryDealGetDouble).

Ví Dụ Cấu Hình

Ví Dụ 1: TP = $100

InpTP_Enable  = true
InpTP_Value   = 100
InpTP_Mode    = MODE_MONEY
InpSL_Enable  = false

Ví Dụ 2: SL = 5% Balance

InpTP_Enable  = true
InpTP_Value   = 50
InpTP_Mode    = MODE_MONEY
InpSL_Enable  = true
InpSL_Value   = 5
InpSL_Mode    = MODE_PERCENT_BALANCE

Global TP/SL Guardian

The Guardian is the most critical feature for account protection. It operates continuously, even when WebSocket is disconnected.

How It Works

  1. Every tick — EA calculates NET profit = Profit + Swap + Commission of all trades with matching Magic Number
  2. Compare — If profit ≥ TP threshold → CLOSE ALL
  3. Compare — If loss ≥ SL threshold → CLOSE ALL
  4. Pause — After closing, EA pauses copying until Master closes all remaining trades

3 Calculation Modes

ModeFormulaExample
MODE_MONEYDirect dollar value ($)InpTP_Value = 50 → Closes at $50 profit
MODE_PERCENT_BALANCEBalance × value / 100Balance $1000, value = 5 → Closes at $50 (5%)
MODE_PERCENT_EQUITYEquity × value / 100Equity $1000, value = 10 → Closes at $100 loss (10%)

Pause / Unpause Behavior

Note: NET PROFIT = Profit + Swap + Commission. Commission read from deal history.

Examples

Example 1: TP = $100

InpTP_Enable  = true
InpTP_Value   = 100
InpTP_Mode    = MODE_MONEY
InpSL_Enable  = false

Example 2: SL = 5% Balance

InpTP_Enable  = true
InpTP_Value   = 50
InpTP_Mode    = MODE_MONEY
InpSL_Enable  = true
InpSL_Value   = 5
InpSL_Mode    = MODE_PERCENT_BALANCE

Symbol Mapping & Tính Toán Lot

Symbol Mapping

Nhiều broker đặt tên symbol khác nhau cho cùng sản phẩm. EA hỗ trợ ánh xạ tự động.

Master SymbolSlave SymbolInpSymbolMap
XAUUSDmXAUUSDcXAUUSDm=XAUUSDc
EURUSDmEURUSDcEURUSDm=EURUSDc
GER40DE40GER40=DE40
Khi không cần map: Nếu Master và Slave dùng cùng tên symbol → để trống. EA tự dùng tên gốc.

Nhiều Cặp

InpSymbolMap = "XAUUSDm=XAUUSDc,EURUSDm=EURUSDc,GBPUSDm=GBPUSDc"

Tính Toán Lot

Chế ĐộĐiều KiệnCông Thức
Lot Tỷ LệInpFixedLot = 0Lot = Master Volume × InpLotRatio
Lot Cố ĐịnhInpFixedLot > 0Lot = InpFixedLot (bỏ qua Master Volume)

Auto-Rounding

Sau khi tính, EA tự động: (1) Làm tròn theo SYMBOL_VOLUME_STEP (2) Đảm bảo ≥ MIN (3) Đảm bảo ≤ MAX

Ví Dụ

Master LotRatioFixedMinStepKết Quả
0.101.000.010.010.10
0.102.000.010.010.20
0.330.500.010.100.20 (step)

Comment Nhận Biết Lệnh Copy

cp_[MasterTicket]

Ví dụ: Master ticket #12345 → comment cp_12345. Phân biệt lệnh copy và recover map khi restart.

Symbol Mapping & Lot Calculation

Symbol Mapping

Many brokers use different symbol names for the same product. The EA supports automatic mapping.

MasterSlaveInpSymbolMap
XAUUSDmXAUUSDcXAUUSDm=XAUUSDc
EURUSDmEURUSDcEURUSDm=EURUSDc
GER40DE40GER40=DE40
When no mapping needed: If same symbol name → leave empty. EA uses original symbol.

Lot Calculation

ModeConditionFormula
Ratio LotInpFixedLot = 0Lot = Master Volume × InpLotRatio
Fixed LotInpFixedLot > 0Lot = InpFixedLot (ignores Master Volume)

Auto-Rounding

After calculation, EA: (1) Rounds to SYMBOL_VOLUME_STEP (2) Ensures ≥ MIN (3) Ensures ≤ MAX

Trade Comment Identifier

cp_[MasterTicket]

Example: Master ticket #12345 → comment cp_12345. Helps identify copy trades and recover map on restart.

Xử Lý Sự Cố (Troubleshooting)

1. EA Không Khởi Động Được

LỗiNguyên NhânGiải Pháp
"Allow DLL imports" errorChưa bật Allow DLLTools → Options → Expert Advisors → Tick "Allow DLL imports"
"Allow WebRequest" errorChưa thêm URL ServerThêm https://auth.forexcopy.workers.dev vào danh sách WebRequest
Compile errorFile .ex5 bị lỗi hoặc thiếuRe-download file mới từ nút tải trên cùng
"wss://" errorInpWorkerWSSUrl không đúng định dạngPhải bắt đầu bằng wss://

2. Kết Nối Thành Công Nhưng Không Copy

Triệu ChứngNguyên NhânGiải Pháp
Copy State: "Waiting Active"Chưa được kích hoạtKiểm tra Master ID, kiểm tra Dashboard
Master Online: NOMaster chưa kết nối hoặc mấtĐảm bảo Master EA đang chạy và kết nối Server
Copy State: "End Trial"Hết hạn TrialGia hạn Trial hoặc chuyển sang Active
Ignored tăng dầnSymbol không hỗ trợ hoặc lot không hợp lệKiểm tra Symbol Map, lot min/max

3. Kết Nối Bị Mất / Reconnect

4. Lỗi Symbol / Lot

Vấn ĐềGiải Pháp
Symbol không tồn tại trên SlaveThêm vào Symbol Map hoặc đảm broker hỗ trợ
Lot nhỏ hơn min lotEA tự đặt lên SYMBOL_VOLUME_MIN
Lot lớn hơn max lotEA tự giảm xuống SYMBOL_VOLUME_MAX
Không đủ marginTRADE_RETCODE_NO_MONEY → lệnh bị ignore

5. TP/SL Guardian Không Hoạt Động

6. Tín Hiệu Telegram Không Gửi Được

Triệu ChứngNguyên NhânGiải Pháp
Telegram không nhận tin nhắnChưa bật InpTelegramEnableĐặt InpTelegramEnable = true
Telegram không nhận tin nhắnToken hoặc Chat ID saiKiểm tra InpTelegramTokenInpTelegramChatID
WebRequest error / không gửi đượcChưa thêm URL TelegramThêm https://api.telegram.org vào danh sách WebRequest
Hướng dẫn: MT5 → Tools → Options → Expert Advisors → Tick "Allow WebRequest for listed URL" → Thêm https://api.telegram.org

Troubleshooting

1. EA Won't Start

ErrorCauseFix
"Allow DLL imports" errorDLL not enabledTools → Options → Expert Advisors → Check "Allow DLL imports"
"Allow WebRequest" errorServer URL not addedAdd https://auth.forexcopy.workers.dev to WebRequest list
Compile errorCorrupt or missing .ex5Re-download file from download button above
"wss://" errorWrong URL formatMust start with wss://

2. Connected But Not Copying

SymptomCauseFix
Copy State: "Waiting Active"Not activatedCheck Master ID, verify on Dashboard
Master Online: NOMaster EA offlineEnsure Master EA is running and connected
Copy State: "End Trial"Trial expiredRenew Trial or switch to Active
Ignored count risingUnsupported symbol or invalid lotCheck Symbol Map, verify lot min/max

3. Connection Drops / Reconnect

4. Symbol / Lot Issues

IssueFix
Symbol not found on SlaveAdd to Symbol Map or ensure broker supports it
Lot below minEA auto-sets to SYMBOL_VOLUME_MIN
Lot above maxEA auto-reduces to SYMBOL_VOLUME_MAX
Not enough marginTRADE_RETCODE_NO_MONEY → trade ignored

5. Guardian Not Working

6. Telegram Signal Not Sending

SymptomCauseFix
No Telegram messages receivedInpTelegramEnable not enabledSet InpTelegramEnable = true
No Telegram messages receivedWrong Token or Chat IDVerify InpTelegramToken and InpTelegramChatID
WebRequest error / cannot sendTelegram URL not addedAdd https://api.telegram.org to WebRequest list
How to: MT5 → Tools → Options → Expert Advisors → Check "Allow WebRequest for listed URL" → Add https://api.telegram.org

Tất Cả Tham Số (Master Reference)

NhómTham SốMặc ĐịnhMô Tả
Kết NốiInpMasterID"Master1"ID Master cần copy
InpWorkerWSSUrlwss://auth.forexcopy.workers.dev/wsWebSocket URL
InpRecvTimeoutMs200Receive timeout (ms)
InpSilenceWatchdogSec60Watchdog timeout (sec)
InpMaxSignalAgeSec10Tuổi tối đa snapshot (sec)
InpCopyExistingOnStartfalseCopy lệnh đang mở khi khởi động
ReconnectInpReconnectBaseMs1000Delay ban đầu (ms)
InpReconnectMaxMs60000Delay tối đa (ms)
Symbol/LotInpSymbolMapXAUUSDm=XAUUSDc,EURUSDm=EURUSDcÁnh xạ symbol
InpLotRatio1.0Tỷ lệ lot
InpFixedLot0Lot cố định (0 = tỷ lệ)
InpMagicNumber990011Magic Number
InpSlippagePoints30Slippage tối đa (points)
InpMirrorSLTPtrueĐồng bộ SL/TP từ Master
TPInpTP_EnabletrueBật Global TP
InpTP_Value50Ngưỡng TP
InpTP_ModeMODE_MONEYMONEY / %BAL / %EQUITY
SLInpSL_EnablefalseBật Global SL
InpSL_Value100000Ngưỡng SL
InpSL_ModeMODE_MONEYMONEY / %BAL / %EQUITY
DebugInpEnableLogtrueBật log Expert
InpTelegramEnablefalseBật Telegram
InpTelegramToken""Bot Token
InpTelegramChatID""Chat ID

All Parameters (Master Reference)

GroupParameterDefaultDescription
ConnectionInpMasterID"Master1"Master ID to copy from
InpWorkerWSSUrlwss://auth.forexcopy.workers.dev/wsWebSocket URL
InpRecvTimeoutMs200Receive timeout (ms)
InpSilenceWatchdogSec60Watchdog timeout (sec)
InpMaxSignalAgeSec10Max snapshot age (sec)
InpCopyExistingOnStartfalseCopy open trades on start
ReconnectInpReconnectBaseMs1000Initial delay (ms)
InpReconnectMaxMs60000Max delay (ms)
Symbol/LotInpSymbolMapXAUUSDm=XAUUSDc,EURUSDm=EURUSDcSymbol mapping
InpLotRatio1.0Lot multiplier
InpFixedLot0Fixed lot (0 = ratio mode)
InpMagicNumber990011Magic Number
InpSlippagePoints30Max slippage (points)
InpMirrorSLTPtrueSync SL/TP from Master
TPInpTP_EnabletrueEnable Global TP
InpTP_Value50TP threshold
InpTP_ModeMODE_MONEYMONEY / %BAL / %EQUITY
SLInpSL_EnablefalseEnable Global SL
InpSL_Value100000SL threshold
InpSL_ModeMODE_MONEYMONEY / %BAL / %EQUITY
DebugInpEnableLogtrueEnable Expert logs
InpTelegramEnablefalseEnable Telegram
InpTelegramToken""Bot Token
InpTelegramChatID""Chat ID

Kích Hoạt & Giấy Phép Sử Dụng

EA CopyTrade WS có thể sử dụng MIỄN PHÍ với các tài khoản Exness được đăng ký qua link liên kết của chúng tôi.

Cách 1: Đăng Ký Tài Khoản Mới (MIỄN PHÍ)

  1. Nhấn nút bên dưới để đăng ký tài khoản Exness mới qua link liên kết
  2. Hoặc sử dụng mã đối tác: 5ybeugnpyg
  3. Sau khi đăng ký → mở tài khoản Cent → bắt đầu sử dụng EA miễn phí

Đăng Ký Exness →

Mã đối tác: 5ybeugnpyg — Sử dụng mã này khi đăng ký hoặc liên hệ chăm sóc khách hàng Exness.

Cách 2: Đổi Mã Đối Tác (Nếu Đã Có Tài Khoản)

  1. Đăng nhập vào tài khoản Exness hiện tại
  2. Liên hệ bộ phận chăm sóc khách hàng Exness
  3. Yêu cầu đổi mã đối tác thành: 5ybeugnpyg
  4. Tạo tài khoản Cent để bắt đầu sử dụng EA

Cách 3: Dùng Thử (7 Ngày)

Không cần Exness: Bạn có thể dùng thử với bất kỳ tài khoản MT5 nào trong 7 ngày.

So Sánh

Phương ThứcChi PhíThời HạnTài Khoản
Exness (link liên kết)MIỄN PHÍVĩnh viễnCent
Đổi mã đối tácMIỄN PHÍVĩnh viễnCent
Dùng thửMIỄN PHÍ7 ngàyBất kỳ
LƯU Ý: SAO CHÉP LỆNH VÀ GIAO DỊCH LUÔN CÓ RỦI RO MẤT VỐN. Hãy chắc chắn bạn hiểu rõ rủi ro và chỉ sử dụng vốn bạn chấp nhận mất.

License & Activation

EA CopyTrade WS is FREE to use with Exness accounts registered via our affiliate link.

Option 1: Register New Account (FREE)

  1. Click the button below to register a new Exness account via our affiliate link
  2. Or use partner code: 5ybeugnpyg
  3. After registration → open a Cent account → start using EA for free

Register Exness →

Partner code: 5ybeugnpyg — Use this code when registering or contact Exness customer support.

Option 2: Change Partner Code (Existing Account)

  1. Log in to your current Exness account
  2. Contact Exness customer support
  3. Request to change partner code to: 5ybeugnpyg
  4. Create a Cent account to start using EA

Option 3: Free Trial (7 Days)

No Exness required: You can try with any MT5 account for 7 days.

Comparison

MethodCostDurationAccount
Exness (affiliate link)FREEUnlimitedCent
Change partner codeFREEUnlimitedCent
Free trialFREE7 daysAny
DISCLAIMER: COPY TRADING AND TRADING ALWAYS CARRY THE RISK OF CAPITAL LOSS. Only use capital you can afford to lose.