MT5 Trading Journal: Auto-Sync With a Read-Only Expert Advisor
Product research based on TDLab workflows, hands-on testing and cited source material.
An MT5 trading journal can stay current without manual exports. TDLab does it with TDLab Sync, a small Expert Advisor that runs in the MetaTrader 5 terminal, reads the account history and sends closed positions to the TDLab account it is linked to.
The EA is read-only. It does not place orders, modify positions or close trades. Its job is narrow: move completed trade data into the journal reliably enough that review can begin.
Short answer
Create an MT5 account in TDLab, open Auto-sync and generate a token. Copy TDLabSync.ex5 into MetaTrader's Experts folder, allow WebRequest for app.tradingdisciplinelab.com, attach the EA to any chart and paste the token. Closed positions arrive a few seconds after they close, with a check every five minutes as a fallback.Factual review
Product and platform details on this page were checked on November 2, 2026 against the current TDLab implementation and the official MetaTrader 5 release notes.Why TDLab no longer uses FTP for MT5
Earlier versions of this guide connected MT5 through the terminal's built-in FTP report publisher. MetaQuotes removed that feature in MetaTrader 5 build 6060 (July 2026), describing it as a legacy feature that is no longer widely used. See the MetaTrader 5 build 6060 release notes. Updated MT5 terminals no longer publish reports, so an FTP connection stops receiving new trades.
MetaTrader 4 is not affected: MT4 accounts keep the FTP auto-sync. Manual imports of the MT5 History report also work as before.
How TDLab Sync works
- TDLab issues a token for one account.The token is generated in Add trades > Auto-sync and is not your broker password.
- The EA links the token to your MT5 login. On first start it sends the login and server. From then on the token only works for that MT5 account.
- The EA rebuilds closed positions from the history. Partial closes stay in one position, with weighted entry and exit prices, and commissions, fees and swap added together.
- Positions are sent over HTTPS. A few seconds after each close, and every five minutes as a heartbeat. On first start the EA sends the history already loaded in the terminal.
- TDLab deduplicates and imports. Each position is identified by its MT5 position ID, so resending the same history, or switching from manual imports to the EA, does not create duplicates.
Set up the MT5 trading journal connection
1. Create the correct TDLab account
The TDLab trading account must use MetaTrader 5 as its platform. Keep each broker login in its own account so cash flows, account rules and analytics do not become mixed.
2. Generate the token in TDLab
Open Add trades, choose Auto-sync and click Generate token. The panel shows the token, the download and the remaining steps. The full product sequence is documented in Connecting MetaTrader 5 with TDLab Sync.
3. Install the EA in MetaTrader 5
- Open File, Open Data Folder, MQL5, Experts and copy TDLabSync.ex5 there. Refresh Expert Advisors in the Navigator.
- In Tools, Options, Expert Advisors, enable Allow WebRequest for listed URL and add https://app.tradingdisciplinelab.com.
- Drag TDLab Sync onto any chart of the account.
- Paste the token in the Value column of the Inputs tab and click OK. Load and Save only handle preset files and are not needed.
- Keep the terminal open, connected and logged into that account.
The EA status appears in the top-left corner of the chart. In TDLab the badge turns to EA running once the first contact arrives.
4. Verify before trusting the analytics
Reconcile the first imported sample against MT5. Compare total closed trades, symbols, direction, size, close time, P&L and fees. A connector should earn trust with a small verified sample before months of history are used for decisions.

What a read-only EA can and cannot do
- it reads the account history and sends closed positions;
- it never sends, modifies or closes orders;
- its token can only upload trades to one TDLab account;
- it needs WebRequest permission for the TDLab address;
- it works while the terminal is open, and catches up on restart;
- it is designed for closed-trade review, not live execution.
The source code ships next to the compiled file, so you can read exactly what the EA does before attaching it. If you trade a prop firm account, check the firm's rules on Expert Advisors before installing any EA, including a read-only one.
What the journal should preserve
The EA supplies the objective trading record. The journal should preserve at least:
- account and platform;
- position ID, symbol and side;
- position size and timestamps;
- closed-trade P&L, commissions, fees and swap;
- a stable identity for duplicate detection.
These fields answer what happened. They do not answer whether the setup was valid or the plan was followed. Use the complete trading journal field template for the behavioral layer.
Common MT5 sync errors
The chart says the URL is not allowed
MetaTrader blocks web requests to addresses that are not listed. Add https://app.tradingdisciplinelab.com in Tools, Options, Expert Advisors. The EA retries every minute, so no restart is needed.
Invalid token or a different account
Each token is linked to the first MT5 login that uses it. If the EA runs on another login, or the token was regenerated in TDLab, it stops and shows the reason on the chart. Paste the current token, or create a separate TDLab account for the other login.
The badge says EA not running
TDLab has not heard from the EA for more than fifteen minutes. Check that the terminal is open, connected and that the EA is still on the chart. Trades closed in the meantime are sent when it restarts.
Trades appear one hour off
The EA converts broker server time to UTC. It handles the common GMT+2/GMT+3 server clock that follows US daylight saving time. With a different server convention, older trades can be shifted by an hour: compare a few close times with MT5 and contact support if they differ.
Older trades are missing
The EA can only send history that is loaded in the terminal. In the History tab, make sure the period you need is loaded (for example All History), then restart the EA. During the trial the first sync sends the most recent positions that fit the trial limit.
What to do after MT5 trades arrive
Import completion is the beginning of a review, not the final result. Reconcile the source, complete the trade-review fields and close the session with the daily trading journal routine. At the end of the week, read expectancy, drawdown and fees beside review coverage and plan adherence using the performance metrics scorecard.
Common questions
Does TDLab need my MT5 broker password?
No. TDLab Sync uses a token generated by TDLab. Neither the broker password nor the investor password is required.
Does MT5 sync while the terminal is closed?
No. The EA runs inside the terminal. When the terminal reopens, it sends the positions closed in the meantime.
Why not use the MT5 MCP server?
Build 6060 also added an MCP server for AI agents. It answers requests on the trader's own computer and its access includes trading tools, so it is not a fit for a journal that should only receive closed trades.
Can I use both file import and TDLab Sync?
Yes. A History report can backfill older trades and the EA can handle later ones. Positions are matched by MT5 position ID, so overlaps are skipped rather than duplicated.
MetaTrader 5 and related marks belong to MetaQuotes. TDLab is an independent journal and is not presented as an official MetaQuotes product.
Connect behavior, context and performance.
TDLab connects your real trades with behavior, rules and historical market context, then helps you test what to change. Start free for 14 days.