Integration Manual

Stop Logging Trades.
Let Them Log Themselves.

Auto-Sync connects your broker or prop firm terminal directly to your My Trader Pro journal. You close a trade; it appears in your journal — entry, exit, stop, target, lots, session and broker P&L, filed to the right account, graded and folded into every engine you run.

This manual covers every way to connect, from a 60-second MetaTrader install to a raw webhook you can call from anything.

How Auto-Sync works

Your terminal pushes finished trades to My Trader Pro. Nothing pulls from your broker, and no broker password ever leaves your machine — which is exactly why this works with any broker or prop firm rather than a curated list.

Your terminal  ──▶  MTP ingest endpoint  ──▶  your private queue  ──▶  your journal
   (EA/bot)          authenticated by             held safely           pulled in
                     your API key                 until you're          automatically
                                                  next online           while open

Three pieces, and you only ever touch the first two:

  • Your API key — generated in the portal under Signals & Sync. It identifies you and nothing else. It can only add trades to your journal; it cannot read your data, and it cannot touch anyone else's account.
  • The sender — our MetaTrader Expert Advisor, or any script, bot or automation tool that can send a web request.
  • The queue — trades wait server-side until your portal is open, then land in your journal. Your terminal and your browser never need to be online at the same time.
Duplicates are impossible. Every trade carries its broker ticket number. Re-run the script, restart the terminal, re-send the same week — the same trade is only ever logged once.

MetaTrader 5 Recommended

The fastest and most complete route, and the one most prop firms support. Works with every MT5 broker and every funded account.

  1. Get your key. Portal → Signals & SyncGenerate my Auto-Sync key. Copy it — it looks like mtp_a1b2c3…
  2. Install the Expert Advisor. ⬇ Download MTP-AutoSync.mq5. In MT5: File → Open Data Folder → MQL5 → Experts, drop the file in, then in MT5 press F7 or right-click the Navigator and choose Refresh.
  3. Allow MT5 to talk to us. Tools → Options → Expert Advisorstick the checkbox Allow WebRequest for listed URL → add exactly https://mytraderpro.com → press OK.
    This step causes more failed setups than everything else combined. Three things go wrong: the URL is in the list but the checkbox above it is not ticked (it must be); the URL has a trailing slash, a www. or the full /wp-json/... path (use the bare host exactly as shown); or the dialog is closed with the window X instead of OK, which discards it. Also make sure Algo Trading in the toolbar is on (green).
    This is the step people miss. Without it MT5 blocks the connection and the EA logs error 4014.
  4. Attach the EA. Drag MTP-AutoSync from the Navigator onto any chart — any symbol, any timeframe, it doesn't matter which. Paste your key into ApiKey. Press OK.
  5. Confirm it's live. The chart shows MTP Auto-Sync — active in the corner, and the Experts tab logs armed. Close a trade and it appears in your journal within a minute.

Settings you can change

SettingDefaultWhat it does
ApiKeyYour key from the portal. Required.
Endpoint…/mtp/v1/ingestLeave as-is unless we tell you otherwise.
AccountLabelblankName shown in your journal notes. Blank uses your broker name and login — useful when you run several accounts.
LookbackDays7How much history to send on the first run. Raise it once to back-fill, then lower it again.
CheckSeconds60How often it sweeps for closed trades. It also pushes instantly on every close, so this is just a safety net.
One EA is enough. It watches your whole terminal, not the chart it sits on. Running it on ten charts just sends the same trades ten times — harmless, but pointless.
What the on-chart line is telling you. The EA reports its real state, so you never have to guess:
  • connected · watching N open position(s) — working. Only closed trades sync, so open positions sitting there is normal, not a fault.
  • NOT CONNECTED · WebRequest blocked — the permission step above.
  • NOT CONNECTED · API KEY REJECTED — the key was regenerated after you pasted it. Pressing ↻ New key in the portal instantly kills the previous key; re-copy the current one.
  • NOT CONNECTED · cannot reach server — network or firewall between you and us.
