TradingView to MT5: send alerts to your own MT5 — no EA, no VPS

TradingView can send an alert to a web address (a webhook), but MetaTrader 5 has no address that can receive one. Valuera fills that gap: it hosts an isolated MT5 slot for your account, checks every order against its gate — a set of rules an order must pass before it reaches the market — and executes on the MT5 account you already own, at your own broker. There is no Expert Advisor to install and no Windows VPS to rent.

How to connect TradingView to MT5 with Valuera (step by step)

You need three things: an active MT5 account with your broker, the TradingView alerts you already use, and a Valuera subscription. The steps below follow the Valuera webhook API documentation.

  1. Connect your MT5 account, starting with a demo account. In the Valuera console, add the account with its trading credentials and the broker server name, exactly as shown on the MT5 login screen. Valuera hosts the terminal for that account in its own slot. Setup is identical for demo and live accounts.
  2. Create the webhook endpoint in the panel. Copy two values: the TradingView URL, which looks like https://valuera.cloud/tv/{id}, and the fixed request_id shown next to it. The request_id is a stable identifier that Valuera assigns to that endpoint.
  3. In TradingView, open the alert, go to Notifications and paste the URL into the Webhook URL field. The authentication token is added on the Valuera side, so TradingView needs no custom headers.
  4. Paste a compact JSON message into the alert's Message box (about 4,096 characters at most), with your endpoint id and the panel's request_id. Never change request_id between alerts: it identifies the endpoint. A ready-made example is in the next section.
  5. Link the source to your MT5 account in the console. An unlinked connector receives the message but opens no trade: for an OPEN with no account routing enabled, the API answers 409 no-dispatch.
  6. Test with the PING action. PING checks the connection and authentication and opens no trade. When PING works, try a real OPEN on your demo account before you move to a live one.

TradingView alert message example (JSON)

Every message is a small JSON object that the docs call the envelope: it always carries id, request_id and action, followed by the fields that action needs. Here is an OPEN that buys gold with a stop loss and two take-profit levels. {{close}} is a TradingView placeholder: when the alert fires, TradingView replaces it with the close price of the bar.

{"id":"YOUR_ENDPOINT_KEY","request_id":"YOUR_STABLE_REQUEST_ID","action":"OPEN","symbol":"XAUUSD","side":"BUY","entry":{{close}},"sl":2640,"tp":[2660,2670]}

Replace YOUR_ENDPOINT_KEY with the {id} part of your webhook URL, and YOUR_STABLE_REQUEST_ID with the request_id from the panel. The id in the message must match the id in the URL. To close every open position on a symbol, send CLOSE_SYMBOL:

{"id":"YOUR_ENDPOINT_KEY","request_id":"YOUR_STABLE_REQUEST_ID","action":"CLOSE_SYMBOL","symbol":"XAUUSD"}

To check the connection without trading, send PING. A successful reply reports "ping": true and "dispatched": 0:

{"id":"YOUR_ENDPOINT_KEY","request_id":"YOUR_STABLE_REQUEST_ID","action":"PING"}

These are the fields of an OPEN message, as documented:

FieldRequired for OPENWhat it means
idYesEndpoint key. Must match the {id} in the URL.
request_idYesStable ID assigned by Valuera to the endpoint, shown in the panel.
actionYesWhat to do: OPEN, CLOSE_SYMBOL, PING and the other documented actions.
symbolYesMT5 symbol, for example XAUUSD.
sideYesBUY or SELL.
entryYesEntry price: a number, a {min,max} range or a [lo,hi] array.
slYesStop loss.
tpYesTake profit: a number or an array of numbers.
order_typeNomarket, limit or stop. Default: market.
market_priceNoMarket price used to resolve an entry zone.
pip_sizeNoOverrides the pip size for the symbol.

Lot size is not part of the message. Volume is never sent nor copied: the lot size is decided by the strategy of the receiving account, which you configure in Valuera. With order_type limit or stop, Valuera places a real pending order on your account instead of converting it to a market order. Use entry for the price: the alias entry_price is rejected.

Frequently asked questions

Can TradingView send alerts directly to MT5?

No. A TradingView alert can call a webhook URL, but MT5 has no web address that can receive it. You need a hosted endpoint in between. With Valuera, that endpoint is your /tv/ URL, and the order is executed on your own MT5 account at your broker.

Do I need an Expert Advisor or a VPS?

