TradeLinqr/Bridge
Start free

Quick start

Ten minutes end to end, once per terminal.

  1. Create a license. Licenses → New license, label it something like "XAUUSD sweep model", and copy the License ID and the webhook URL.
  2. Install the connector. File → Open Data Folder → MQL5 → Experts (or MQL4 → Experts), copy Connector.ex5 or Connector.ex4 in, restart MetaTrader.
  3. Allow the URL. Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL, add https://api.tradelinqr.com, press OK.
  4. 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.
  5. Check the chart panel. Connected, license valid, account bound. If it is not bound yet, bind it under Accounts.
  6. Create the alert. Webhook URL under Notifications, message in the Message box. Build the message on the syntax builder.
  7. 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

FilePlatformVersionSHA-256
Connector.ex5MetaTrader 5, build 3800+1.0.0on the download page
Connector.ex4MetaTrader 4, build 1350+1.0.0on 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.

ParameterMeaningNeeds a stop
vol_lotsExact lot size, validated against minimum, maximum and stepNo
vol_dollarSize so that hitting the stop loses roughly this much cashYes
vol_pct_bal_lossSize so that hitting the stop loses this percent of balanceYes
vol_pct_eq_lossThe same, measured on equity including floating profitYes
vol_pct_bal_marginSize so required margin equals this percent of balanceNo
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_pipsDistance in pips, where one pip is ten points on every instrument
sl_price / tp_priceAbsolute price level
sl_pct / tp_pctPercent 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_priceAbsolute price for the pending order
entry_pipsDistance in pips from the current market price
entry_pctPercent 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

betriggerProfit in pips that arms it. Required together with beoffset.
beoffsetPips of profit locked. Zero is the exact entry. Must be less than betrigger.

Pip trailing

trailtrigPips of profit before it arms. Zero or negative arms immediately.
traildistPips maintained behind price.
trailstepFurther pips of movement before the stop moves again.

All three are required together.

ATR trailing

atrtimeframeMinutes. Required. MT4 accepts 1, 5, 15, 30, 60, 240, 1440; MT5 accepts any.
atrperiodATR period. Required.
atrmultiplierMultiplier applied to ATR. Default 1.
atrshiftBars of shift. Default 0.
atrtriggerProfit 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

spreadExecute only if current spread is at or below this many pips.
accfilterExecute only if the account metric chosen in settings is at or above this value.
secretShared secret. Required when signal authentication is on for that license.
commentOrder comment, 20 characters maximum. Becomes the strategy tag in analytics.

Command reference

Market entries

CommandAliasesRequires
buylong, bull, bullishOne volume parameter
sellshort, bear, bearishOne volume parameter

Pending entries

CommandPlacedRequires
buystopAbove marketVolume and one entry parameter
buylimitBelow marketVolume and one entry parameter
sellstopBelow marketVolume and one entry parameter
selllimitAbove marketVolume and one entry parameter

Closing and cancelling

closelongClose every long on that symbol
closeshortClose every short on that symbol
closelongshortClose both sides on that symbol
closeallClose everything this instance owns. Third field must be the chart symbol.
cancellongCancel long pending orders only
cancelshortCancel short pending orders only

Partial closing

closelongpctClose the percentage set in settings — 10, 20, 25, 34 or 50
closeshortpctThe same for shorts
closelongvolClose a specific lot volume given by risk=, oldest position first
closeshortvolThe 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 / newsltpshortNew 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 / newsltpbuylimitNew stop and target on long pendings, from the pending entry price
newsltpsellstop / newsltpselllimitThe same for short pendings

Macros

closelongopenlongClose longs, open a new long
closelongopenshortClose longs, open a short
closeshortopenlongClose shorts, open a long
closeshortopenshortClose shorts, open a new short
closelongshortopenlongClose both sides, open a long
closelongshortopenshortClose both sides, open a short
cancellongbuystopCancel long pendings, place a buy stop
cancellongbuylimitCancel long pendings, place a buy limit
cancelshortsellstopCancel short pendings, place a sell stop
cancelshortselllimitCancel short pendings, place a sell limit

Connector control

eaoffStop trading. Third field repeats the command: LicenseID,eaoff,eaoff
eaonResume trading, including after a persistent halt
closealleaoffClose 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

