How to Connect TradingView to MT5: The Complete 2026 Guide

Image Source : Unsplash / Aedrian Salazar “a close up of a stock chart on a computer screen”
Short answer: TradingView cannot place orders in MetaTrader 5 on its own. You connect the two by sending TradingView alerts through a bridge such as PineConnector, and running an MT5 terminal that executes them. In 2026 you have two ways to run that terminal: let PineConnector host it for you with PineConnector Edge, its managed MT5 hosting, or install the PineConnector EA on an MT5 terminal you run yourself. This guide covers both routes and ends with the step most people skip: proving the connection with a verified demo trade.
It is written for traders who already have a TradingView strategy or indicator and a MetaTrader 5 account. If you trade on MetaTrader 4, or you rely on third-party Expert Advisors, use the self-hosted route; PineConnector Edge runs the PineConnector connector only and supports MT5 only[1].
Why TradingView Can't Trade MT5 Directly
TradingView is a charting platform. MetaTrader 5 is an execution platform. They're built by different companies and speak different languages. TradingView uses webhooks and Pine Script, MT5 uses MQL5 and Expert Advisors. There is no native bridge between them.
The solution is a relay: a tool that listens to TradingView alerts and forwards trade commands to your MT5 account. That's what PineConnector does. Your alert triggers a webhook, PineConnector receives it, and the EA in your MT5 terminal executes the order, typically in under a second.
One thing to hold on to throughout this guide: an Expert Advisor only works while its MetaTrader terminal is running. MetaQuotes lists "turn off the trading platform" and "close the chart the Expert Advisor is running on" among the ways an EA stops[5]. Where that terminal runs, and who keeps it running, is the choice in the next section.
One EA, unlimited symbols. You do not need to attach PineConnector to every chart in MT5. A single EA instance handles all your instruments once it's connected to your account.
Choose your route: hosted MT5 (PineConnector Edge) or self-hosted
Both routes use the same PineConnector account, the same License ID, the same webhook URL and the same alert syntax. The difference is where the MT5 terminal lives and who maintains it.
| Question | Route A: PineConnector Edge (hosted) | Route B: Self-hosted |
|---|---|---|
| Where does MT5 run? | On PineConnector's infrastructure, controlled from the web portal[2] | On your own Windows PC or a VPS you rent |
| What do you install? | Nothing. You add a hosted instance in the portal[1] | MetaTrader 5 plus the PineConnector EA and DLL |
| Who keeps the terminal running? | PineConnector[2] | You |
| Third-party EAs, indicators, MT4 | Not supported[1] | Supported, it is your terminal |
| EA settings | Fixed default configuration during Early Access; editing is planned[1] | Fully editable |
| Works from a Mac or phone? | Yes, from any device with a browser[2] | Needs Windows (or a Windows VPS) |
| Location | New York now; London coming soon for Plus and Pro[2] | Wherever you put it |
| Cost | Included in every plan: Core $59/mo (1 connection, 1 hosted MT5), Plus $129/mo (3), Pro $199/mo (5, coming soon)[2] | Your plan plus your own hardware or VPS |
Pick Route A if you only need the PineConnector connector, you want nothing to install or patch, or you are on a Mac. Pick Route B if you run other EAs alongside PineConnector, trade MT4, need custom EA settings today, or simply want full control of the machine. Either way, the rest of this guide applies. For the background on how hosting works, see What is PineConnector Edge? and Do you need a VPS for automated trading?
What You Need Before You Start
| Requirement | Details |
|---|---|
| TradingView account | A plan that includes webhook alerts. Check TradingView's current plan comparison; webhook requests must complete within three seconds and only ports 80 and 443 are accepted[3] |
| MetaTrader 5 account | Login, password and server name for the broker account you want to trade, demo or live. Route B also needs the MT5 terminal installed on Windows |
| PineConnector account | Start with the Core plan at pineconnector.com |
| PineConnector License ID | Found in the Connections section of your portal after signing up |
Route A: PineConnector Edge, hosted MT5
PineConnector Edge is managed MT5 hosting included in every PineConnector plan. PineConnector runs the MetaTrader 5 terminal on its own infrastructure and you control it from the portal. It is available now in early access[2]. The steps below follow the current Edge Guide[1]:
- Open the Edge page in the PineConnector Portal and select Add Instance.
- Choose the License ID the instance should run on. Alerts that carry this License ID will be routed to this hosted terminal.
- Enter the details the guide asks for, your "MT5 account login, password, and broker server name"[1]. The Edge Guide adds: "We recommend using a demo account for your first setup and test trade."[1] You are entering your own broker credentials; PineConnector states they are encrypted in transit and at rest and that your instance is isolated to you[2].
- Check the details match the account you intend to trade, then click Go Live. "Setup typically takes approximately two minutes."[1]
- Use the instance's Settings to restart or terminate it later if you need to.
Know the current scope before you start. From the Edge Guide[1]:
| Status | What it covers |
|---|---|
| Supported | Hosted MT5 running the PineConnector connector, controlled from the portal; restart and terminate from the instance settings; one hosted instance per connection in your plan. |
| Not available | "Edge does not support custom or other third-party EAs." MetaTrader 4 is not offered on Edge. |
| Planned | "EA settings currently use a fixed default configuration and cannot be edited." "Trading account data, including account balance, and the Experts and Journal logs are not yet available." |
If your workflow depends on anything in the Not available or Planned rows, use Route B for now. PineConnector describes Edge as "managed infrastructure, not managed execution": it runs the machine, you remain responsible for the broker relationship, the strategy and every trading decision[2].
Once the instance shows as live, skip ahead to Configuring TradingView alerts.
Route B: Self-hosted MT5 on your own Windows machine or VPS
On this route you install MetaTrader 5 yourself, add the PineConnector EA and DLL, and keep the terminal running. If the machine sleeps, restarts or loses power, the EA stops with it, which is why many self-hosters use a Windows VPS. What keeps running when your computer is off covers that trade-off in detail.
The nine self-hosted steps
Step 1 : Download the PineConnector EA
Log into the PineConnector Portal and go to the Downloads tab. Under "MT5 EA," click Download. You'll receive a .zip file containing two files you'll need in the next step.
Step 2 : Open the Experts Folder in MT5
In MetaTrader 5, click File → Open Data Folder from the top menu. Navigate into the MQL5 folder, then into the Experts folder inside it. This is where MT5 looks for Expert Advisors.
Step 3 : Add PineConnector Files to the Experts Folder
Extract the .zip you downloaded in Step 1 directly into the Experts folder. Make sure both of these files land at the root of the Experts folder, not inside a sub-folder:
PineConnector-MT5-DLLPineConnector-MT5-EA

