▸ Setup Guide

MetaTrader → Interactive Brokers Order Copier Connect MetaTrader and TWS, map your symbols, and go live — step by step.

MetaTrader4 / 5 + EA Copiermtib_order_copier TWSAPI socket IBKRmarket
Space play/pause · ← → step · F fullscreen
1 MetaTrader → Copier connection

The bridge: EA + plugin talk to the Copier over a local port

MetaTrader 4 / 5 EA: NewOrderCopier tcCopierPlugin.dll Order Copier TCP server onthe bridge port :29496 MT5 (64-bit) → System32 MT4 (32-bit) → SysWOW64
  • 1tcCopierPlugin.dll loads from the Windows system dir — MT5 from System32, MT4 from SysWOW64.
  • 2Attach the NewOrderCopier EA to a chart; allow DLL imports.
  • 3Set the EA input bridge port = 29496 (must match the Copier's com port).
  • ✓Once connected, the MetaTrader instance appears in the Copier's Settings grid.
2 Enable the TWS API

TWS → gear icon → Settings → API → Settings

TWS API Settings
1
2
3
4
  • 1Enable ActiveX and Socket Clients — required for any API connection.
  • 2Read-Only API must be OFF, otherwise TWS rejects the copied orders.
  • 3Socket port: 7497 paper / 7496 live (IB Gateway: 4002/4001). Note it for the next step.
  • 4Trusted IPs: add 127.0.0.1 (and keep "Allow connections from localhost only") so the Copier connects without a prompt.
Also useful: Download open orders on connection and Maintain and resubmit orders when connection is restored (both visible here).
2 · API Precautions

Optional: bypass the per-order API confirmations

TWS API Precautions
  • 1To stop TWS from asking a confirmation for every copied (API) order, enable Bypass Order Precautions for API Orders and the related bypass options here.
  • Without these, TWS may pop a dialog per order — which delays or blocks automatic copying.
At your own risk. Bypassing precautions removes TWS-side safety prompts. Combine it with the Copier's own Account Protection (next step) and test on a paper account first.
2 · Keep TWS running

TWS → Lock and Exit → enable Auto restart

TWS Lock and Exit
1
2
3
  • 1Open Lock and Exit in the TWS configuration tree.
  • 2Select Auto restart (not Auto logoff) so TWS restarts itself and the Copier stays connected without a manual re-login.
  • 3Set the Auto Restart Time (e.g. 07:15) to a quiet hour outside your trading times.
IBKR still forces one full login per week; plan a weekly manual TWS/Gateway login. Also set Never lock Trader Workstation so the session stays active.
2.1 Connect the Copier to TWS · Account Protection

The Settings tab: API connection, instances, risk guard

Copier Settings
1
2
3
4
5
  • 1API Connection — set Host 127.0.0.1 and Port to your TWS socket port (here 7497).
  • 2Connect — establishes the TWS link; the Copier downloads account + open orders.
  • 3Account Protection — AP Enabled, Risk %, optional Trail, a Threshold and a Ref. Account to guard the account.
  • 4Instances grid — each connected MetaTrader (company, account, mode, allocation). EA cell green = the expert is live.
  • 5Status bar — 29496 open (bridge up) and the live connection/values; account fields are redacted here for privacy.
2.2 Set up the MetaTrader instance

Per-instance scaling & (FA) allocation

Setup MetaTrader Instance
1
2
3
4
  • 1Allocation (FA accounts) — Type = account or group, and the Name of the IB allocation to spread orders across sub-accounts.
  • 2Multiplier mode — one of the three scaling modes: None, Balance Ratio (IBKR balance ÷ MT balance) or Equity Ratio (IBKR equity ÷ MT equity).
  • 3Instance Multiplier — a fixed extra factor (e.g. 0.5 = half size, 2 = double).
  • 4Resulting Multiplier — the live product (mode ratio × instance multiplier) actually applied on top of the per-symbol Lot Size.
  • Right panel shows the connected MetaTrader (account, company, version, balance/equity) and the plugin/EA versions.
3 Contract Setup · symbol mapping

Link each MetaTrader symbol to an IBKR contract

Contract Setup
1
2
3
4
  • 1Alias = the MetaTrader symbol (e.g. AAPL, EURGBP). This is the link — it maps that MT symbol to the IBKR contract in the same row. Editable.
  • 2Lot Size / Price Mult / Offset — the source-side scaling (see step 3.2). Editable inline.
  • 3IBKR columns (read-only): Symbol, Exchange, Type, Underlying, Curr, Expiry, Strike, ConID — the actual qualified contract.
  • 4Toolbar: Add new IBKR Contract(s), Remove selected, Unlink expired, Backup DB.
  • Click any column header to sort (asc/desc); sorting by Type groups by symbol.
3.1 Add a new IBKR contract

Search IBKR and pick the contract to copy to

Add Interactive Broker Contracts
1
2
3
4
  • 1Fill what you know: Symbol / Underlying (e.g. EUR, MNQ).
  • 2Pick a Security type — STK, CFD, CASH, FUT … and optionally Currency / Exchange / Conid.
  • 3Click Search Contracts — IBKR returns the matching contracts on the right.
  • 4Select one (or several) result rows and press OK — they are added to the Contract Setup list.
  • Tip: provide ConID + Security type for an exact hit, or Underlying + Type + Currency to browse. For futures, the result carries the real Exchange (e.g. CME).
3.2 MT lot size → IBKR size scaling

How one MetaTrader lot becomes IBKR order size

1.0 MT lote.g. AAPL (BUY) × Lot Size N IBKR sharesorder sent to IBKR
  • 1Lot Size = IBKR size per 1.0 MT lot. In the sample list AAPL shows 10 → 1 lot = 10 shares.
  • 2Price Mult scales the MT price to the IBKR price scale; Offset adds a fixed price difference.
  • ✓Edit them inline in the Contract Setup grid. Verify on a small paper trade before going live.
4 Monitor · IB Account & Positions

Account values and live positions per (sub-)account

IBKR Accounts and Positions
1
2
3
4
  • 1Close all positions / Update FA Info — flatten everything, or refresh the FA allocation list from TWS.
  • 2One column per (sub-)account — the summed values plus each account; green = gain, red = loss.
  • 3Currency Positions — cash/FX balances per currency.
  • 4Positions — open contracts with the MT symbol they mirror; double-click a row to close that position.
4 · Monitor · Executions

Every copied fill, with the MT ↔ IBKR details

IBKR Executions
1
2
3
  • 1Action — BOT (buy, green) / SLD (sell, red) as executed on IBKR.
  • 2Costs Diff — difference between the MT price and the IBKR fill price (slippage/cost check).
  • 3Category — entry / close; plus Symbol, MT Symbol, Ticket, Size, Price, MT Price, Time and the MT account/version.
  • Append-only log of fills — the newest is at the bottom. Use it to reconcile MetaTrader vs IBKR executions.
4 The Log — your error feedback window

Watch the Log tab for connection and order feedback

Copier Log
1
2
3
  • 1Loglevel — raise to Detail when troubleshooting; keep at important for daily use.
  • 2Open Main Log opens the full log file; Clear Log empties the view.
  • 3Rows are colour-coded by severity (info / warning / error). This is where connection, registration and order problems show up.
  • Shortcut: when the status bar shows an error or warning, click it — it jumps here and clears the status bar.
✓ Ready

You're set upMetaTrader ⟶ Copier ⟶ TWS ⟶ IBKR — trades now mirror automatically.

MetaTrader Copier TWS IBKR
Recap: 29496 = MT↔Copier · 7497/7496 = Copier↔TWS · Alias = symbol link · Lot Size = size scaling · Log = feedback
setup guide
1 / 10