SettingWhat it controls
LicenseIDYour license. Nothing runs until this is set and the account is bound.
ServerURLDefault https://api.tradelinqr.com. Change only if support asks.
PollIntervalMsHow often the terminal asks for signals. The server can override it and back off idle terminals.
TargetTypeHow legacy sl and tp are read: pips, price or percent.
VolumeTypeHow legacy risk is read: lots, cash, percent of balance as lots or margin, percent of balance or equity loss.
PendingEntryTypeHow legacy pending is read: pips from market, exact price or percent.
ParameterSourceSignal only, connector only, stops from one and risk from the other.
PyramidingOn; 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.
CloseOnReverseHedging: close opposite then open. Netting: close opposite and stop. Or off.
ShadowTargetsSends 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.
PartialClosePercent10, 20, 25, 34 or 50.
MaxOpenPositionsZero is unlimited. Market orders only.
MaxPositionsPerSymbol / MaxUniqueSymbolsCaps concentration in one instrument and across instruments.
DailyPnLTimezoneGMT offset −12 to +14, setting the daily reset boundary.
DailyProfitTarget / DailyLossLimit1 or below is a fraction of the day's opening balance, above 1 is cash, 0 is off.
DailyActionHalt for the day, close everything, or close everything and halt.
CumulativeProfitTarget / CumulativeLossLimitAgainst the tracked starting balance, ignoring deposits and withdrawals.
CumulativeActionHalt for the day, halt persistently, close all, or close all with either halt.
ShowDashboard / FontSize / ProfitComputationThe on-chart panel, and whether profit includes commission, swap and tax.
MagicNumberDefault 76. Give each strategy instance its own.
MagicRestrictionOn: only its own trades. Off: every trade on that symbol including manual ones — affects closing, modification, pyramiding counts, reversal and all limits.
BrokerSetAutomatic, or A / B / C for unusual filling modes.
ActiveHoursStart and end HH:MM in broker server time. Wrapping past midnight is supported.
SymbolPrefix / SymbolSuffixYour broker's naming, for example .m or pro.
AutoUpdateChecks for a newer signed build on start and prompts to restart.
ShareAnalyticsOptional upload of closed trades so the portal can compute statistics.
VerboseLoggingFull 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:

  1. The raw symbol exactly as written.
  2. The raw symbol with your configured prefix and suffix.
  3. 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.
InstrumentDigits1 point1 pipsl_pips=45 moves
EURUSD50.000010.00010.0045
USDJPY30.0010.010.45
XAUUSD20.010.104.50
XAUUSD30.0010.010.45
US3010.11.045 pts
BTCUSD20.010.104.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

CodeMeaningWhat to do
4060 / 4014 / 5203WebRequest not permittedWhitelist the URL. The most common cause of "nothing happened".
130 / 10016Invalid stopsYour stop or target is inside the minimum stop distance. Widen it, or use pips instead of a price.
131 / 10014Invalid volumeLots below minimum, above maximum, or off the step. Check the sizing parameters.
132 / 10018Market closedNothing to fix. Check the instrument's session.
133 / 10017Trading disabledEnable AutoTrading; check whether the account is read-only or closing-only.
134 / 10019Not enough moneyFree margin too low for the requested size. Reduce risk or close positions.
136 / 10021Off quotesRetried three times with backoff. Persistent cases mean an illiquid symbol or a bad feed.
138 / 10004RequoteRetried automatically. Frequent requotes usually mean a slow link to the broker.
146Trade context busyAnother EA or a manual order holds the terminal. The connector waits and retries.
10027AutoTrading disabled by clientPress the AutoTrading button in the toolbar.
10030Unsupported filling modeSet BrokerSet to B or C, or leave Automatic and send us the broker name.
4106Unknown symbolSet your prefix and suffix. The log prints the near-matches.

Troubleshooting

Nothing happens at all

  1. Is the connector smiley on the chart, and is AutoTrading on?
  2. Does the chart panel say connected? If not, the URL is not whitelisted.
  3. Does it say the account is bound? If not, bind it under Accounts.
  4. 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.
  5. Is it in the Rejected tab? The reason is printed there in full.

The signal arrived but no order was placed

  1. Read the broker return code on the ticket and match it above.
  2. Check your filters — a spread or accfilter value can legitimately block a trade.
  3. Check position limits, active hours, and whether a daily or cumulative limit has halted the connector.
  4. Check pyramiding — with it off, a second entry in the same direction is refused by design.

The lot size is not what I expected

  1. Confirm which volume parameter the message actually carried; the parsed view shows it.
  2. Confirm the pip distance against the pip table for your broker's digits.
  3. 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.