⬇ Installation guide

Copy file, turn on permission, attach to chart

Do separately for each terminal β€” Master one terminal, each Slave one terminal. No need to declare WebRequest URL.

Introduction Installation guide Usage guide
CopyTrade Online β€” Master to Slave for MT4 / MT5

Download

Version
5
Format
ex4,ex5
Operating system
Windows
Download the installer Free download β€” license key required to run on real account
Step 0

What you get in the package

Depending on how it's released, you get one of two forms.

Compiled version β€” usually used

MT5: copytradev5.ex5
MT4: copytradev4.ex4 + CT_Http.dll

Just copy the file, no need to compile.

Source code version

copytradev5.mq5 / copytradev4.mq4 + folder Include\ + folder dll\

Must compile in MetaEditor.

Common requirement: Windows, MetaTrader 4 or 5 already logged into account.

Step 1

Open the right folder for your terminal

Open Data Folder

Trong MT4/MT5: menu File β†’ Open Data Folder.

This is the folder for that terminal

Windows Explorer window appears. Each terminal has its own folder.

Close the terminal first

Before copying files β€” MT4/MT5 locks files while running.

Step 2

Copy file to the right place

This is where most mistakes happen. MT4 and MT5 do it differently.

MetaTrader 5

  • copytradev5.ex5 (or .mq5) β†’ MQL5\Experts\
  • Folder Include\, only if you have source code β†’ MQL5\Experts\Include\, put next to file .mq5
  • CT_Http.dll β†’ do not need to copy. DLL is already embedded in .ex5, EA unpacks it itself MQL5\Libraries\ first run

MetaTrader 4

  • copytradev4.ex4 (or .mq4) β†’ MQL4\Experts\
  • Folder Include\, only if you have source code β†’ MQL4\Experts\Include\, put next to file .mq4
  • CT_Http.dll 32-bit version β†’ MQL4\Libraries\. Required β€” MT4 cannot unpack itself

MT4 uses 32-bit DLL, MT5 uses 64-bit DLL

Copy the wrong version and EA does not run. The version in the package's mt4\dll\ folder is already the right 32-bit.

Unblock the DLL. Windows might block files downloaded from the internet. Right-click CT_Http.dll β†’ Properties β†’ if you see Security: This file came from another computer then check Unblock β†’ OK.
Step 3

Turn on permission in Options

Reopen terminal β†’ Tools β†’ Options β†’ Expert Advisors.

Allow algorithmic tradingMT5 β€” or Allow automated trading on MT4
Allow DLL importsRequired for both

Click OK, then click Algo Trading (MT5) or AutoTrading (MT4) on the toolbar to enable it xanh.

No need to declare WebRequest URL. EA does not use WebRequest. If someone told you to add an address to the β€œAllow WebRequest for listed URL” box, they got confused with another tool.
Step 4 β€” only if you have source code

Compile

Open MetaEditor

Click F4 from the terminal.

Open file

copytradev5.mq5 or copytradev4.mq4 in the folder tree Experts.

Compile

Click F7.

View result

The window below should show 0 errors, 0 warnings. A few warnings are OK β€” 0 errors is what matters.

Report errorReason
cannot open source file "Include\CT_Defines.mqh"Folder Include\ does not sit next to the file .mq5/.mq4
cannot open file "dll\CT_Http.dll" (MT5)Missing folder dll\ next to file .mq5 β€” MT5 embeds DLL at compile time
Step 5

Attach EA to chart

Open a chart

Any timeframe, any symbol.

Drag EA onto it

Navigator β†’ Expert Advisors β†’ drag copytradev5 / copytradev4 and drop on the chart.

Common tab

Check Allow DLL imports. Required for MT4, recommended for MT5.

Inputs tab

Fill parameters β€” see step 6 β€” then click OK.

Each terminal attaches EA to ONE chart only. Attaching to two places in the same terminal causes activation code conflict and shared memory conflict.
MT5 β€” first run EA unpacks itself, that is normal. First time attaching EA, MT5 does not have CT_Http.dll. EA unpacks the DLL itself MQL5\Libraries\, in log β€œDLL installed. Please restart EA to load the DLL.” then detaches itself from the chart. Drag EA onto the chart again and it runs normally. Happens only once.

If Experts tab shows "DLL in Libraries DIFFERS from version embedded in EA": trong MQL5\Libraries\ there is an old CT_Http.dll copy present, and EA cannot overwrite it. Fix: detach EA from chart β†’ close terminal β†’ delete MQL5\Libraries\CT_Http.dll β†’ open terminal β†’ attach EA again.

Step 6

Fill required parameters only

Only the required boxes. Full table is in the usage guide page.

On MASTER terminal

TheEnter what
ModeMaster - Send orders to server
LicenseKeyLeave empty if running Offline (same machine) Β· enter key Master if running Online
SlaveKeysLeave empty when Offline Β· when Online: list of allowed Slave names, comma-separated, like slave1,slave2,slave3
AutoStartfalse to click START manually, or true to auto-run when attaching EA
Click OK β†’ panel shows Master Code. Write down this code, Slave needs it. Master Offline: Master Code is your account number. Master Online: is 8-character code assigned by the server, like 3F7A9C21.