Several accounts? Attach the EA in each terminal (or after each login switch) with the same key. Every trade carries its broker login, and the portal routes it to the journal account bound to that login — binding happens on the first import, unknown logins get their own account created automatically, and the 🔗 chip in Accounts shows every binding. Leave AccountLabel blank unless you want a custom name; if you do set labels on multiple terminals, make each one different.

MetaTrader 4 Supported

MT4 uses a different language (MQL4) but the same idea and the same endpoint. ⬇ Download MTP-AutoSync.mq4 and follow the MT5 steps — the only difference is the folder: File → Open Data Folder → MQL4 → Experts, and the WebRequest permission lives in the same place (if MT4 logs error 4060, that's the WebRequest permission missing).

Same inputs, same behaviour: one EA watches the whole terminal, closed trades push within a second of the close, and LookbackDays back-fills history on the first run.

TradeLocker Supported

TradeLocker runs in the browser and on mobile — it cannot load MetaTrader robots, so there is no EA to drag onto a chart. It connects through a small bridge script instead, which reads your closed trades through TradeLocker's own API and forwards them to your journal. It never places, modifies or closes an order, and your TradeLocker password never leaves your machine — it is sent only to TradeLocker's own login endpoint.

  1. Install Python. Get Python 3.11 or newer from python.org/downloads. On Windows, tick "Add python.exe to PATH" on the first screen of the installer — almost every "python isn't recognised" problem traces back to that box. On macOS it is already installed; check with python3 --version.
  2. Install the one dependency. Open Command Prompt (Windows) or Terminal (macOS) and run:
    pip install requests  — on macOS use pip3 install requests.
  3. Get your MTP key. Portal → 🔔 Signals & Sync📋 Copy key. If you have never generated one, press 🔑 Generate my Auto-Sync key first.
    Generating a new key instantly kills the previous one. If a terminal or script is already running with the old key it will start failing — so only generate a new key when you intend to re-paste it everywhere.
  4. Find your TradeLocker server name. It is the third field on the TradeLocker sign-in screen, above email and password (your broker gives it to you — it looks like OSP-DEMO or your broker's name). You need it exactly as shown.
  5. Download the bridge. ⬇ MTP-TradeLocker-Sync.py — save it somewhere you can find again, e.g. your Documents folder.
  6. Fill in the CONFIG block.
    Do not double-click the file to edit it. On Windows, double-clicking a .py file runs it — a black window appears and closes instantly, which looks like the download is broken. It isn't. To edit it: right-click → Open with → Notepad (or VS Code). To run it, use the Command Prompt as in step 7.
    Near the top you will see:
    "mtp_key":     "PASTE_YOUR_MTP_KEY_HERE",
    "tl_email":    "you@example.com",
    "tl_password": "YOUR_TRADELOCKER_PASSWORD",
    "tl_server":   "YOUR_SERVER_NAME",
    "tl_env":      "demo",
    Replace each value between the quotes. Set tl_env to demo or live to match the account you actually trade. Save the file.
  7. Run it. In the same Command Prompt / Terminal, change into the folder you saved it in and run:
    python MTP-TradeLocker-Sync.py  — on macOS, python3 MTP-TradeLocker-Sync.py.
    You should see Connected to My Trader Pro. followed by Watching N TradeLocker account(s).
  8. Leave it running. It checks every 60 seconds and closed trades appear in your journal automatically. Closing the window stops the sync — nothing is lost, it simply catches up next time you start it.

Prefer not to leave a window open? Run it once on a schedule instead: python MTP-TradeLocker-Sync.py --once does a single pass and exits. Point Windows Task Scheduler or a cron job at that command as often as you like.

If something goes wrong

What you seeWhat it meansFix
A black window flashes and closesYou double-clicked the file, which runs it instead of opening it.To edit: right-click → Open with → Notepad. To run: open Command Prompt and use python MTP-TradeLocker-Sync.py. The script now pauses before closing so you can read any message.
python is not recognizedPython is not on your PATH.Reinstall Python and tick Add python.exe to PATH, or use the full path to python.exe.
Missing dependencyThe requests library is not installed.Run pip install requests (macOS: pip3).
TradeLocker rejected the loginEmail, password or server name is wrong, or you are pointed at the wrong environment.Check all three against the TradeLocker sign-in screen, and confirm tl_env matches (demo vs live).
My Trader Pro rejected the keyThe key was regenerated after you pasted it.Copy the current key from Signals & Sync and paste it in again.
Connects, but no trades arriveOnly closed trades sync.Close a position, or check you are on the account you actually traded (tl_env).
Prefer not to keep a password in a file? The script reads TL_EMAIL, TL_PASSWORD, TL_SERVER and MTP_KEY from environment variables instead.
What success looks like. The window prints Connected to My Trader Pro, and in the portal the Signals & Sync TERMINAL chip shows your check-in within a minute. Each TradeLocker account files to its own journal account automatically — created as TradeLocker demo 12345 / TradeLocker live 12345 on first import (rename it anything you like in Accounts; the 🔗 link keeps routing correct). Demo and live can never mix, even with matching account numbers.
Naming your accounts. Set account_label in the CONFIG to control the name: with one TradeLocker account the label is used exactly as typed; with several, the account number is appended automatically so their histories can never merge.

cTrader Supported

cTrader can't load MetaTrader robots, but it has its own automation engine — cBots — and we ship one ready to go. The MTP cBot watches for closed positions and writes each one to your journal: entry, exit, stop, target, volume and net P&L, marked broker-verified. It only pushes data out; it cannot place, modify or close an order, and your password never leaves cTrader.

  1. Download the cBot. ⬇ MTP-cTrader-Sync.cs — one file, ~100 lines, readable top to bottom.
  2. Add it to cTrader. Open the Automate tab (the robot icon) → New cBot → select all in the editor and paste the entire file over it → press Build (F6). "Build succeeded" means you're done here.
  3. Get your key. Portal → Signals & Sync → copy your personal sync key.
  4. Run it. Add the cBot to any one chart (one chart covers the whole account), paste the key into its MTP Sync Key parameter, and press Play. When cTrader asks about permissions, allow them — the cBot needs Full Access to make the HTTPS call to your journal, and that is the only thing it does with it.

If something goes wrong

What you seeWhat it meansFix
Build errorsPart of the file was pasted, or the template's default code is still mixed in.Select all code in the editor, delete it, paste the complete downloaded file, Build again.
MTP sync → 401 in the logThe key is wrong or was regenerated after you pasted it.Copy the current key from Signals & Sync into the cBot's parameter and restart it.
No network call ever firesThe cBot was added without Full Access rights.Stop it, re-add it to the chart and accept the access prompt.
Runs, but nothing arrivesOnly closed positions sync.Close a trade — it lands within seconds, and the TERMINAL chip in Signals & Sync shows the check-in.
What success looks like. The cBot log prints MTP sync → 200 OK after each close, and the trade appears in your journal marked verified with Auto-Sync cTrader as its source.

Any other platform Universal

Auto-Sync is a plain HTTPS endpoint that accepts JSON. Anything that can send a web request can feed your journal.

cTrader

Ready-made: the MTP cBot above is a one-file install. Rolling your own? Post from OnPositionClosed with HttpClient.

DXtrade / Match-Trader

Where the firm exposes an API or webhook, point it at the ingest URL and map the fields in the table below.

TradingView

Alerts can POST to a webhook URL. Put your key and the trade fields in the alert message body as JSON.

Zapier / Make / n8n

Use a Webhooks → POST action. Paste the ingest URL, set the body to JSON, map your fields.

Python / Node bots

One requests.post or fetch call after each fill. See the examples below.

Anything else

If it speaks HTTPS and JSON, it works. There is no allow-list of brokers to be excluded from.

Endpoint

POST https://mytraderpro.com/wp-json/mtp/v1/ingest
Content-Type: application/json

Authenticate by putting "key" in the body, or by sending the header X-MTP-Key: your_key. Send one trade, or up to 200 in a trades array.

Payload specification

FieldTypeNotes
keystring requiredYour Auto-Sync key (or send the X-MTP-Key header instead).
symbolstring requirede.g. XAUUSD. Broker suffixes are handled — XAUUSD.R, XAUUSDm and XAUUSD.pro all map to gold.
directionstring requiredbuy / sell. long / short and type also accepted.
lotsnumber requiredPosition size. volume also accepted.
entrynumber requiredFill price. openPrice also accepted.
ticketstring strongly advisedBroker ticket / position id. This is what makes duplicates impossible — without it we fall back to matching on the other fields.
slnumber optionalStop price. Omit or send 0 and we place a 0.5% placeholder so your risk maths still works — then correct it in the journal.
tpnumber optionalTarget price. 0 is treated as "no target".
exitnumber optionalClose price. Leave it out for an open position — add it later and the trade completes.
openTimestring optional2026.08.05 09:15:00 or ISO. Sets the journal date and the trading session.
profitnumber optionalBroker P&L, recorded in the trade notes so you can reconcile against your statement.
accountstring recommendedThe routing key. The portal binds each journal account to this exact string on first import and files every later trade to its bound account automatically — so send one stable, unique value per real account (e.g. "FTMO 100k", "ICMarkets-Live 12345"). Change it and trades start routing to a new account; omit it and trades file to whichever account is active. The MetaTrader EAs send broker + login automatically, and the TradeLocker bridge sends TradeLocker <env> <account #> — custom integrations should follow the same discipline. One caution for multi-terminal setups: if you set a custom AccountLabel in the EA, give each terminal a different label, or their histories will share one journal account.
sourcestring optionalWhat sent it, e.g. cTrader bot. Defaults to Auto-Sync.

A successful call returns {"ok":true,"accepted":2,"queued":2}. accepted counts genuinely new trades — a duplicate returns 0, which is a success, not an error.

Working examples

curl — test your key in 5 seconds

curl -X POST https://mytraderpro.com/wp-json/mtp/v1/ingest \
  -H "Content-Type: application/json" \
  -d '{
    "key": "mtp_YOUR_KEY_HERE",
    "symbol": "XAUUSD",
    "direction": "buy",
    "lots": 0.10,
    "entry": 3300.40,
    "sl": 3295.00,
    "tp": 3312.00,
    "exit": 3310.20,
    "profit": 98.00,
    "ticket": "123456789",
    "openTime": "2026.08.05 09:15:00",
    "account": "FTMO 100k",
    "source": "manual test"
  }'

Several trades at once

{
  "key": "mtp_YOUR_KEY_HERE",
  "trades": [
    { "ticket": "900001", "symbol": "XAUUSD", "direction": "buy",
      "lots": 0.5, "entry": 3300.4, "sl": 3295, "tp": 3312, "exit": 3310.2 },
    { "ticket": "900002", "symbol": "EURUSD", "direction": "sell",
      "lots": 0.25, "entry": 1.0910, "sl": 1.0935, "exit": 1.0880 }
  ]
}

Python bot

import requests

def log_trade(t):
    requests.post(
        "https://mytraderpro.com/wp-json/mtp/v1/ingest",
        json={"key": "mtp_YOUR_KEY_HERE", **t},
        timeout=10,
    )

log_trade({
    "ticket": str(order.id), "symbol": order.symbol,
    "direction": "buy" if order.is_long else "sell",
    "lots": order.volume, "entry": order.open_price,
    "sl": order.stop_loss, "tp": order.take_profit,
    "exit": order.close_price, "profit": order.pnl,
})

cTrader cBot (C#)

using System.Net.Http;
using System.Text;

private static readonly HttpClient Http = new HttpClient();

protected override void OnStart()
{
    Positions.Closed += OnClosed;
}

private void OnClosed(PositionClosedEventArgs args)
{
    var p = args.Position;
    var json = "{\"key\":\"mtp_YOUR_KEY_HERE\"," +
        "\"ticket\":\"" + p.Id + "\"," +
        "\"symbol\":\"" + p.SymbolName + "\"," +
        "\"direction\":\"" + (p.TradeType == TradeType.Buy ? "buy" : "sell") + "\"," +
        "\"lots\":" + (p.VolumeInUnits / 100000.0) + "," +
        "\"entry\":" + p.EntryPrice + "," +
        "\"exit\":" + (p.ClosePrice ?? 0) + "," +
        "\"sl\":" + (p.StopLoss ?? 0) + "," +
        "\"tp\":" + (p.TakeProfit ?? 0) + "," +
        "\"profit\":" + p.NetProfit + "," +
        "\"source\":\"cTrader\"}";
    Http.PostAsync("https://mytraderpro.com/wp-json/mtp/v1/ingest",
        new StringContent(json, Encoding.UTF8, "application/json"));
}

TradingView alert

Set the alert's webhook URL to the ingest endpoint and put this in the message box. TradingView replaces the placeholders when the alert fires:

{
  "key": "mtp_YOUR_KEY_HERE",
  "symbol": "{{ticker}}",
  "direction": "{{strategy.order.action}}",
  "lots": {{strategy.order.contracts}},
  "entry": {{strategy.order.price}},
  "source": "TradingView"
}
TradingView alerts fire on signals, not on real fills, so treat these as planned trades and correct the exit in your journal once the position actually closes. For true fills, use the terminal route.

Troubleshooting

What you seeWhat it meansFix
error 4014 in the Experts logMT5 is blocking the connection.Tools → Options → Expert Advisors → tick Allow WebRequest for listed URL and add https://mytraderpro.com
API key rejected / HTTP 401The key is wrong, or you generated a new one and the terminal still has the old.Re-copy from Portal → Signals & Sync and paste it again. Generating a new key immediately kills the old one.
EA runs, nothing arrivesAlmost always no closed trades in the lookback window.Close a trade, or raise LookbackDays once to back-fill history.
Trades in the portal but not the journalThey're queued, waiting to be pulled.Open Signals & Sync and press Pull waiting trades. The portal also pulls automatically while it's open.
Landed on the wrong accountTrades route to the portal account bound to that broker login — the first import binds it, and unknown logins get their own account created automatically.Check the 🔗 chip on each account (Accounts tab). Bound to the wrong one? Unlink it there, make the right account active, and the next import re-binds. Already-logged trades can simply be edited.
Deleted an account but its old trades came backOn restart the terminal replays its history window.It shouldn't any more: deleting an account (or a full reset) sets a sync floor — replayed trades older than the deletion are refused. You never need a new key for this; the key identifies you, not a journal.
Demo and live trades mixingThey can't, as of v2.33 — each broker login routes to its own bound account.Switch terminals freely. A login the portal has never seen files into a new account named after it, never into one that belongs to a different login.
Position size or P&L looks wrongThe instrument's point value isn't set for your broker's contract.Settings → Instrument Specs → correct the point value. Auto-added instruments are flagged for exactly this.
No stop on imported tradesYou traded without a stop, or your broker didn't report one.We insert a 0.5% placeholder so the maths still runs. Edit it to the real level — or take the hint.
Smiley face missing in MT5Algo trading is off.Click the Algo Trading button in the toolbar so it turns green.
Terminal says up to date but the journal is missing tradesThe terminal already sent them, so it won't send them again on its own.Signals & Sync → Re-pull full history. That recovers anything still held on the server and tells your terminal to replay its entire lookback. Duplicates are skipped, so nothing doubles.
Times look wrong on the Signals & Sync tilesYour trading timezone isn't set, so the portal is using your device's.Settings → Timezone. Every stamp, journal date and daily-P&L bucket follows it. Session labels stay anchored to New York on purpose — a session is a market fact, not a local one.
Double-clicking the TradeLocker script flashes and closesDouble-clicking runs a .py file; the window shuts the instant it ends.Right-click → Open with → Notepad to edit it. The script now also waits for a keypress before closing, so you can read any error.

Recovering trades that never arrived

If your journal is missing trades your terminal believes it already sent, one button fixes it: Signals & Sync → Re-pull full history.

It does two things in order. First it re-reads anything still held on the server — every claimed trade is retained for seven days precisely so a browser crash or a closed tab never costs you a record. Then it asks your terminal to forget what it thinks it has sent and replay the whole lookback window.

Nothing doubles. Trades are matched on the broker's own ticket number, so replaying the same history simply finds them already present and skips them. Run it as often as you like.

Your terminal must be running with the EA attached when you press it — the replay comes from MetaTrader, not from us. It normally lands within a minute. If you are on a build of the EA older than 2.30, either update it from the portal or simply remove the EA from the chart and drag it back on, which forces the same full replay.

Security — what your key can and cannot do

Your broker password is never involved. Auto-Sync only ever pushes finished trades out of your terminal. Nothing connects to your broker on your behalf, and nothing can place, modify or close an order.

Your API key is deliberately weak on purpose. It can do exactly one thing:

  • Add trades to your own journal. That's the whole permission.
  • ❌ It cannot read your journal, your stats, your accounts or your settings.
  • ❌ It cannot reach any other member's data, whatever it claims in the payload.
  • ❌ It cannot change your subscription, your password or your account.

If a key ever leaks, the worst anyone can do is post junk trades into your journal, which you can delete. Rotate it in one click: Signals & Sync → New key, which instantly kills the old one. Revoke switches Auto-Sync off entirely.

Treat the key like a door key, not a bank card: don't paste it into screenshots, public Discord channels or shared repos.

Frequently asked

Does my computer have to stay on?
Your terminal has to be running for it to notice a trade close — that's true of any terminal-side tool. But your browser doesn't: trades queue on our servers and land in your journal next time you open the portal. Many members run MT5 on a broker VPS, which keeps Auto-Sync running around the clock.
Will it import my trade history?
Yes. Raise LookbackDays on the first run — set it to 365 to pull a year — then lower it again once you're caught up. For a one-off bulk import you can also export your history from MT5 and drop the file straight into the journal; both routes de-duplicate against each other.
What about open positions?
Auto-Sync logs trades when they close, so your journal reflects finished, scoreable trades. If you want an open position in the journal now, log it manually without an exit and fill the exit in later — or send it via the webhook without an exit field.
Does this work with my prop firm?
If your firm gives you MetaTrader — which nearly all of them do — yes, because the EA runs inside your own terminal and doesn't ask the firm for anything. Firms on cTrader, DXtrade or Match-Trader work through the webhook route. No firm has to approve anything, and nothing about it breaches evaluation rules: it reads your own trade history, it doesn't trade.
Can I use one key on several terminals?
Yes. The key identifies you, not a machine. Run it on your desktop, your laptop and your VPS at once — duplicate trades collapse automatically. Use AccountLabel to tell them apart in your notes.
Is there a limit?
Up to 200 trades per request and 500 waiting in the queue at a time — far beyond any realistic trading day. Pull them into your journal and the queue empties.
Something isn't covered here.
Email us with your platform and what you're trying to connect. If it can send a web request we can almost certainly make it work, and if enough members use the same platform we'll build a first-class integration for it.

My Trader Pro — Auto-Sync Manual · Last updated August 2026 · Open the portal · Legal
Auto-Sync records trades you have already made. It does not place trades, give advice, or guarantee any result.