Three checkpoints in this guide
Follow the full walkthrough in order, or jump directly to one of its main sections.
An earlier version of this guide described MT4/MT5 sync as a five-minute, universal, zero-effort connection that captured every field from every broker. That was too broad. The current Trader’s Second Brain (TSB) integration is a closed-trade MetaTrader journal sync with broker/server limitations. MT5 has limited local demo evidence; MT4 uses a separately compiled binary but still lacks equivalent real-terminal runtime evidence. Setup time and delivery time vary, and broker or funded-account rules must be checked for the exact account.
Install the correct TSB EA in a desktop MT4 or MT5 terminal, allow the exact TSB Server URL in MetaTrader’s WebRequest list, attach the EA to one chart, and paste the current EA Token. The EA reads closed trades already available in that terminal’s local account history and sends them to the journal. It does not place, modify, or close orders. The current default scan window is 30 days and the default incremental interval is 300 seconds, so do not use a 60-second test as a pass/fail rule.
- Use it for: importing closed MT trades into a review journal.
- Do not use it for: execution, open-position monitoring, broker reconciliation, tax records, or proof that every broker-specific CFD is supported.
- Keep a fallback: if the EA cannot read a broker’s history correctly, export a detailed MT report and import the file instead.
Before You Start: Six Things to Check
- Use desktop MetaTrader. The EA must run inside a desktop terminal. A trade placed from mobile can still be picked up later, but only after the connected desktop terminal loads that closed trade into its history.
- Confirm TSB access. The MT4/MT5 EA download is available on the TSB tier that includes EA sync. It should not be described as a free download.
- Choose the right binary. MT4 requires
.ex4; MT5 requires.ex5. They are not interchangeable. - Know the source account. TSB maps the combination of platform, login and broker server to a journal account. Record the exact login and server shown by MetaTrader before troubleshooting.
- Load the date range you need. Backfill can scan only history the terminal can expose locally. Selecting a wider history range in MetaTrader may cause the terminal to request older records from the broker server.
- Treat the EA Token as a secret. Do not publish it, paste it into support screenshots, or reuse screenshots that show it. Rotate it in TSB Settings if it is exposed.
MT4/MT5 Auto-Sync Setup Checklist
| Step | TSB Full Access | In MetaTrader | Pass signal |
|---|---|---|---|
| 1. Download | Settings → Exchanges → MT4 / MT5 Auto-Sync | Choose the binary for the terminal version | The downloaded file ends in .ex4 or .ex5 |
| 2. Install | Keep Settings open for the URL and token | File → Open Data Folder → MQL4/Experts or MQL5/Experts | TSB AutoSync appears under Navigator → Expert Advisors after refresh/restart |
| 3. Permit HTTPS | Copy the Server URL shown in Settings | Tools → Options → Expert Advisors → allow WebRequest for that exact URL | The URL is visible in MetaTrader’s allow-list |
| 4. Connect | Copy the current EA Token | Attach the EA to one chart; paste ServerURL and EAToken | TSB leaves “Waiting for EA” and shows a recent Last Check |
| 5. Map | Map that MT login/server to the intended journal account | Leave the terminal connected to the same account | The saved source shows the correct login, server and destination |
| 6. Verify | Use Request Sync Now, then compare counts and one trade | Open Experts/Journal logs if the request fails | Found/Received and Synced/Duplicates make sense for the loaded history |
How to Install the TSB EA in MT5
MetaQuotes’ official MT5 EA guide confirms that an Expert Advisor is launched by attaching it to a chart. The TSB EA uses that chart as a host; its closed-trade scan is account-wide rather than limited to the chart symbol.
1. Download the current MT5 binary
Open TSB Settings → Exchanges → MT4 / MT5 Auto-Sync → EA setup & token and download the .ex5 file. The download route checks that the compiled binary matches the current source manifest before serving it. As checked for this guide, the current manifest identifies EA version 1.27, compiled July 16, 2026, with zero compiler errors and warnings. That build status is not evidence that every broker runtime has been validated.
2. Put it in the MT5 Experts folder
- In MT5, choose File → Open Data Folder.
- Open MQL5 → Experts and copy the
.ex5file there. - Return to Navigator and refresh Expert Advisors, or restart the terminal.
- Confirm that TSB AutoSync appears in Navigator. Do not rename an unknown third-party file to imitate the TSB binary.
3. Allow only the TSB Server URL
Go to Tools → Options → Expert Advisors, enable Allow WebRequest for listed URL, and add the Server URL shown in TSB Settings. MetaQuotes documents that WebRequest is disabled until the destination is explicitly listed. Use the exact HTTPS origin; do not add an unrelated “auto-GMT” URL, token service, or download site. The MQL5 WebRequest reference also notes that the function is synchronous and cannot run in the Strategy Tester, so a backtest is not a connection test.
4. Attach one instance and enter its inputs
- Open any normal chart in the connected account.
- Drag TSB AutoSync from Navigator onto that chart.
- Paste the Server URL and EA Token from the same TSB workspace.
- Leave the current defaults unless support has asked you to change them:
SyncIntervalSec=300andDaysBack=30. - Confirm the EA remains attached and inspect the Experts log for its initialization/self-check message.
One instance on one chart is enough for the current terminal account. MetaTrader permits only one EA per chart, so use a separate chart if a trading EA already occupies the first one. The reviewed TSB source uses built-in WebRequest and contains no DLL import; it also contains no order-send, modify, or close call.
5. Map the source in TSB
After the first check-in, TSB can display the platform, account login and broker server it received. Map that source to the intended forex journal account and save it. This is especially important when identical account labels exist across demo, live or funded environments. The visible name is for humans; the platform/login/server scope is what distinguishes sources on the server.
How MT4 Setup Differs
The MT4 sequence is the same shape, but the binary and history model are different:
- Download the
.ex4build from TSB Settings. - Use File → Open Data Folder → MQL4 → Experts.
- Refresh Navigator or restart MT4.
- In Tools → Options → Expert Advisors, allow WebRequest for the exact TSB Server URL.
- Attach TSB AutoSync to one unused chart and paste the current Server URL and EA Token.
- Wait for a TSB Last Check, map the login/server, then request an incremental sync.
The official MT4 Expert Advisor help says an EA starts when placed on a chart. Its separate WebRequest reference requires the same explicit allow-list. However, a compiled MT4 binary is not the same thing as runtime proof. TSB’s current product audit still classifies MT4 as limited/beta until a real MT4 demo-history payload and parity checks are captured. If MT4 results disagree with the terminal, use the report-import fallback and send a redacted diagnostic.
How to Show More History in MT5 or MT4
“Backfill 365 days” is a request window, not a promise that the broker has already supplied 365 days to the terminal. First make the desired range visible locally:
- MT5: open Toolbox → History, choose the required period, and let the terminal finish loading it. MT5 can display history as positions, orders, deals or a tree. Those views are not interchangeable: a single order may create several deals, while a journal normally needs one reviewable closed position lifecycle.
- MT4: open Terminal → Account History, right-click, then choose All History or a Custom Period. MetaQuotes’ MT4 Account History documentation describes both the date-range commands and Save as Report / Save as Detailed Report.
MetaQuotes explains that widening the MT5 History interval can trigger a request for deeper broker-server history. After the terminal finishes, choose the matching Backfill Old Trades window in TSB: 7, 30, 90 or 365 days, or 5/10 years only when that older history is genuinely present. Very large histories are sent in bounded batches, so counters can continue changing over later EA cycles.
What “Auto-Sync” Means in Practice
The current EA performs an initial self-check and sync at startup, then uses a timer for heartbeat and incremental work. Its default incremental interval is five minutes. TSB’s Request Sync Now queues a request for the next EA check; it cannot wake a closed terminal. Backfill similarly waits until the EA is running and connected.
| Situation | What happens | Reader action |
|---|---|---|
| Trade closes while desktop MT is running | The next eligible scan can send the closed record | Check Last Check and the later Found/Synced counters; do not impose a 60-second deadline |
| Trade closes while desktop MT is off | Nothing is pushed at that moment | Reopen the same account, load history, then run incremental sync or backfill |
| Trade is still open | It is outside this closed-trade review integration | Manage the position in the broker platform; review it after closure |
| Old range is absent locally | The EA cannot manufacture broker history it cannot read | Load a wider period in MT first, then backfill |
| More than one MT account must sync at once | One terminal session cannot remain logged into every account simultaneously | Use a separate terminal instance per simultaneous account and map each source |
Read the TSB Status Panel Before Reinstalling
| Status or counter | What it actually tells you | Next check |
|---|---|---|
| Waiting for EA | A token exists, but no terminal has checked in | Verify attachment, Server URL, token, WebRequest allow-list and internet access |
| Last Check | Most recent heartbeat; it is not necessarily a trade import | If stale, check that the terminal and EA are still running |
| Found / Received | Records found by the terminal versus received by TSB | If Found is zero, inspect the local history date range and account login |
| Synced / Duplicates | New journal rows versus records already known | Duplicates after a repeat scan are expected protection, not automatically an error |
| Upgraded partial MT trades | A later payload completed an earlier partial-close fragment | Review the aggregated trade; normally no repair is required |
| Sync queued | TSB has recorded a request for the EA | Keep the terminal running until the next check consumes it |
| Backfill queued | An older scan window is waiting for the EA | Confirm the same period is loaded locally in MetaTrader |
What the Current EA Sends — and What Is Not Guaranteed
TSB’s reviewed source reads closed-trade data and sends account-scoped identifiers. Availability still depends on the terminal, broker and account model.
| Data | Current behavior | Boundary |
|---|---|---|
| Symbol and side | Sent from the MT history record | Broker suffixes and synthetic symbols remain broker-specific; no universal normalization promise |
| Entry / exit and size | Sent for closed trades; MT5 entry can be volume-weighted across entry deals | Complex netting, reversal and scale-in paths still need broader real-terminal fixtures |
| Broker P&L | Stored as broker-sourced P&L with gross/net semantics where detectable | Not accounting or tax reconciliation |
| Commission and swap | Current source reads MT commission and swap fields | Commission-bearing and overnight real-account fixtures remain incomplete; MT5’s separate DEAL_FEE is not yet captured by EA v1.27 |
| Account currency | Sent when MetaTrader exposes it | Conversion and contract metadata can differ by broker |
| Stop loss / take profit | Sent when exposed in the history model | Do not assume every modification or intended level survives as a final historical property |
| Partial closes | Execution rows can be grouped into one visible trade; a later sync can upgrade the aggregate | Real partial closes split across incremental cycles still need wider broker proof |
| Notes, setup, screenshots and rule context | User-edited journal fields are preserved by server-side tests | They are not inferred reliably from broker history; add the decision context yourself |
MT5’s data model separates orders, deals and positions; MetaQuotes documents that one order can create several deals. That is why deduplication cannot be “one visible row per raw deal.” For readers who want the platform detail, see MetaQuotes’ explanation of orders, positions and deals and its deal-property reference.
Partial Closes, Repeat Syncs and Deleted Trades
A repeat scan should not create a second visible journal trade for the same known execution. TSB uses exact tickets plus position-instance and legacy aliases to identify replays. On MT5 hedging accounts, exits from one position instance can be grouped; on netting accounts, reversals require narrower identity because a broad position identifier can outlive a direction change.
If an early sync sees only the first closed piece, a later incremental scan or backfill can replace that fragment with the fuller aggregate. Existing journal context is designed to survive that lifecycle update. Still, compare a complex scale-in, reversal or multi-stage exit against the terminal before relying on derived analytics.
Deleting an imported MT trade creates a sync tombstone. Normal incremental sync and backfill should not resurrect it. Use Restore Deleted MT only when you intentionally want those deleted MT rows back; do not rotate a token as a workaround for deletion history.
Multiple MT Accounts and Broker Servers
Map each login/server separately. A personal MT5 account, a demo account and a funded account may share a familiar label while pointing to different servers. TSB’s server-side external IDs include platform, account number, server and ticket when available. For concurrent sync, each account needs its own running terminal instance.
There is one narrow current caveat: the EA’s local cursor key includes the login but not the account server. Equal login numbers reused on different servers are therefore not a configuration to treat as proven in one shared terminal state. Keep those sources in separate terminal instances and verify their counters and destination mappings independently.
Troubleshooting MT4/MT5 Journal Sync
| Symptom | Most useful evidence | Action |
|---|---|---|
| Status remains “Waiting for EA” | MetaTrader Experts/Journal log and exact allow-list entry | Confirm the EA is attached, the current token is pasted, and the Settings Server URL—not just a page URL—is allowed |
| WebRequest error or HTTP failure | Error code, response code, time and redacted log line | Recheck HTTPS allow-list, connectivity and URL; never include the token in a screenshot |
| Recent Last Check but no import | Found/Received/Synced/Duplicates plus local History view | Confirm the trade is closed, the correct account is active and the desired range is loaded |
| Old trades are missing | Earliest visible terminal record versus requested backfill window | Widen MT history first, wait for loading, then queue the matching backfill |
| Everything is a duplicate | Duplicate counter and ticket comparison | If the expected rows already exist, this is normal idempotency; do not delete and reimport blindly |
| Wrong journal account | Source login/server and saved destination mapping | Correct the source mapping before further backfill; do not identify sources only by nickname |
| Partial close total looks wrong | MT5 Deals/Positions history and journal execution rows | Run a backfill after full closure, then report redacted tickets, account model and server if it still differs |
| Commission or swap differs | Broker statement, account currency and MT fields | Treat the broker report as reconciliation evidence and use file import/support while that broker path is investigated |
| MT4 works differently from MT5 | Separate platform logs and binaries | Do not transfer MT5 evidence to MT4; validate each terminal independently |
Can You Use It on a Prop or Funded Account?
Only the exact broker and program rules can answer that. The TSB EA is designed as a history reader and reviewed source contains no trade-placement calls, but a program may still restrict all EAs, external connections, copying, VPS use or account-data tools. Check the current rule page for the specific program and stage; if the language is unclear, ask support whether a non-trading EA may read closed history and send it by HTTPS.
No firm card belongs in this setup guide because no single firm or program controls the answer. Do not infer permission from another firm, from a different challenge stage, or from the fact that a binary does not send orders. If the program refuses the EA, use its permitted export method and import the detailed statement into your journal.
Token and Security Checklist
- Download the EA only from the authenticated TSB Settings route.
- Allow-list only the Server URL displayed by TSB; do not add search-result domains or “token generators.”
- Do not send the EA Token to a broker, prop firm, forum, freelancer or support ticket in plain text.
- If exposed, choose Regenerate Token, then update every connected terminal. The old token no longer connects.
- Token rotation does not delete imported trades and is not a way to reset tombstones.
- The TSB EA path does not ask for your broker trading password or a broker API secret. Stop if an unrelated installer does.
- The reviewed source uses built-in HTTPS WebRequest and no DLL import. Do not enable DLL access merely because a generic EA tutorial says to.
Fallback: Import a MetaTrader Report
File import is the safer fallback when a broker-specific runtime is not proven, a funded program prohibits EAs, or reconciliation matters more than automation. In MT4, choose Account History → the required period → Save as Report or Save as Detailed Report. In MT5, use History → Report and save the available statement format. Keep the original export unchanged for audit.
Before importing, compare account number/server, currency, date range, closed-trade count and one commission-bearing example if available. A file is not automatically perfect—localized columns, time zones and broker formats can vary—but it gives support a fixed artifact instead of a moving terminal state. See the broker import guide for the file workflow and what to add after execution data arrives.
A Better Post-Setup Verification
Do not open a new live trade merely to test journaling. Use a recently closed trade or a demo account and verify these layers:
- Connection: Last Check updates and identifies the expected platform/login/server.
- History: the closed trade exists inside the terminal’s selected date range.
- Transport: Found and Received are plausible; the log has no unresolved WebRequest or authorization error.
- Idempotency: a second requested sync reports the known item as a duplicate rather than creating another visible trade.
- Data: compare symbol, side, entry, exit, size, P&L, account currency, commission and swap against the broker history.
- Lifecycle: for partials or scale-ins, compare the journal aggregate only after the position is fully closed and a later sync/backfill has run.
- Context: add setup, rule adherence, screenshot and decision notes manually; automation does not know why you traded.
Connect MetaTrader to Trader’s Second Brain
Disclosure: this guide is published by Trader’s Second Brain. TSB’s current MT4/MT5 integration imports closed trades for review and is still marked limited across broker/server variants. If that boundary fits your account, open the authenticated setup panel; otherwise use a detailed report import.
The Reliable Version of “Set Up Once”
A good sync removes repetitive transcription, not responsibility. Install the correct signed-in download, allow the exact Server URL, attach one EA to one chart, map the exact login/server and verify a known closed trade. Keep the desktop terminal available when you want ongoing sync, and use backfill only after the required history is loaded locally.
Then review the counters instead of assuming silence means success. Repeat scans should deduplicate, deleted MT rows should stay deleted, and partial closes may be upgraded after later history arrives. For an unproven broker, MT4 runtime, complex netting path or restricted funded account, preserve the report and use file import. That is less magical than “never log again,” but it is a workflow you can audit.
Methodology and Verification Boundary
This revision was checked September 7, 2026 against the TSB Settings and Docs flows, the server endpoint, both EA source files, the release manifest and the current MT4/MT5 product audit. The reviewed manifest reports EA v1.27 binaries compiled July 16, 2026 with zero compiler errors and warnings. Local product evidence covers a limited MT5 demo path, an idempotent repeat sync, a grouped partial-close example and server-side preservation/tombstone tests. It does not yet establish universal broker support, MT4 runtime parity, every commission/swap convention, every netting/reversal sequence, or metals/indices coverage.
Platform behavior was cross-checked against MetaQuotes’ official EA, WebRequest, account-history and MT5 order/deal/position documentation. Product statements describe current code and local evidence, not a promise about a broker’s terminal, funded-program policy or future release. This guide is educational and does not provide trading, security, tax or accounting advice.