Connecting MetaTrader 5 with TDLab Sync
TDLab Sync is a read-only Expert Advisor for MetaTrader 5. It reads your account history and sends closed positions to TDLab a few seconds after they close. It never opens, modifies or closes trades.
For how the EA rebuilds positions, the verification checklist and common errors, read the MT5 trading journal and TDLab Sync guide.
Requirements
Your TDLab account’s platform must be set to MetaTrader 5. The MT5 desktop terminal has to stay open and connected for the EA to run; when it restarts, it sends the positions closed in the meantime.Generate the token in TDLab
- Select your MT5 trading account.
- Open the Auto-sync tab and click Generate token.
- Copy the token with the copy button and download the EA. The source code is available next to it.
Install the EA in MetaTrader 5
- Open File → Open Data Folder → MQL5 → Experts and copy TDLabSync.ex5 there. In the Navigator, right-click Expert Advisors and choose Refresh.
- 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 and paste the token in the Value column of the Inputs tab.
- Click OK. Load and Save only load or save the inputs from a file and are not needed.
- The EA status appears in the top-left corner of the chart. In TDLab the badge turns to EA running within a few seconds.
Syncing
On first start the EA sends the history already loaded in the terminal. After that it sends each position a few seconds after it closes and checks in every five minutes. Times are converted to UTC by the EA, so there is no report timezone to choose. Positions already in TDLab, including those imported from an MT5 History report, are skipped rather than duplicated.
Token and account
A token is linked to the first MT5 login that uses it and only works for that account. Regenerate token makes the old one stop working: paste the new one into the EA inputs. Disconnect stops the sync; trades already imported stay in the journal.
Moving from FTP sync
MetaTrader 5 stopped publishing reports over FTP in build 6060, so MT5 FTP connections no longer receive new trades. If your MT5 account still shows the FTP panel, click Switch to TDLab Sync: the FTP connection is removed and a token is created. Trades already imported stay.Put the evidence to work.
Connect your real trades with behavior, rules and historical market context. Start free for 14 days.