MetaTrader 5 keeps a full record of every trade you take — but getting that record into a journal usually means exporting reports and retyping fills by hand. SniperJournal skips all of that. Its MetaTrader agent reads your closed-trade history straight from the terminal and files it in your journal for you.
This guide sets it up in thirteen short steps, each with its screen: create a connection, install the agent in MT5, and start it. We'll use the auto-sync agent — a small Expert Advisor that sends each trade the moment you close it — and it's read-only from start to finish: it never sees your password and never places a single order. Prefer to watch? There's a full video walkthrough at the end.
What the agent does (and what it never touches)
The agent does one job: it reads the closed trades already sitting in your MT5 terminal and sends them to the SniperJournal portfolio you connect. The auto-sync version keeps going after that — every time you close a position, it forwards that one trade automatically.
Just as important is what it never does. It's read-only: it never places or modifies an order, and it never sees your broker password. It sends your login number, server, broker name, account currency and the raw buy/sell deals — never your password, your name or your balance.
Because it reads your terminal's local history rather than the broker's API, it works with essentially any MetaTrader 5 desktop terminal — including brokers that offer no API at all. We've run it live on MetaQuotes and IC Markets accounts, among others.
What you'll need
- The desktop MetaTrader 5 terminal, on your computer or on a Windows VPS — Windows, or macOS/Linux through Wine. The web and mobile terminals can't run scripts or Expert Advisors.
- A SniperJournal account (free) with a portfolio in the same currency as your MT5 account — USD, EUR, GBP, JPY, AUD, CAD, CHF, NZD, SEK, ZAR, INR or USDT (Exness cent accounts are USC; Bybit MT5 accounts are USDT, 1:1 with the USD). A portfolio with no trades or starting balance yet takes the account's currency on the first sync, so a fresh one just works. If your portfolio already holds trades in another currency, create a new portfolio in the account's currency and connect to that one.
- About five minutes.
On a Mac, MetaTrader runs inside a Wine wrapper (the broker's Mac app is just MT5 packaged with Wine, or you use Parallels/CrossOver). The same file works — the agent is terminal bytecode, not a macOS app. Two things to know on a Mac:
- Where the Experts folder is. With the standard MetaQuotes install, open Finder, press Cmd+Shift+G and paste ~/Library/Application Support/net.metaquotes.wine.metatrader5/drive_c/Program Files/MetaTrader 5/MQL5/Experts. Broker installs and CrossOver use a different path: then use File → Open Data Folder inside MetaTrader, which opens a Wine file window rather than Finder — in it, drive Z: is your Mac, so go to Z: → your Downloads, right-click the file → Copy, open MQL5 → Experts, right-click → Paste.
- Everything else is identical — the URL to allow, dragging the agent onto a chart, the live check in SniperJournal.
Setup, step by step
Thirteen steps take you from the panel in SniperJournal to a terminal that syncs on its own. Each step has its screen right below it.
- In SniperJournal, open Settings → Connections, click Connect account and pick MetaTrader 5 from the list (the + button in the header gets you there too).
- Choose the portfolio your trades should land in — its currency has to match your MT5 account — add an optional label and click Create connection.
- SniperJournal opens the install panel for your new connection. There's no token to copy: each connection gets its own agent, and the panel shows the URL you'll allow in step 9.
- Click Download the agent. It's a single file whose name starts with SniperJournalAgent and ends with your portfolio's name (for example SniperJournalAgent-Main-Portfolio.ex5), nothing to unzip, and it lands in your browser's Downloads folder. It belongs to this connection: don't share it.
- In MetaTrader 5, open File → Open Data Folder (or press Ctrl+Shift+D). This opens the terminal's own data folder on disk — not the program folder.
- In that window, open MQL5, then Experts. The terminal's own folders (Advisors, Examples, Free Robots) live there — that's the right place.
- Copy the agent file (SniperJournalAgent-….ex5) from Downloads and paste it into Experts — just that one file, directly in Experts, no subfolder, nothing to compile. Use copy and paste: dragging the file onto the MetaTrader window doesn't always work.
On a Mac, Experts is the folder from the Mac notes above (Finder → Go to Folder, or the Wine window that Open Data Folder opens); the file goes in the same way.
- Back in MetaTrader, in the Navigator panel on the left (Ctrl+N if it's hidden), right-click Expert Advisors and choose Refresh — or just restart the terminal. The agent (SniperJournalAgent-…) appears in the list, ready to use.
- Open Tools → Options (Ctrl+O) and go to the Expert Advisors tab. Tick "Allow WebRequest for listed URL", double-click the empty "add new URL…" line, type exactly https://api.sniperjournal.io, press Enter so it lands in the list, and click OK. "Allow algorithmic trading" can stay off — the agent never trades, it only reads and sends.
- In the Navigator, under Expert Advisors, drag the agent onto any chart of the account you want to sync — any symbol, any timeframe. Each chart holds one agent: if you connect a second account in the same MetaTrader, put its agent on another chart.
- A window pops up with the agent's details and the line "Nothing to configure: just click OK". Click OK: there's nothing to fill in. On its first start the agent activates itself with SniperJournal. If you skipped step 9, it tells you in a window and connects by itself as soon as you allow the URL.
- Check the chart: the agent draws a small status line along the top. Backend OK means it reached SniperJournal, queue 0 means nothing is stuck waiting, and backfill OK means your full history has already been sent (it does that once, on its first start, and nothing is ever duplicated).
- Check SniperJournal: the connection panel switches on its own from Waiting for your MetaTrader… to Connected, with your account and how many trades came in, and under Settings → Connections the MetaTrader card shows Active with the time of the last heartbeat. Your MT5 history is now in the portfolio you connected.
From here on, every position you close is forwarded on its own: the Experts tab prints "position <id> -> imported 1" each time.
Keeping the sync alive
Leave the terminal open and the agent does the rest. If the server is unreachable the moment you close a trade, the agent stores it in a local queue (the MQL5 → Files → SniperJournal folder) and retries by itself — even after you restart the terminal. Nothing is lost to a brief disconnect.
The agent sends a heartbeat every few minutes, which is what keeps the card on Active. Close the terminal for a while and the card goes stale — that's just "haven't heard from it lately," not lost data; it catches up when you reopen.
One note for hedging accounts: to close part of a position, use Toolbox → Trade → right-click → Modify or Delete → "Close Position" → Volume. The SELL/BUY buttons on the chart open brand-new positions instead.
Running it 24/7 without your PC
You don't have to keep your own computer on. MetaTrader 5 and the agent run just as well on any Windows VPS — the kind forex traders rent to keep their terminals online. Install the terminal there, log in to your account and install your agent. Each agent activates on one MetaTrader only: if yours already runs on your PC, download a new agent for the VPS from the connection card (the one on your PC then stops sending). The agent keeps syncing for as long as the VPS is on, and the card in SniperJournal stays Active.
One caveat about MetaQuotes' own MetaTrader VPS (the one offered inside the terminal): we haven't confirmed that it lets the agent reach SniperJournal. If you migrate there, check that the status panel on the chart says Backend OK. If it reads "Backend URL NOT ALLOWED" or never connects, use a regular Windows VPS instead.
Just want a one-time import?
If you'd rather not leave MetaTrader running, you don't need the agent: export your history from MetaTrader 5 (History tab → right-click → Report) and import that file in SniperJournal. It's a snapshot, so you repeat it whenever you want to update.
For MT5, though, the auto-sync agent is the better default: it sends your full history on its first start and then keeps your journal current without you thinking about it.
If something fails
Almost everything shows up in the Experts tab. The most common cases:
- "URL not allowed" / error 4014 — the WebRequest URL isn't set (the agent's panel says "Backend URL NOT ALLOWED"). Add it exactly as in step 9 and save with OK: the agent connects by itself within seconds, no need to re-attach it.
- "This agent was replaced" (HTTP 401) — a newer agent took its place or the connection was deleted. Use the agent you downloaded most recently, or download a new one from the connection card.
- "This agent file was already used on another MetaTrader" — each agent activates once. For a new PC or a VPS, download a new agent from the connection card.
- HTTP 409 — the connection belongs to another MT5 account, the account is already linked to another portfolio, or the account currency doesn't match the portfolio (Exness cent accounts are USC). For the currency case, the connection card in Settings → Connections names both currencies and the fix: create a portfolio in your account's currency, connect MetaTrader to it, and delete the old connection.
- HTTP 422 — the request was rejected; download the latest version from SniperJournal (Settings → Connections).
- "Could not reach the server (code 1001)" — the terminal couldn't reach the host. Check the URL, the Allow WebRequest list, and your internet.
- "position <id> will retry (code -1)" — the server didn't answer that moment; the agent keeps it queued and retries on its own. Nothing to do.
The full error table lives in the in-app guide, under Settings → Connections ("Install the agent").
Watch the full setup
That's it. Once the agent is running, your MetaTrader 5 trades log themselves — no CSV exports, no manual entry — and SniperJournal turns that history into your calendar, tags, win rate and the rest. Trading on MetaTrader 4 too? It works a little differently, and we cover it in its own guide.