Trader's Second Brain Trader's Second Brain

MT4/MT5 Auto-Sync: Set Up Once, Never Log a Trade Manually Again

MT4/MT5 auto-sync can remove repetitive trade transcription, but it is not a universal broker connection. The current Trader’s Second Brain EA reads closed trades available in a running desktop terminal and sends them to the mapped journal account. This guide shows the exact MT5 and MT4 setup, how to load history, what each status means, what data is and is not proven, and when to use a detailed report import instead.

Quick Answer

Download the correct .ex4 or .ex5 binary from authenticated TSB Settings, allow the exact Server URL under MetaTrader WebRequest, attach one EA to one chart, paste the current EA Token, map the login/server, and verify a known closed trade. The default incremental interval is 300 seconds and the default scan window is 30 days. The integration is limited closed-trade review sync—not execution, open-position monitoring, universal broker coverage, or accounting reconciliation.

Your trades · one review system
Import → reconcile → review

Find the leak before the next trade.

Import or log trades. Find setup, session, and behavior leaks.

Find trade leaks →
Trader's Second Brain preview
Reading map

Three checkpoints in this guide

Follow the full walkthrough in order, or jump directly to one of its main sections.

  1. 01Opening checkpointBefore You Start: Six Things to Check
  2. 02Middle checkpointPartial Closes, Repeat Syncs and Deleted Trades
  3. 03Closing checkpointMethodology and Verification Boundary
Accuracy correction — September 7, 2026

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.

Short answer

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.

Current product boundary
  • 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

  1. 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.
  2. 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.
  3. Choose the right binary. MT4 requires .ex4; MT5 requires .ex5. They are not interchangeable.
  4. 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.
  5. 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.
  6. 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

StepTSB Full AccessIn MetaTraderPass signal
1. DownloadSettings → Exchanges → MT4 / MT5 Auto-SyncChoose the binary for the terminal versionThe downloaded file ends in .ex4 or .ex5
2. InstallKeep Settings open for the URL and tokenFile → Open Data Folder → MQL4/Experts or MQL5/ExpertsTSB AutoSync appears under Navigator → Expert Advisors after refresh/restart
3. Permit HTTPSCopy the Server URL shown in SettingsTools → Options → Expert Advisors → allow WebRequest for that exact URLThe URL is visible in MetaTrader’s allow-list
4. ConnectCopy the current EA TokenAttach the EA to one chart; paste ServerURL and EATokenTSB leaves “Waiting for EA” and shows a recent Last Check
5. MapMap that MT login/server to the intended journal accountLeave the terminal connected to the same accountThe saved source shows the correct login, server and destination
6. VerifyUse Request Sync Now, then compare counts and one tradeOpen Experts/Journal logs if the request failsFound/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

  1. In MT5, choose File → Open Data Folder.
  2. Open MQL5 → Experts and copy the .ex5 file there.
  3. Return to Navigator and refresh Expert Advisors, or restart the terminal.
  4. 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

  1. Open any normal chart in the connected account.
  2. Drag TSB AutoSync from Navigator onto that chart.
  3. Paste the Server URL and EA Token from the same TSB workspace.
  4. Leave the current defaults unless support has asked you to change them: SyncIntervalSec=300 and DaysBack=30.
  5. 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:

  1. Download the .ex4 build from TSB Settings.
  2. Use File → Open Data Folder → MQL4 → Experts.
  3. Refresh Navigator or restart MT4.
  4. In Tools → Options → Expert Advisors, allow WebRequest for the exact TSB Server URL.
  5. Attach TSB AutoSync to one unused chart and paste the current Server URL and EA Token.
  6. 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.

SituationWhat happensReader action
Trade closes while desktop MT is runningThe next eligible scan can send the closed recordCheck Last Check and the later Found/Synced counters; do not impose a 60-second deadline
Trade closes while desktop MT is offNothing is pushed at that momentReopen the same account, load history, then run incremental sync or backfill
Trade is still openIt is outside this closed-trade review integrationManage the position in the broker platform; review it after closure
Old range is absent locallyThe EA cannot manufacture broker history it cannot readLoad a wider period in MT first, then backfill
More than one MT account must sync at onceOne terminal session cannot remain logged into every account simultaneouslyUse a separate terminal instance per simultaneous account and map each source

Read the TSB Status Panel Before Reinstalling

Status or counterWhat it actually tells youNext check
Waiting for EAA token exists, but no terminal has checked inVerify attachment, Server URL, token, WebRequest allow-list and internet access
Last CheckMost recent heartbeat; it is not necessarily a trade importIf stale, check that the terminal and EA are still running
Found / ReceivedRecords found by the terminal versus received by TSBIf Found is zero, inspect the local history date range and account login
Synced / DuplicatesNew journal rows versus records already knownDuplicates after a repeat scan are expected protection, not automatically an error
Upgraded partial MT tradesA later payload completed an earlier partial-close fragmentReview the aggregated trade; normally no repair is required
Sync queuedTSB has recorded a request for the EAKeep the terminal running until the next check consumes it
Backfill queuedAn older scan window is waiting for the EAConfirm 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.