No. Valuera hosts the MT5 terminal for your account in an isolated instance slot. There is no Expert Advisor to install and no Windows VPS to rent.

Which brokers work?

Any broker that offers MetaTrader 5 accounts. You choose the broker, open the account and connect it with its trading credentials. We always recommend regulated brokers in reliable jurisdictions.

Can Valuera withdraw my funds?

No. Valuera works with MT5 trading credentials, which can open and close positions but cannot make withdrawals, wire transfers or capital movements. Your funds stay in your account at your broker.

What happens if an alert has no stop loss or is malformed?

It is rejected and logged with the reason, and it never reaches the market. The gate blocks any OPEN without a stop loss. A message with missing or wrong fields gets an error code such as missing-open-fields or id-mismatch.

Can an alert close or modify a position?

Yes, with the actions listed in the webhook docs: CLOSE_SYMBOL closes all open positions on a symbol, CLOSE_TICKET closes the position opened by a specific earlier OPEN, MOVE_SL_BE moves the stop loss to break-even, MODIFY updates stop loss and take profit together, and PARTIALS closes a percentage of a position.

Can I test on a demo account first?

Yes, and we recommend it. Connect a demo MT5 account first, check for a few weeks that the alert, validation and order flow behaves as you expect, then move to a live account. Setup is identical in both cases.

Do I put the lot size in the alert?

No. Volume is never sent in the message. The lot size is decided by the strategy of the receiving account, which you set in Valuera.

Why TradingView can't reach MT5 on its own

A TradingView webhook is a message sent to a web address at the moment an alert fires. Something must be listening at that address to receive it. MT5 is a trading terminal that connects to your broker; it does not offer an address that TradingView can call. That is why the traditional route asks you to rent a Windows VPS, keep MT5 running on it and install an Expert Advisor (EA) or a bridge that receives the alert and places the order.

Valuera replaces that stack with a hosted MT5 instance slot. The alert goes to your Valuera endpoint, passes the gate and is sent to the terminal that runs your account.

Traditional route: your VPS + EAValuera
Where MT5 runsOn a Windows VPS you rent and maintainOn an isolated instance slot that Valuera hosts
What you installAn Expert Advisor or a bridge on the terminalNothing: no EA to download
Where the alert goesA receiver you set up yourselfYour endpoint: https://valuera.cloud/tv/{id}
Order without a stop lossDepends on how the EA is writtenRejected and logged with the reason
Record of decisionsWhatever your setup logsPanel actions and routing decisions kept for 730 days
Your fundsAt your brokerAt your broker; the credentials cannot withdraw

To be clear about what Valuera is not: it is not a broker, not a signal vendor, not a strategy marketplace and not a hosted Pine runtime. It does not give investment advice and does not custody funds. It is the software between the alerts you already have and the MT5 account you already own. The full pipeline is explained in how Valuera works.

What the gate blocks — and what gets logged

The gate is the set of checks every order must pass before Valuera sends it to your MT5 account. It is the same gate on every source: TradingView, Telegram and custom webhooks.

Failures are visible, not silent: what fails the gate does not reach the market, and the log shows what was blocked and why. Risk rules stay yours: you choose the source, the broker and the risk settings.

Troubleshooting: common webhook errors

If an alert does not open a trade, the error code tells you which part to fix. These are the most common codes from the webhook docs:

ErrorWhat it meansHow to fix it
400 id-mismatchThe id in the message is not the {id} in the URL.Copy the id from your webhook URL into the message.
400 request-id-mismatchThe request_id is not the one assigned to this endpoint.Paste the request_id from the panel again and never edit it.
400 missing-open-fieldsAn OPEN is missing entry, sl or tp.Add all three fields, for example entry as {{close}}.
404 endpoint-not-foundThe endpoint is disabled or does not exist.Check that the endpoint is enabled and the URL is complete.
429 rate-limitedToo many requests from the same IP or endpoint.Make the alert fire less often, then try again.
409 no-dispatchThe message is valid, but no account routing is enabled for OPEN.Link the webhook source to your MT5 account in the console.

Two more codes to know: invalid-side means side is not BUY or SELL, and missing-symbol means the symbol is missing or empty. The complete list is in the webhook API docs.

Security: your account, your broker

Read the full security model, the answers in the FAQ and the plans on the pricing page. For the alert side, the guide on how to structure a TradingView webhook payload goes deeper.

Related guides

Loading