Quick start
Ten minutes end to end, once per terminal.
- Create a license. Licenses → New license, label it something like "XAUUSD sweep model", and copy
the License ID and the webhook URL.
- Install the connector. File → Open Data Folder → MQL5 → Experts (or MQL4 → Experts), copy
Connector.ex5 or Connector.ex4 in, restart MetaTrader.
- Allow the URL. Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL, add
https://api.tradelinqr.com, press OK.
- Attach to one chart. Any symbol, any timeframe — one instance handles every symbol you trade.
Paste the License ID into the LicenseID input, enable AutoTrading.
- Check the chart panel. Connected, license valid, account bound. If it is not bound yet, bind it
under Accounts.
- Create the alert. Webhook URL under Notifications, message in the Message box. Build the message
on the syntax builder.
- Send a test. Test send runs the whole pipeline in dry run and shows exactly what the connector
would have done, without placing an order.
WebRequest whitelist
If nothing happens at all, read this first
MetaTrader blocks outbound HTTP by default. Until the URL is whitelisted the connector cannot reach the
server and MetaTrader returns 4060 on MT4 or 5203 and 4014 on MT5.
Tools → Options → Expert Advisors
☑ Allow WebRequest for listed URL
+ https://api.tradelinqr.com
OK → remove and re-attach the connector
Add it exactly as shown — no trailing slash, no path, no www. On a VPS this must be done
inside the VPS terminal, not on your desktop. The connector detects these three codes and prints this
instruction on the chart in red, so you should never have to guess.
Downloads
| File | Platform | Version | SHA-256 |
| Connector.ex5 | MetaTrader 5, build 3800+ | 1.0.0 | on the download page |
| Connector.ex4 | MetaTrader 4, build 1350+ | 1.0.0 | on the download page |
Verify the hash before installing. The auto-updater checks the hash and a signature before replacing a
file and refuses on any mismatch. Sign in to download.
Message structure
LicenseID,command,SYMBOL,param=value,param=value,...
- The first three fields are fixed in that order. Everything after can appear in any order.
- Exactly one License ID, one command and one symbol per message.
- Commands never contain
=. Parameters always do.
- Spaces around commas are stripped. Commands and aliases are case-insensitive.
- Two parameters setting the same thing reject the whole signal with a reason. We never guess.
- Explicit parameters beat legacy parameters, which beat connector defaults.
Volume
Exactly one volume parameter is required on every command that opens a position.
| Parameter | Meaning | Needs a stop |
| vol_lots | Exact lot size, validated against minimum, maximum and step | No |
| vol_dollar | Size so that hitting the stop loses roughly this much cash | Yes |
| vol_pct_bal_loss | Size so that hitting the stop loses this percent of balance | Yes |
| vol_pct_eq_loss | The same, measured on equity including floating profit | Yes |
| vol_pct_bal_margin | Size so required margin equals this percent of balance | No |
Worked exampleBalance 25,000 USD, vol_pct_bal_loss=0.5,
sl_pips=45 on XAUUSD. Risk budget 125.00 USD. At 45 pips the loss per lot comes from the
broker's tick value, giving about 0.27 lots after normalising to the volume step.
Stop loss and take profit
| sl_pips / tp_pips | Distance in pips, where one pip is ten points on every instrument |
| sl_price / tp_price | Absolute price level |
| sl_pct / tp_pct | Percent distance from entry — a buy stop sits at entry × (1 − pct) |
On pending orders the stop and target are computed from the pending entry price, not from the market at
the time the alert arrived, so the reward-to-risk you designed survives whatever happens before the fill.
Pending entry
| entry_price | Absolute price for the pending order |
| entry_pips | Distance in pips from the current market price |
| entry_pct | Percent away from the current market price |
Direction comes from the command, never from the sign of the value. Stop orders go on the worse side of
market, limit orders on the better side, so entry_pips=20 is twenty pips above market for a
buystop and twenty below for a buylimit.
Breakeven and trailing
Breakeven
| betrigger | Profit in pips that arms it. Required together with beoffset. |
| beoffset | Pips of profit locked. Zero is the exact entry. Must be less than betrigger. |
Pip trailing
| trailtrig | Pips of profit before it arms. Zero or negative arms immediately. |
| traildist | Pips maintained behind price. |
| trailstep | Further pips of movement before the stop moves again. |
All three are required together.
ATR trailing
| atrtimeframe | Minutes. Required. MT4 accepts 1, 5, 15, 30, 60, 240, 1440; MT5 accepts any. |
| atrperiod | ATR period. Required. |
| atrmultiplier | Multiplier applied to ATR. Default 1. |
| atrshift | Bars of shift. Default 0. |
| atrtrigger | Profit in pips before it arms. Default 0. |
ATR comes from your broker's own bars and updates on bar close, so it matches MetaTrader rather than
TradingView's feed.
Not combinablePip trailing and ATR trailing cannot run on the same signal.
Shadow targets are incompatible with breakeven and both trailing modes; the connector refuses the
combination and says so on the chart instead of silently choosing one.
Filters and metadata
| spread | Execute only if current spread is at or below this many pips. |
| accfilter | Execute only if the account metric chosen in settings is at or above this value. |
| secret | Shared secret. Required when signal authentication is on for that license. |
| comment | Order comment, 20 characters maximum. Becomes the strategy tag in analytics. |
Command reference
Market entries
| Command | Aliases | Requires |
| buy | long, bull, bullish | One volume parameter |
| sell | short, bear, bearish | One volume parameter |
Pending entries
| Command | Placed | Requires |
| buystop | Above market | Volume and one entry parameter |
| buylimit | Below market | Volume and one entry parameter |
| sellstop | Below market | Volume and one entry parameter |
| selllimit | Above market | Volume and one entry parameter |
Closing and cancelling
| closelong | Close every long on that symbol |
| closeshort | Close every short on that symbol |
| closelongshort | Close both sides on that symbol |
| closeall | Close everything this instance owns. Third field must be the chart symbol. |
| cancellong | Cancel long pending orders only |
| cancelshort | Cancel short pending orders only |
Partial closing
| closelongpct | Close the percentage set in settings — 10, 20, 25, 34 or 50 |
| closeshortpct | The same for shorts |
| closelongvol | Close a specific lot volume given by risk=, oldest position first |
| closeshortvol | The same for shorts |
Volume closes fill oldest first, then partially close the position that straddles the boundary, and close
everything if you ask for more than is open. All four accept sl=0 to move the remainder to
breakeven afterwards.
Modification
| newsltplong / newsltpshort | New stop and target on open positions. sl=0 means breakeven, valid only when the position is in profit and outside the minimum stop distance. |
| newsltpbuystop / newsltpbuylimit | New stop and target on long pendings, from the pending entry price |
| newsltpsellstop / newsltpselllimit | The same for short pendings |
Macros
| closelongopenlong | Close longs, open a new long |
| closelongopenshort | Close longs, open a short |
| closeshortopenlong | Close shorts, open a long |
| closeshortopenshort | Close shorts, open a new short |
| closelongshortopenlong | Close both sides, open a long |
| closelongshortopenshort | Close both sides, open a short |
| cancellongbuystop | Cancel long pendings, place a buy stop |
| cancellongbuylimit | Cancel long pendings, place a buy limit |
| cancelshortsellstop | Cancel short pendings, place a sell stop |
| cancelshortselllimit | Cancel short pendings, place a sell limit |
Connector control
| eaoff | Stop trading. Third field repeats the command: LicenseID,eaoff,eaoff |
| eaon | Resume trading, including after a persistent halt |
| closealleaoff | Close everything, then halt. Third field must be the chart symbol. |
Legacy syntax
| risk= | Read by the connector's Volume Type setting |
| sl= / tp= | Read by the connector's Target Type setting |
| pending= | Read by the connector's Pending Entry Type setting |
Legacy and explicit parameters must not target the same dimension in one message. Sending both
risk= and vol_lots= rejects the signal.
Connector settings reference
| Setting | What it controls |
| LicenseID | Your license. Nothing runs until this is set and the account is bound. |
| ServerURL | Default https://api.tradelinqr.com. Change only if support asks. |
| PollIntervalMs | How often the terminal asks for signals. The server can override it and back off idle terminals. |
| TargetType | How legacy sl and tp are read: pips, price or percent. |
| VolumeType | How legacy risk is read: lots, cash, percent of balance as lots or margin, percent of balance or equity loss. |
| PendingEntryType | How legacy pending is read: pips from market, exact price or percent. |
| ParameterSource | Signal only, connector only, stops from one and risk from the other. |
| Pyramiding | On; on only while that symbol and direction are collectively in profit; off with one position per symbol; off with one buy and one sell allowed. |
| CloseOnReverse | Hedging: close opposite then open. Netting: close opposite and stop. Or off. |
| ShadowTargets | Sends the broker a stop and target 100 pips beyond the real ones and enforces the true levels locally. Needs both a stop and a target. |
| PartialClosePercent | 10, 20, 25, 34 or 50. |
| MaxOpenPositions | Zero is unlimited. Market orders only. |
| MaxPositionsPerSymbol / MaxUniqueSymbols | Caps concentration in one instrument and across instruments. |
| DailyPnLTimezone | GMT offset −12 to +14, setting the daily reset boundary. |
| DailyProfitTarget / DailyLossLimit | 1 or below is a fraction of the day's opening balance, above 1 is cash, 0 is off. |
| DailyAction | Halt for the day, close everything, or close everything and halt. |
| CumulativeProfitTarget / CumulativeLossLimit | Against the tracked starting balance, ignoring deposits and withdrawals. |
| CumulativeAction | Halt for the day, halt persistently, close all, or close all with either halt. |
| ShowDashboard / FontSize / ProfitComputation | The on-chart panel, and whether profit includes commission, swap and tax. |
| MagicNumber | Default 76. Give each strategy instance its own. |
| MagicRestriction | On: only its own trades. Off: every trade on that symbol including manual ones — affects closing, modification, pyramiding counts, reversal and all limits. |
| BrokerSet | Automatic, or A / B / C for unusual filling modes. |
| ActiveHours | Start and end HH:MM in broker server time. Wrapping past midnight is supported. |
| SymbolPrefix / SymbolSuffix | Your broker's naming, for example .m or pro. |
| AutoUpdate | Checks for a newer signed build on start and prompts to restart. |
| ShareAnalytics | Optional upload of closed trades so the portal can compute statistics. |
| VerboseLogging | Full detail in the Experts tab. Turn it on before contacting support. |
Broker symbol mapping
Your alert says XAUUSD; your broker may call it XAUUSD.m,
XAUUSDpro or GOLD. Resolution order:
- The raw symbol exactly as written.
- The raw symbol with your configured prefix and suffix.
- A scan of every symbol on the server, matching case-insensitively and ignoring separators.
The result is cached for the session. If nothing matches, the signal is rejected and the log prints the
closest names it found so you can copy the right one into your settings.
What a pip means here
One pip is ten points. Always, on every instrument.It is the only definition that
stays consistent when brokers disagree about digits. Check the table against your own broker before going
live, and use the computed stop and target prices in the dashboard to confirm.
| Instrument | Digits | 1 point | 1 pip | sl_pips=45 moves |
| EURUSD | 5 | 0.00001 | 0.0001 | 0.0045 |
| USDJPY | 3 | 0.001 | 0.01 | 0.45 |
| XAUUSD | 2 | 0.01 | 0.10 | 4.50 |
| XAUUSD | 3 | 0.001 | 0.01 | 0.45 |
| US30 | 1 | 0.1 | 1.0 | 45 pts |
| BTCUSD | 2 | 0.01 | 0.10 | 4.50 |
Two gold brokers, two answersBoth XAUUSD rows are correct; they differ only
because the brokers quote different digits. If you change broker, re-check your pip distances before the
first live alert, or use sl_price to remove the ambiguity.
Broker error codes
| Code | Meaning | What to do |
| 4060 / 4014 / 5203 | WebRequest not permitted | Whitelist the URL. The most common cause of "nothing happened". |
| 130 / 10016 | Invalid stops | Your stop or target is inside the minimum stop distance. Widen it, or use pips instead of a price. |
| 131 / 10014 | Invalid volume | Lots below minimum, above maximum, or off the step. Check the sizing parameters. |
| 132 / 10018 | Market closed | Nothing to fix. Check the instrument's session. |
| 133 / 10017 | Trading disabled | Enable AutoTrading; check whether the account is read-only or closing-only. |
| 134 / 10019 | Not enough money | Free margin too low for the requested size. Reduce risk or close positions. |
| 136 / 10021 | Off quotes | Retried three times with backoff. Persistent cases mean an illiquid symbol or a bad feed. |
| 138 / 10004 | Requote | Retried automatically. Frequent requotes usually mean a slow link to the broker. |
| 146 | Trade context busy | Another EA or a manual order holds the terminal. The connector waits and retries. |
| 10027 | AutoTrading disabled by client | Press the AutoTrading button in the toolbar. |
| 10030 | Unsupported filling mode | Set BrokerSet to B or C, or leave Automatic and send us the broker name. |
| 4106 | Unknown symbol | Set your prefix and suffix. The log prints the near-matches. |
Troubleshooting
Nothing happens at all
- Is the connector smiley on the chart, and is AutoTrading on?
- Does the chart panel say connected? If not, the URL is not whitelisted.
- Does it say the account is bound? If not, bind it under Accounts.
- Does the signal appear in the portal at all? If not, TradingView never sent it — check the webhook URL
and that the alert is still active.
- Is it in the Rejected tab? The reason is printed there in full.
The signal arrived but no order was placed
- Read the broker return code on the ticket and match it above.
- Check your filters — a spread or accfilter value can legitimately block a trade.
- Check position limits, active hours, and whether a daily or cumulative limit has halted the connector.
- Check pyramiding — with it off, a second entry in the same direction is refused by design.
The lot size is not what I expected
- Confirm which volume parameter the message actually carried; the parsed view shows it.
- Confirm the pip distance against the pip table for your broker's digits.
- Remember risk-based sizing uses the stop distance, so changing the stop changes the lots.
It worked on demo and not on live
Different server, different symbol names, different filling modes, different minimum stop distances. Set
the prefix and suffix for the live server and check BrokerSet.
Still stuck? Turn on VerboseLogging, reproduce it once, and send the Experts-tab lines with your License
ID and the alert text to support@tradelinqr.com.