September 28, 2026 · 10 min read

How to Connect TradingView Alerts to MT5 (Free, Step by Step)

Turn any TradingView alert into a real MT5 order in about 10 minutes — webhook, executor EA, stop loss and take-profits. No coding, no monthly fee.

How to Connect TradingView Alerts to MT5 (Free, Step by Step)

Short answer: TradingView cannot place MT5 orders by itself. You point a TradingView alert at a webhook URL, and software running inside your MetaTrader 5 terminal collects that alert and places the order. Setup is four steps — install an Expert Advisor, allow it to reach the internet, create a webhook with your trading rules, and paste the URL into a TradingView alert. About ten minutes for the first indicator, five for each one after.

How to connect TradingView alerts to MT5

  1. Install the executor EA into MQL5/Experts, restart MetaTrader 5 and drag it onto any chart, then paste your pairing code into its inputs.
  2. Allow the EA to reach the internet under Tools, Options, Expert Advisors by ticking Allow WebRequest for listed URL and adding the service address.
  3. Create a webhook and set its trading rules: order type, position size, stop loss, take-profits and what to do on an opposite signal.
  4. Create a TradingView alert, set it to Once Per Bar Close, paste the webhook URL into the Webhook URL field and the generated JSON into the Message box.
  5. Watch it in dry run until the parsed line reads correctly, then switch the webhook live on a demo account.

Each step is expanded below, including the two settings that cause most failed setups.

Why TradingView cannot trade MT5 on its own

TradingView is a charting platform. It connects to brokers it has partnered with, and MetaTrader is not one of them. What it can do is fire an HTTP request — a webhook — when an alert condition is met, containing whatever message you typed into the alert box.

So every TradingView-to-MT5 setup has the same three parts:

PartJobWho provides it
The alertFires when your indicator's condition is met, sends a message to a URLTradingView (paid plan)
The receiverAccepts the alert, reads it, decides what the order should beThe bridge service
The executorActually places the order at your brokerAn EA in your terminal, or a cloud service holding your credentials

That third row is the decision that matters most, and we will come back to it.

What you need before starting

  • A paid TradingView plan. Webhooks are not on the free tier. Any paid tier works; the higher ones only raise how many alerts you can have active at once.
  • An MT5 account. Demo is perfect for the first run, and you should use one.
  • A Windows PC or VPS that stays awake while you want trades to fire.

Step 1 — Install the executor EA

Download the executor and put it where MT5 looks for Expert Advisors: in MT5, File → Open Data Folder → MQL5 → Experts. Drop the .ex5 file in and restart the terminal.

Then drag it onto any chart. It does not matter which symbol or timeframe — the EA is not tied to the chart it sits on, it just needs somewhere to live. Paste your pairing code into its inputs, and make sure the AutoTrading button in the toolbar is green.

Step 2 — Let the EA reach the internet

MetaTrader blocks outbound requests from EAs by default. Go to Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL, and add the service's API address.

This single checkbox is the most common reason a working setup does nothing. If it is unticked, MT5 returns error 4014 on every attempt and the EA can never collect your alerts. A well-built EA will print that specific problem in the Experts tab rather than failing silently.

Step 3 — Create a webhook and set your trading rules

This is where the actual trading decisions live. Create one webhook per indicator, and set:

SettingWhat it controlsTypical choice
Order typeMarket, limit or stopMarket for most signal indicators
Position sizeFixed lots, or a % of balance riskedRisk % — it adapts as the account grows
Stop lossFixed points, an ATR multiple, or an exact priceATR multiple on volatile symbols like gold
Take-profitsUp to four, as R multiples or prices, with a close % each1R / 2R / 3R, closing 50% / 25% / 25%
BreakevenMove the stop to entry after a triggerAfter TP1
On opposite signalWhat happens when a sell arrives while a buy is openClose and reverse

The key idea: the webhook supplies what the alert leaves out

Most indicators only say "BUY" or "SELL". They have no opinion about your stop loss, and they should not — your risk is yours. So the webhook holds the risk plan, and the alert only has to provide the trigger.

That also means changing your stop rule is one edit on the webhook, instead of re-editing twenty TradingView alerts by hand. If an alert does include a stop or targets, those win over the defaults.

Step 4 — Point a TradingView alert at it

  1. Open your indicator, right-click the chart, Add alert, and choose its buy or sell condition.
  2. Set Trigger to Once Per Bar Close. This matters more than it looks — see the warning below.
  3. In the Notifications tab, tick Webhook URL and paste your webhook address.
  4. Clear the Message box and paste the JSON the builder generated. It is usually this short:
{
  "symbol": "{{ticker}}",
  "action": "buy"
}