Step 4 : Allow Algorithmic Trading and DLL Imports
In MT5, click Tools → Options, then open the Expert Advisors tab. Tick both Allow Algorithmic Trading and Allow DLL imports, then click OK.
You do not need to add any WebRequest URLs for MT5. PineConnector doesn't require them.
Step 5 : Enable Algo Trading in the Toolbar
Find the Algo Trading button in the MT5 toolbar. If it's red, click it. It should turn green. A red button means no EA can execute trades, regardless of any other settings. This step is easy to miss and worth double-checking every time you restart the terminal.
Step 6 : Attach the EA to a Chart
Open the Navigator panel with Ctrl+N (or View → Navigator). In the panel, right-click Expert Advisors and select Refresh. Find PineConnector MT5 EA in the list, right-click, and select Attach to Chart. Any chart will do, it doesn't matter which symbol or time frame.
Step 7 : Configure EA Settings
The EA properties window will open. Under the Common tab, tick Allow Algo Trading. Under the Dependencies tab, tick Allow DLL imports. Both must be enabled for the EA to function.
Step 8 : Input Your License ID
Go to Connections in the PineConnector Portal and copy your License ID. Back in the EA properties window, open the Inputs tab and paste it into the License ID field. Click OK, the EA will immediately attempt to connect.
Your PineConnector license is an Auto-Roaming License, so you can use the same ID across MT4, MT5, demo, live, and prop firm accounts without additional setup.
Step 9 : Verify the Connection in Your Portal
Return to the Connections page in the PineConnector Portal. Your MT5 account should now appear as a connected trading account. Click into it to see the full account details and confirm everything looks correct.
Set a custom name for each connection if you manage multiple accounts or strategies, it makes it much easier to identify which account you're reviewing in logs or need to disconnect.
Before going live: Send test alerts from PineConnector's portal to confirm orders are being received and executed correctly. Don't skip this. A two-minute test on a demo account saves real money if something is misconfigured.
Configuring TradingView Alerts to Send Orders
This part is identical for both routes. In TradingView, open the alert creation dialog and set the webhook URL to https://webhook.pineconnector.com.
Your alert message must follow PineConnector's command format, which the documentation specifies as LicenseID,Command,Symbol,Parameters, in that order, with one License ID, one command and one symbol per alert[4]. The two examples from the syntax documentation:
60123456789,buy,AUDUSD,vol_lots=0.1
60123456789,sell,GBPJPY,vol_dollar=50,sl_pips=20
Replace 60123456789 with your own License ID. The syntax documentation lists every supported command and parameter, including stop loss, take profit, trailing stops and partial closes. Do not guess parameter names; a rejected signal does not appear in the Signals Log[4].
Tips for alert reliability
- Trigger on bar close rather than intrabar. This avoids repeated orders when price crosses a level several times within one candle.
- Never put a broker login or password in the alert message. TradingView's own guidance: "ensure that you don't include sensitive information such as login credentials or passwords in the webhook body"[3]. PineConnector alerts only need your License ID.
- TradingView also notes that "webhooks may occasionally fail to reach the specified URL"[3]. A fired alert in TradingView is not proof of an order at your broker. The next section is how you check.
Finish with a verified demo trade
PineConnector's own guidance is to "send a test alert from TradingView to a demo account and verify that the expected trade appears in your broker account"[1]. Treat setup as unfinished until you have done this, on either route:
- Use a demo account first. Connect a demo login (Route A: as the instance's credentials; Route B: in the terminal) before any live account.
-
Send one clearly labelled test alert from TradingView using a small fixed size, for example
vol_lots=0.01if your broker allows it. On either route you can also use the Bridge page of the portal, which lets you "send test signals and view their processing results"[1]. - Check the Signals Log in the portal shows the signal was received and processed[4].
- Open the demo account in MT5 or your broker's own interface and confirm the order exists, and that it is the order you intended: right account number and server, right symbol, right direction, right volume, and stop loss or take profit where you set them.
- Confirm there is exactly one order, not two. If you see duplicates, check whether the alert fired more than once in TradingView before changing anything else.
- Close the test position, then repeat once more so you have seen both an open and a close arrive.
Only when all six checks pass should you point the same setup at a live account. If you are deciding between routes, this demo trade is also the moment to notice how each one feels to operate.
Common issues and fixes
| Symptom | Most Likely Cause | Fix |
|---|---|---|
| EA appears in chart but no trades execute | Algo Trading button is red in toolbar | Click the Algo Trading button in the MT5 toolbar until it turns green |
| EA doesn't appear in Navigator after refresh | Files placed in a sub-folder inside Experts | Move both files to the root of the Experts folder |
| Connection not showing in portal | License ID entered incorrectly, or DLL imports not allowed | Re-copy the License ID from Connections page; confirm DLL imports are ticked in both places |
| Alerts fire in TradingView but no orders appear | Wrong webhook URL or alert message syntax error | Verify the webhook URL is https://webhook.pineconnector.com |
| Error 4756 — unsupported filling mode | Broker uses a non-standard order filling mode | Adjust the filling mode parameter in EA settings to Automatic |
| Hosted (Edge) instance is live but a test alert produced no trade | Alert syntax or License ID mismatch, or the alert never reached PineConnector | Send a test signal from the Bridge page of the portal and check the Signals Log; rejected signals do not appear there, so also re-check the message format[1][4] |
What to Do After Setup
Once the connection is verified, build your alert conditions in TradingView and make sure the message syntax matches the positions you want to open and close. If you're automating an existing indicator such as Supertrend, a MACD crossover or moving-average signals, add alertcondition() calls and set the alert to trigger on bar close.
If you trade a prop-firm account, read the firm's current rules on automation and position sizing yourself, and choose the sizing parameters in the syntax documentation that match them. The same License ID works across all your MT5 accounts at once: on Route A, add one hosted instance per account within your plan's allowance; on Route B, install the EA on each terminal.
Frequently asked questions
Do I need both a hosted instance and a self-hosted terminal?
No. Pick one per account. Running both against the same account with the same License ID would send every alert to two terminals.
Can I switch from self-hosted to PineConnector Edge later?
Yes. The License ID, webhook URL and alert syntax are the same. Add a hosted instance, verify a demo trade on it, then stop the self-hosted terminal so alerts are not executed twice.
Does PineConnector Edge work with my broker?
You enter your MT5 login and select your broker's server when adding the instance[1]. Verify with a demo login first; a listed broker is not the same as a connection you have tested yourself.
Is MetaTrader 4 supported?
Self-hosted, yes. PineConnector Edge is MT5 only[2].
Next step: Start with Core, which includes one hosted MT5 instance through PineConnector Edge, and send your first verified demo trade from TradingView to MT5 today. Prefer to see the plans first? PineConnector Edge and plans.
Reviewed 9 September 2026. Facts and prices were checked against the linked sources on that date.
Sources
- PineConnector Docs – Edge (Early Access) guide, accessed 9 September 2026.
- PineConnector – PineConnector Edge: managed MT5 hosting included in every plan, accessed 9 September 2026.
- TradingView Help Center – How to configure webhook alerts, accessed 9 September 2026.
- PineConnector Docs – Syntax, accessed 9 September 2026.
- MetaQuotes – MetaTrader 5 Help: Algorithmic trading, Expert Advisors, accessed 9 September 2026.
PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.