DataCurrent behaviorBoundary
Symbol and sideSent from the MT history recordBroker suffixes and synthetic symbols remain broker-specific; no universal normalization promise
Entry / exit and sizeSent for closed trades; MT5 entry can be volume-weighted across entry dealsComplex netting, reversal and scale-in paths still need broader real-terminal fixtures
Broker P&LStored as broker-sourced P&L with gross/net semantics where detectableNot accounting or tax reconciliation
Commission and swapCurrent source reads MT commission and swap fieldsCommission-bearing and overnight real-account fixtures remain incomplete; MT5’s separate DEAL_FEE is not yet captured by EA v1.27
Account currencySent when MetaTrader exposes itConversion and contract metadata can differ by broker
Stop loss / take profitSent when exposed in the history modelDo not assume every modification or intended level survives as a final historical property
Partial closesExecution rows can be grouped into one visible trade; a later sync can upgrade the aggregateReal partial closes split across incremental cycles still need wider broker proof
Notes, setup, screenshots and rule contextUser-edited journal fields are preserved by server-side testsThey 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.

Deletion is intentionally sticky

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

SymptomMost useful evidenceAction
Status remains “Waiting for EA”MetaTrader Experts/Journal log and exact allow-list entryConfirm 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 failureError code, response code, time and redacted log lineRecheck HTTPS allow-list, connectivity and URL; never include the token in a screenshot
Recent Last Check but no importFound/Received/Synced/Duplicates plus local History viewConfirm the trade is closed, the correct account is active and the desired range is loaded
Old trades are missingEarliest visible terminal record versus requested backfill windowWiden MT history first, wait for loading, then queue the matching backfill
Everything is a duplicateDuplicate counter and ticket comparisonIf the expected rows already exist, this is normal idempotency; do not delete and reimport blindly
Wrong journal accountSource login/server and saved destination mappingCorrect the source mapping before further backfill; do not identify sources only by nickname
Partial close total looks wrongMT5 Deals/Positions history and journal execution rowsRun a backfill after full closure, then report redacted tickets, account model and server if it still differs
Commission or swap differsBroker statement, account currency and MT fieldsTreat the broker report as reconciliation evidence and use file import/support while that broker path is investigated
MT4 works differently from MT5Separate platform logs and binariesDo 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:

  1. Connection: Last Check updates and identifies the expected platform/login/server.
  2. History: the closed trade exists inside the terminal’s selected date range.
  3. Transport: Found and Received are plausible; the log has no unresolved WebRequest or authorization error.
  4. Idempotency: a second requested sync reports the known item as a duplicate rather than creating another visible trade.
  5. Data: compare symbol, side, entry, exit, size, P&L, account currency, commission and swap against the broker history.
  6. Lifecycle: for partials or scale-ins, compare the journal aggregate only after the position is fully closed and a later sync/backfill has run.
  7. 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.

Igor Manuilov
Written and reviewed by
Igor Manuilov
Founder of Trader's Second Brain · Trader since 2014
Editorial accountability

Trader since 2014. Built Trader's Second Brain to make execution review more evidence-based and less dependent on memory, scattered spreadsheets, or vague journaling.

Your trades · one review system
Import → reconcile → review

Your trade history already knows what to fix next.

Import or log trades. Find setup, session, and behavior leaks.

Find trade leaks →
Trader's Second Brain preview

Frequently Asked Questions

Quick answers to the most common questions about MT4/MT5 Auto-Sync.

No universal compatibility claim is justified. The EA uses standard MetaTrader history and WebRequest functions, but brokers differ in servers, symbols, contract metadata, account models, fees, swaps, history depth, and terminal policy. TSB currently labels the integration limited and recommends verifying one known closed trade against the exact broker account.

The reviewed TSB source contains no order-send, modify, or close calls and uses built-in WebRequest to send closed-history data. That supports calling it a non-trading history reader, not promising zero overhead or zero possible conflict. Run it on a separate chart, check terminal logs, and validate it in the exact environment before relying on it.

Nothing is pushed while the desktop terminal and EA are off. Reopen the same account, make the required closed-history range available locally, and run an incremental sync or backfill. The EA cannot recover history that the broker does not expose to that terminal, so compare the terminal range and TSB counters rather than assuming every trade will appear.

Only if the exact broker and program rules permit it. Some programs restrict all EAs, external connections, copying, VPS use, or account-data tools even when software does not place orders. Check the current rule page for the specific program and stage, or ask support about a non-trading EA that reads closed history and sends it by HTTPS. Use a permitted statement export if the answer is no.

The current EA sends closed-trade identifiers, symbol, side, entry and exit, size, broker P&L, account currency, commission, swap, and SL/TP when MetaTrader exposes them. Availability and semantics vary by broker. EA v1.27 does not separately capture MT5 DEAL_FEE, and commission/swap fixtures are not complete. Setup tags, screenshots, rule adherence, and decision notes still need trader input.

The EA runs in a desktop MetaTrader terminal, not the mobile app. A trade placed from mobile may be imported later when the connected desktop terminal loads that closed trade into its local history. Continuous near-term sync requires that desktop terminal or a permitted hosted desktop environment to remain running; otherwise reopen it and backfill later.

Use the TSB status panel: a recent Last Check proves a heartbeat, then Found/Received and Synced/Duplicates describe the import result. Compare one already closed trade or a demo trade against MetaTrader history; do not open a new live position just to test. The default interval is 300 seconds, so 60 seconds is not a valid failure threshold.

Use a separate chart. MetaTrader permits only one EA on a chart, so attaching TSB AutoSync to a chart already occupied by another EA can replace that chart's current EA. The reviewed TSB source does not trade, but no guide can guarantee zero conflict or overhead across every terminal and third-party EA. Validate logs and behavior in the exact environment.