Those double braces are TradingView placeholders — it substitutes the real values when the alert fires. You create a separate alert for sells, with "action": "sell".

Once Per Bar vs Once Per Bar Close

"Once Per Bar" fires the moment the condition becomes true, mid-candle. Many indicators are still recalculating at that point, and a condition that is true mid-candle can be false by the time the candle closes — a repaint. You get a trade for a signal that, in hindsight, never existed.

"Once Per Bar Close" waits for the candle to finish. You enter one candle later, and the signal is real. Unless you specifically know your indicator does not repaint, choose the close.

Step 5 — Test before any money is involved

A good executor has a dry-run mode: the alert arrives, it works out exactly what it would trade, writes that to a log, and places nothing. Leave the first few alerts in dry run and read the parsed line:

BUY XAUUSD (market) · SL 4138 · TP 4160 / 4177 / 4200 · 0.1 lots

Check the symbol resolved correctly, the stop is on the right side, and the targets are the ones you meant. Only then switch it live — and do that on a demo account first.

Local EA or cloud execution?

This is the architectural fork, and it is worth understanding before you pick a tool.

EA inside your terminalCloud execution
Needs your broker passwordNoYes — it logs in as you
Works with MT5 closedNoYes
Needs a VPS for 24/5UsuallyNo
You can stop it instantlyYes — close MT5Only through their dashboard
Typical costFree to lowMonthly subscription

Neither is simply better. If you already run a VPS, the local model gives you the same result without handing anyone your credentials. If you trade from a laptop you close at night, cloud execution solves a problem the local model cannot.

What to expect on speed

End to end, alert to broker, is usually 1.5 to 4 seconds. The breakdown is lopsided:

StageTypical time
TradingView deciding to send and dispatching the webhook1–3 s
Network to the receiving service0.1–0.3 s
Service to your terminalunder 1 s
Terminal to broker fill0.05–0.3 s

TradingView's own dispatch dominates, and no service can remove it — anyone advertising instant execution from a TradingView alert is describing their slice, not your experience. On candle-close alerts this rarely matters. On fast news moves in gold it can, and the fix is a limit order at your intended price rather than a market order.

Common mistakes

  • Webhook URL in the message box. It belongs in the Webhook URL field under Notifications, not in the alert text.
  • Free TradingView plan. No webhooks at all; the alert simply never leaves.
  • Symbol mismatch. Your broker may quote gold as XAUUSD+ or XAUUSD.m while the alert says XAUUSD. A good executor matches suffixes automatically; if yours does not, set the exact broker symbol on the webhook.
  • No stop loss anywhere. If the indicator does not send one and the webhook has no default, you are running an unprotected position. Set a default and, ideally, refuse alerts that would end up without a stop.
  • Going live on day one. Dry run exists so the first real test of a trading system costs nothing.

Next steps

If your alerts fire but nothing trades, work through the nine causes of TradingView alerts not placing trades. If you are comparing tools, see how the free and paid options differ. And if you want the alert format in full detail — order types, offsets, R-multiple targets — the TradingView to MT5 setup guide lists every field.

Frequently asked questions

Can TradingView place trades on MT5 directly?+

No. TradingView has no native connection to MetaTrader 5 — it can only send an alert to a webhook URL. Something else has to receive that alert and place the order. That is what a TradingView-to-MT5 executor does: it listens for the alert and sends the order to your terminal.

Do I need a paid TradingView plan?+

Yes. Webhook alerts are not available on the free TradingView plan, so you need at least the entry paid tier. There is no workaround — it is a TradingView restriction, not something a third-party tool can add.

Do I need to know how to code?+

No. The alert message is a few lines of JSON, and a builder generates it for you — you pick the order type, stop loss and take-profits from dropdowns and copy the result into TradingView's message box.

Does my computer have to stay on?+

Yes, if the executor runs inside your own terminal. MT5 must be open with AutoTrading enabled, which is why most people run it on a Windows VPS rather than a laptop that sleeps. Cloud services that trade without a terminal exist, but they hold your broker credentials, which is a different trade-off.

How fast is it from alert to filled order?+

Typically one and a half to four seconds. Almost all of that is TradingView's own webhook dispatch, which no third-party service can speed up. The execution side — receiving, parsing and sending to the broker — is well under a second.

Is it safe to give a service access to my MT5?+

It depends entirely on the architecture. If a tool asks for your broker login and password, it is trading your account from its own servers and you are trusting it completely. If the tool runs as an Expert Advisor inside your terminal, it never needs a password and you can stop it by closing MT5.

Keep reading

Copy trades between MT4 & MT5 in milliseconds

Free local trade copier with a realtime web dashboard. Set up in 10 minutes — no coding.

Get Started Free