On each SLAVE terminal

TheEnter what
ModeSlave - Copy orders from server
MasterCodeCode from Master panel β€” required
SymbolMappingList of symbols to copy β€” required, blank means copy nothing. Like XAUUSD,EURUSD or XAUUSD:GOLD,EURUSD:EURUSD.pro
SlaveSourceCopy from Local (same machine) or Copy from Server (different machine)
LicenseKey / SlaveKeyPer table below
VolumeMultiplierLot ratio, default 1.0

Fill License per your tier

TierLicenseKeySlaveKeySlaveSource
IB / demo freeblankblankforced to Copy from Local no matter what you choose
Paid, running OnlineblankSlave's own key β€” must be in SlaveKeys on MasterCopy from Server
Paid, running Offline same machineyour own key (required)blankCopy from Local
Slave granted permission by another Masterthat licenseSlave's own keyCopy from Server

Most common trap

Running Offline paid but left LicenseKeyempty. EA will show "Slave offline paid must fill License Key" and will not run.

Step 7

Check if it's running right

Look at the panel on the chart

Panel name COPYTRADE ONLINE, top left corner.

LineMaster machineSlave machine
ModeMASTER or MASTER (OFFLINE)SLAVE
Status dot lineRunning (Master)Running (Slave)
License / Master CodeLicense: OFFLINE (No Key Needed) or your keyMaster Code: <code you entered>
StatsSlaves: NProcessed: x | Copied: y
InfoMaster Code: …Volume: 1.00x | Copy: ON
Status is Ready … - Click START to run then EA has not started β€” click the green button on the panel, or set START Read Experts log tab AutoStart = true.

On Master β€” good sign

On Slave β€” good sign

[CT_Http] CT_Http.dll loaded successfully.
=== EA Copytrade Starting ===
Mode: MASTER
[MASTER OFFLINE] Master Code
   for Slaves: 1234567 (Account Login)
[SHM] Shared memory created: 1234567
EA Started!

Try a real small order

[SHM] Shared memory opened: 1234567
[IB] Tai khoan thuoc nhom IB
   -> chay LOCAL mien phi.
EA initialized successfully!
EA Started!

Enter an order

on Master with one symbol 0.01 lot in . In 1–2 seconds Slave must have a matching order. Close Master order β†’ Slave order must close too. See nothing, read Slave's SymbolMappingExperts tab first β€” EA prints the reason very clearly. Troubleshooting during setup

Twelve common situations

Slave runs but copies nothing, Experts shows

Did not fill SYMBOL_MAPPING missing…

, or SymbolMapping. Khai XAUUSDXAUUSD:<symbol name on Slave broker> . This is the number one reason.MT4: dialog box

Did not copy DLL into CT_Http.dll not found!

, or copied the wrong 64-bit version. Use 32-bit version from MQL4\Libraries\MT5: EA disappears from chart right after attaching mt4\dll\.

β€” normal on first run. Drag EA onto chart again.

Log ghi Restarting EA to load DLL Log: DLL in Libraries differs from version embedded in EA

Old

copy exists in MQL5\Libraries\. Detach EA β†’ close terminal β†’ delete the DLL file β†’ reopen β†’ attach EA.

EA smiley on chart has a slash mark, not running

Not enabled Algo/Auto Trading, or not yet checked Allow DLL imports.

Error: Master Code is empty!

Slave not filled in MasterCode.

Error: Slave Keys is empty!

Master Online not filled in SlaveKeys.

Slave name conflicts with a system field name

Names banned set for Slave: master, slave, master_code, masterslave, username. Choose a different name.

Not yet registered as IB β€” contact admin

Account not yet in the free IB list. Contact admin to add it, or buy a key.

Master license does not exist!

Sai key, or key expired β€” the system gives the same reply for both cases.

Slave (MT5, Offline) shows "Could not open shared memory… Master not running?"

Master is not on, or MasterCode is wrong. EA automatically retries every 3 seconds β€” turn Master on and it connects by itself.

Antivirus deleted CT_Http.dll

Add an exception for the folder MQL4\Libraries\ or MQL5\Libraries\ then copy it again.

Uninstall

When you want to remove

Remove EA

Right-click on the chart β†’ Expert Advisors β†’ Remove.

Delete EA file

copytradev5.ex5 / copytradev4.ex4 trong MQL5\Experts\ / MQL4\Experts\.

Delete DLL (optional)

Close terminal then delete CT_Http.dll in the folder Libraries.

Remove EA does not close the copied orders. To clear all orders, close them by hand.

Installation done β€” now adjust parameters

Full table of parameters, Symbol Mapping, lot ratio, SL/TP copy mode and troubleshooting during operation is on the user guide page.

Usage guide Back to introduction