TradingView alerts to MT5. No EA, no VPS.
Paste one secret URL into a TradingView alert. When the alert fires, fxapis places the order on your MetaTrader 5 account — there is no Expert Advisor to install, no Windows server to rent, and no terminal to keep running.
- Indicators and strategies
- MT5 brokers that allow password sign-in
- Alerts logged with a reason
Webhook URL
https://api.fxapis.com/hooks/tradingview/<your secret>
Message
{
"action": "buy",
"symbol": "{{ticker}}",
"id": "{{ticker}}-{{timenow}}"
}Three steps, then it runs on its own
- 01
Connect your MT5 account
Your MT5 login, trading password and the broker's server name. We run the terminal; the password is encrypted on arrival and never shown again. - 02
Create a TradingView hook
Choose the account, a default volume and how your broker names symbols. You get a secret URL, shown once. - 03
Paste it into the alert
In TradingView's alert, tick Webhook URL, paste the URL, and put one of the messages below in the Message box.{"action":"buy","symbol":"{{ticker}}"}
Messages for indicators and strategies
JSON or a line of text — TradingView sends either, and fxapis reads both. Add volume, sl and tp to any of them, or leave them out to use the hook's defaults.
{
"action": "buy",
"symbol": "{{ticker}}",
"id": "{{ticker}}-{{timenow}}"
}{
"action": "sell",
"symbol": "{{ticker}}",
"id": "{{ticker}}-{{timenow}}"
}{
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"position": "{{strategy.market_position}}",
"prev_position": "{{strategy.prev_market_position}}",
"id": "{{strategy.order.id}}-{{timenow}}"
}{
"action": "close",
"symbol": "{{ticker}}",
"id": "{{ticker}}-close-{{timenow}}"
}buy {{ticker}} 0.10 sl=2300 tp=2400Actions: buy and sell open a market position. close (or flat) closes every open position on the symbol; close_long and close_short close one direction; close_all closes everything on the hook's accounts.
Strategies: with position set to {{strategy.market_position}}, a strategy that goes flat closes the symbol and one that flips from long to short closes and then sells. A partial exit — a sell that leaves the strategy still long — is logged and not traded, because there is no single honest way to do it on every kind of MT5 account.
A URL that is a credential, treated like one
Only from TradingView
Never traded twice
Pause without editing TradingView
The same checks as every order
One alert, many accounts
Limits
- 30 alerts a minute per hook. A strategy that fires faster is in a loop; the rest of that minute's alerts are refused, and one row records it rather than one per alert.
- Market orders. Alerts open and close at market, with optional stop loss and take profit. Pending orders are placed through the API.
- 25 hooks per workspace, each with one account or, on plans with multi-account orders, several.
- Alerts count as orders. They use the plan's monthly orders like any other order.
- Alert history is kept 30 days. The orders themselves stay in your order history.
- MetaTrader 5 only. MT4 is not supported.
TradingView to MT5, answered
Do I need an Expert Advisor, a VPS or MetaTrader running on my computer?
No. fxapis runs the MetaTrader 5 terminal for your account in our cloud. TradingView sends the alert to your fxapis URL, and we place the order on your MT5 account. Nothing of yours has to stay switched on.
Which TradingView plan do I need?
One that includes webhook alerts — TradingView's pricing page lists webhook notifications on its paid plans, not on Basic — and TradingView requires two-factor authentication on your TradingView account before it will send webhooks (TradingView help centre, About webhooks; both checked 30 September 2026).
Does it work with strategies and with indicators?
Both. An indicator or drawing alert sends a fixed action you choose, such as buy or sell. A strategy alert can send TradingView's strategy placeholders, and fxapis reads the position after each order: going flat closes the symbol, flipping from long to short closes and then opens the other side.
What stops someone else sending orders to my accounts?
The URL contains a secret of 32 random bytes that is shown once and stored only as a hash. By default a hook also refuses any alert that does not come from TradingView's published webhook addresses. You can rotate the URL at any time, which retires the old one immediately.
What happens if TradingView sends the same alert twice?
It is traded once. Put a unique "id" in the message — the templates use {{timenow}} — and a repeat of that id is recorded as a duplicate and not sent. Without an id, the same message twice within a minute is treated as one alert.
How fast is it?
fxapis answers TradingView straight away — TradingView cancels a webhook request that takes longer than three seconds, per its help centre — and sends the order right after. From our servers, an order's round trip to a London broker's trade server measured 96–110 ms. An account set to come online on demand has to connect first, which took about 9.6 seconds in our measurements; keep the account always connected when every second counts.
Which symbol names does it use?
The alert's {{ticker}}, with TradingView's exchange prefix removed (OANDA:XAUUSD becomes XAUUSD). If your broker names symbols differently, add a symbol map (XAUUSD to XAUUSD.a) or a suffix that is added to every symbol.
Can one alert trade several MT5 accounts?
Yes, on plans that include multi-account orders: a hook with several accounts sends each alert as one multi-account order, and each account reports its own result. Starter allows up to 10 accounts in one order, Scale up to 100.
How do I find out why an alert did not trade?
Alerts that reach a hook are listed in the console with what became of each — sent, refused, ignored or duplicate — and the reason in plain words, kept for 30 days. Past 30 alerts a minute, one row records the refusal and the rest of that minute's alerts are not recorded. Each order an alert placed is in your order history like any other.
Does it count towards my plan?
Yes. Orders from alerts are ordinary orders and count towards the plan's monthly orders. On paid plans, orders beyond the allowance are billed per order up to twice the allowance, then new opening orders are refused — and recorded as refused. On Free they are refused at the allowance. Closing is never refused for billing.
Sources for TradingView's rules, checked 30 September 2026: webhook notifications by plan on TradingView's pricing page; the two-factor requirement, the three-second timeout and the webhook addresses in About webhooks.
Trade your TradingView alerts on MT5 today
Connect an MT5 account, create a hook, and paste one URL into your alert.