Skip to content
Trading Automation8 min read

TradingView webhook to MetaTrader 5: the no-code setup, step by step

How a TradingView alert becomes a real order in MetaTrader 5 without writing code: the alert message, the webhook address, the bridge, and the settings people get wrong.

Ranjit Prasad · September 18, 2026

A TradingView alert can place a trade in MetaTrader 5 on its own. No Python, no Pine Script beyond a built-in indicator, no Expert Advisor you have to write. The chain is short: TradingView fires an alert, the alert posts a small message to a web address (the webhook), a bridge tool listens at that address and tells MetaTrader 5 what to do, and MetaTrader 5 sends the order to your broker. This guide walks the chain from left to right and stops at every setting that breaks it.

Step 1: what you need before you start. A TradingView plan that allows webhook alerts (the free plan does not; the paid Essential plan and above do at the time of writing). A MetaTrader 5 account with a broker, ideally a demo account for the first weeks. A bridge: a small program or hosted service whose only job is to receive webhook messages and place MetaTrader orders. Several exist, some with free tiers, and they all work the same way: you get an address, you paste it into TradingView, and you tell the bridge which MetaTrader account to trade. Finally, a place for MetaTrader 5 and the bridge to run around the clock. That is normally a rented Windows server (a VPS) for a few dollars a month, because a laptop that sleeps is a bot that sleeps.

Step 2: write the rule the alert will fire on. The alert is only as good as the condition behind it. Write the condition as yes-or-no lines a stranger could check: market, timeframe, what must be true to buy, what must be true to sell, where the stop goes, and the position size. If the strategy is a built-in or community strategy in TradingView, the strategy itself provides the entry and exit events and you can alert on "order fills". If it is an indicator, alert on the specific crossing or condition. Either way, the alert must be set to fire once per bar close, not on every tick, or you will get several orders from one signal.

Step 3: the alert message. This is the part most tutorials skip and most bots fail on. The bridge needs to know four things: what to trade, which direction, how much, and where the stop and target are. TradingView lets you type a message with placeholders that it fills in when the alert fires, such as the ticker, the close price, and (for strategies) the order action and contracts. Each bridge documents its own message format; copy that format exactly, including the braces and quotes, and use the placeholders rather than typing a fixed price. Test the message by firing a manual alert on a demo account and reading what arrived at the bridge before you trust it with money.

Step 4: the webhook address. In the alert settings, tick "Webhook URL" and paste the address the bridge gave you. Two rules: it must start with https, and TradingView only sends to a fixed list of ports, so a home-made address on an unusual port will silently fail. If the bridge offers a test button, use it now. If TradingView shows the alert as triggered but nothing reaches the bridge, the address is wrong, the port is wrong, or the bridge is offline.

Step 5: the bridge and MetaTrader 5. Install MetaTrader 5 on the server, log in to the account, and enable automated trading in its settings (there is a button on the toolbar and a checkbox in the options; both must be on). Connect the bridge to that MetaTrader terminal, then map the TradingView symbol to the broker symbol. This is the second most common failure: TradingView calls gold XAUUSD, your broker may call it XAUUSD.m, GOLD, or XAUUSDmicro. Set the lot size, the stop, and the target in the bridge, or pass them in the message, and decide what should happen if a message arrives while a position is already open.

Step 6: the risk fences, before the first live order. A bot has no fear, so the only limits are the ones you write down. At minimum: a fixed percentage of the account per trade (one percent is the common starting point), a daily loss limit that stops trading for the day, a maximum number of trades per day, a maximum number of open positions, and a kill switch you can hit from your phone that closes everything and disables the bridge. Most bridges and MetaTrader itself have settings for some of these; the rest you enforce with the alert conditions and the position sizing in the message.

Step 7: demo for two to four weeks. Run the whole chain on a demo account and compare what the bot did with what the backtest said it should do. Check every alert that fired, every order that was placed, and every order that was not. Look for duplicates, wrong symbols, wrong sizes, orders placed at the wrong time (a common cause is the server clock or the broker time zone). When two weeks pass without a surprise, go live with the smallest size the broker allows and scale up only after the live results match the demo results.

The five settings that break most setups: the alert fires on every tick instead of on bar close; the message format does not match the bridge; the symbol in TradingView does not match the broker symbol; automated trading is switched off in MetaTrader 5 after a restart; and the server or the bridge goes to sleep. Write these five on a card next to the go-live checklist. When something stops working, it is almost always one of them.

Costs, honestly. A paid TradingView plan, a small VPS, and a bridge (free tier or a few dollars a month) is a realistic monthly budget for a single strategy. It is worth it only if the strategy has already proven itself in a backtest with enough trades and a drawdown you can live through. Automation makes a good strategy repeatable; it does not make a bad one good.

This article is the short version of chapters six to nine of From Manual Trader to Automated Trader, which include the exact alert templates, a symbol-mapping table, the risk sheet, and a go-live checklist you can print.

Let’s build what’s next.

Tell us where you want to take your business. We’ll help you get there with technology that works.