Getting started
1. Install MetaSync
- Download the installer from the download section.
- Run
MetaSync_Setup.exeand follow the steps. A desktop shortcut is created by default. - Launch MetaSync from the desktop or Start menu.
2. Activate your license
Enter the license key from your welcome email when prompted. Each license is bound to your computer's hardware ID on first activation.
3. Connect your MT5 account
- Open MetaTrader 5 and make sure you're logged in with Algo Trading enabled.
- In MetaSync, go to Settings → Add Account.
- Enter your MT5 login, password, broker server name and terminal path (usually
C:\Program Files\MetaTrader 5\terminal64.exe). - Click Test Connection, then save.
Your credentials are stored only on your computer and are never sent to MetaSync's servers.
4. Start the server & copy your webhook
- Click ▶ Start Server in the top-right of the app.
- Your personal webhook URL appears on the Dashboard, in the form
https://api.metasync.trade/webhook/<your-id>. - Click Copy — you'll paste this into TradingView next.
TradingView alerts
- On your TradingView chart, create an alert (from your strategy or indicator condition).
- In the alert's Notifications tab, enable Webhook URL and paste your MetaSync URL.
- In the Message box, paste the JSON from MetaSync's JSON Generator tab.
- Save the alert. Keep MetaSync running — when the alert fires, the order is placed in MT5.
Alert syntax
MetaSync reads a JSON message from each alert. Only action is required — any field you leave out uses the defaults from Settings.
{
"action": "buy",
"symbol": "XAUUSD",
"lot_size": 0.10,
"sl_percent": 1.0,
"tp_percent": 2.0,
"expiry_hours": 2,
"sl_mode": "hybrid",
"trailing_trigger": 0.6,
"secret": "YOUR_SECRET"
}
Actions
| Action | What it does |
|---|---|
buy | Opens a market buy order on symbol. |
sell | Opens a market sell order on symbol. |
close | Closes all open positions on symbol. |
close_all | Closes every open position on all connected accounts. |
Fields
| Field | Description |
|---|---|
symbol | Instrument, e.g. EURUSD. Required for buy, sell and close. |
lot_size | Trade volume in lots. |
sl_percent | Stop-loss distance as a % of the entry price. |
tp_percent | Take-profit distance as a % of the entry price. |
expiry_hours | Auto-close the trade after this many hours if SL/TP hasn't been hit. |
sl_mode | none, breakeven, trail or hybrid. Default: none. |
trailing_trigger | Breakeven/hybrid trigger as a fraction of the TP distance. 0.6 = when 60% of the way to TP. Default: 0.6. |
trail_step | Trail/hybrid: how far price must move (in %) before the SL is moved again. Default: 3.0. |
trail_distance | Trail/hybrid: how far the SL moves each step, as a % of entry. Default: 2.0. |
secret | Must match the webhook secret in Settings, if you've set one. |
Example exit alert:
{ "action": "close", "symbol": "XAUUSD" }
Tip: use the built-in JSON Generator tab to build valid messages without typing them by hand.
Stop-loss modes
| Mode | Behaviour |
|---|---|
none | Fixed SL and TP. Only the expiry timer applies. |
breakeven | Moves the SL to the entry price once profit reaches trailing_trigger × the TP distance. |
trail | Each time price advances trail_step%, the SL moves up by trail_distance% of entry. It never moves backwards. |
hybrid | Breakeven first; once that triggers, trailing takes over. |
Trailing example — buy at 100, initial SL 95, trail_step 3, trail_distance 2:
price 103 (+3%) → SL 95 → 97
price 106 (+3%) → SL 97 → 99
price 102 (drop) → SL stays 99
price 109 (+3%) → SL 99 → 101
MetaSync saves the trades it's managing, so these rules resume automatically if the app or your PC restarts.
Accounts & settings
Multiple MT5 accounts
Add as many accounts as you like under Settings → Add Account. Every alert is executed on all active accounts in parallel. Per account you can set:
- Lot multiplier — scales the alert's lot size, e.g.
0.5for half size. - Symbol mapping — translates TradingView symbols to your broker's names, e.g.
XAUUSD:XAUUSDm, US30:DJ30.
The Basic plan executes on one account.
Webhook secret
Optional. If you set a secret in Settings, alerts must include a matching "secret" field or they're rejected.
Trade defaults
Default lot size, SL %, TP % and expiry hours are used whenever an alert doesn't specify its own value.
Troubleshooting
MT5 connection fails
- Make sure MetaTrader 5 is open, logged in, and Algo Trading is enabled.
- Check the terminal path points to
terminal64.exe. - Double-check your login, password and exact server name.
Alerts aren't arriving
- Confirm the server is started (green status in the app).
- Copy the webhook URL exactly, including
https://. - Check that your TradingView plan supports webhooks.
- If you've set a webhook secret, make sure the alert includes it.
MetaSync disappeared after a restart
Some antivirus tools, including Windows Defender, can mistakenly quarantine new apps. Open Windows Security → Virus & threat protection → Protection history and restore MetaSync. Then add an exclusion for C:\Program Files\MetaSync under Manage settings → Exclusions.
Still stuck?
Submit a support ticket and include your MetaSync version, broker and any error message.