TradingView Alerts to MT5: Ghost Setup Guide
The MetaTrader 5 terminal ships no inbound HTTP listener, so a TradingView webhook physically cannot reach it. Here is how the Ghost bridge EA closes the gap: install, symbol suffixes, pip math, and lot sizing.
What You Need Before You Start
Why MT5 Cannot Receive a Webhook
A webhook is an inbound HTTP request. For one to reach MetaTrader 5, the terminal would need to be listening on a network address that TradingView could deliver to. It is not. MT5 is a desktop application: it ships no inbound HTTP listener, no public endpoint, and no hosted cloud API standing in front of it. There is no URL you can paste into TradingView that resolves to your terminal, which is why searching for an "MT5 webhook URL" never turns one up. It does not exist.
What MetaTrader does have is an outbound call. An Expert Advisor running on a chart can use WebRequest() to reach a server. So every TradingView-to-MetaTrader product, ours and everyone else's, inverts the direction: TradingView's webhook goes to a server, and a program inside your terminal calls that server and asks whether anything is waiting for it.
In Ghost that flow is: TradingView fires the webhook to your Ghost ticker URL, Ghost writes the command into a queue, and the QuantCrawler Bridge EA on your chart picks it up on its next poll and submits it natively through MetaTrader's own order path. Ghost never pushes to your machine, and never could. The consequence is worth stating plainly up front: your terminal has to be running for an entry to execute.
Step 1: Install the Bridge EA and Whitelist QuantCrawler
Download the QuantCrawler Bridge EA from Ghost Dashboard > Broker Connections > MT4 / MT5. Pick the MT5 build.
In MetaTrader, open File > Open Data Folder, then drop the file into MQL5 > Experts. Restart the terminal or right-click Navigator > Refresh so the EA appears.
Whitelist the server: Tools > Options > Expert Advisors > tick "Allow WebRequest for listed URL" and add https://quantcrawler.com. Skip this and WebRequest is blocked with error 4014 (or 5203): no popup and no orders, but the Bridge EA prints "[QC Bridge] WebRequest BLOCKED" in the Experts tab of the Toolbox, so check that log if nothing executes.
Drag the EA onto any chart. The chart symbol and timeframe are irrelevant. The EA trades whatever Ghost sends it, not the chart it sits on.
Enable AutoTrading in the toolbar, and confirm "Allow live trading" is ticked in the EA properties. A smiley face in the chart corner means the EA is live.
Step 2: Create Your MT5 Connection and Copy the Key
In Ghost Dashboard > Broker Connections > MT4 / MT5, create a connection and choose MT5 as the terminal type. One connection equals one terminal instance.
Copy the key immediately. It starts with qcmt_ and Ghost shows it exactly once. Only a SHA-256 hash of it is stored, so it cannot be shown to you again.
Paste the key into the EA's ApiKey input in its properties dialog. There is no login screen and no OAuth flow; the key is the entire authentication.
Add your MT5 account number under the connection: the exact login number shown in your terminal. Orders route to the account name you enter, and the EA skips any order whose account does not match the terminal it is running in.
If your broker decorates symbol names, set the prefix and suffix here while adding the account. Then leave the EA's SymbolPrefix and SymbolSuffix inputs empty. Set decoration in one place only, never both.
Lost the key? Rotate it in Ghost. The old key stops working immediately and the accounts under the connection are untouched. Just paste the new key into the EA.
Step 3: Find Your Webhook URL
Go to Ghost Dashboard > Tickers.
Find the ticker you want to automate (e.g. EURUSD, XAUUSD) or create a new one, and route it to your MT5 account.
Copy the Webhook URL. It looks like: https://quantcrawler.com/api/ghost/webhook/{your-ticker-id}?secret={your-secret}
Keep this URL private. The secret in the URL is what authenticates your alerts.
Step 4: Set Up Your TradingView Alert
Paste this payload into the TradingView alert message field. Replace sl and tp with your actual price levels. Ghost takes full prices, not pip counts, and converts them for you.
Confirm 2FA is enabled on your TradingView account first. Webhook alerts are only permitted with 2FA on, and without it the alert saves and silently never fires.
In TradingView, right-click the chart or use the Alerts tab > Create Alert.
Set your condition (indicator cross, price level, or a Pine Script strategy).
In the "Notifications" tab, enable "Webhook URL" and paste your Ghost webhook URL.
In the "Message" field, paste the JSON payload above, replacing sl and tp with your actual levels.
For Pine Script strategies, use {{strategy.order.action}} as the action value. TradingView fills it in automatically.
Include entry in the payload. It is the reference price Ghost uses to convert your SL and TP into pip distances, and without it the order queues with no brackets attached.
How the Bridge Actually Works: Poll Cadence and TTLs
These are the real numbers the rail runs on, including our poll interval.
| Value | What it is | Why it matters |
|---|---|---|
| 1500 ms | EA timer interval | The Bridge EA runs its OnTimer() loop every 1500 ms inside your terminal. |
| 2000 ms | Server poll interval | Every poll response carries poll_interval_ms, and the server currently returns 2000. The EA honors whatever the server sends. |
| 20 s | Online window | If the connection has not polled within 20 seconds, Ghost marks the EA offline and refuses new entries on it. |
| 20 s | Pickup window | A queued market entry gives the terminal 20 seconds to pick it up. Exit commands keep their longer recovery window. |
| 15 min | Close TTL | Close commands stay valid for 15 minutes so a reconnecting EA still flattens a position instead of leaving it orphaned. |
One call is both heartbeat and order fetch
Each poll sends a liveness ping and receives any pending commands in the same request. That heartbeat is what drives the online and offline state you see in Ghost, and it is why the 20 second window exists at all.
Commands are handed out exactly once
When the server gives the EA an order it marks it picked up. If the EA crashes before executing, the order is not re-sent; it expires. That is deliberate: a missed entry is recoverable, a double-executed one is not.
Entries fail loudly when the EA is offline
Ghost refuses to queue a new entry to a terminal that has not polled inside the 20 second window. A trade that cannot happen is reported as an error, not quietly parked in a queue where it might surface minutes later.
Your fill price is broker truth
The EA reports the actual fill back to Ghost, and reports the exit whenever the position closes: Ghost close, broker-side SL or TP hit, or a manual close in the terminal. That reported price is what drives your P&L; nothing is estimated from a feed.
Broker Symbol Suffixes and Why Orders Get Rejected
This is the number one real-world failure on this rail, and it has nothing to do with your strategy. Your chart says EURUSD. Your broker's symbol list says EURUSDm, or EURUSD.pro, or EURUSD.a, or XAUUSD.r. An order for a symbol the broker does not list is rejected, every time.
Where you set the decoration
Two places accept it: the prefix and suffix fields on your MT account row in Ghost, which are applied server-side before the command is queued, and the EA's own SymbolPrefix and SymbolSuffix inputs, which are applied in the terminal. Pick one. Filling in both produces EURUSDmm and the same rejection you were trying to fix.
Find your exact symbol name
Open Market Watch in MT5, right-click, choose Symbols, and read the name your broker actually publishes. Copy it character for character, including case and any dot. Do not infer it from your chart title, which often hides the decoration.
Ghost normalizes the incoming ticker first
An alert arriving as OANDA:EUR/USD is reduced to a core symbol before anything else happens: the exchange prefix is dropped, slashes, dashes and spaces are stripped, and the result is uppercased to EURUSD. Your decoration is then applied on top of that clean core.
Pip lookup runs on the queued symbol
Both ends of the bridge compute the pip size from the symbol Ghost queues, before the EA adds its own SymbolPrefix and SymbolSuffix, using the same leading-six-letter rule. A trailing suffix is safe: EURUSDm still starts with EURUSD and resolves to 0.0001. The real risk is a prefix on the Ghost side. M.EURUSD no longer starts with six letters, so it falls through to the index rule of one whole point and a 20 pip stop silently becomes 20 units of price. Name Ghost tickers with the plain TradingView symbol and let the EA add any leading decoration.
If an order is rejected, the EA reports the broker's own error text back to Ghost rather than swallowing it. Read the rejection reason in your Ghost logs first. It names the symbol the broker was actually asked for, which usually makes the decoration mistake obvious in one glance.
Lot Size Is Not Contract Count
The quantity you configure on a Ghost ticker is passed to MetaTrader as decimal lots, exactly as typed. There is no conversion step. On a standard FX pair, 1.00 is one standard lot, which is 100,000 units of the base currency. 0.10 is a mini lot, 0.01 is a micro lot.
The trap is arriving from a futures rail, where quantity means contract count. Setting a quantity of 5 on an MT5 ticker does not send five micro positions. It sends five standard lots, which is 500,000 units of base currency. If you want five micro lots, the number is 0.05.
Ghost deliberately does not auto-convert. Pip values, contract sizes, and minimum volumes vary too much between brokers and instruments for a silent conversion to be safe, so the number you type is the number that reaches the terminal. If it violates your broker's minimum volume or lot step, the order comes back as a rejection carrying the broker's error text, not as a quietly resized trade.
How your SL and TP become pips
You send absolute price levels. Ghost converts them into a pip distance using the entry price from your alert as the reference, and ships the distance rather than the level. The EA then applies that distance to the price it actually filled at: for a buy, the stop is the fill price minus the stop distance. Because the bracket is anchored to the real fill rather than to the signal price, slippage between the signal bar and the fill moves the whole bracket with the trade instead of quietly shrinking your stop.
| Example symbols | Rule | 1 pip |
|---|---|---|
| EURUSD, GBPUSD, AUDUSD | Six-letter pair, non-JPY quote | 0.0001 |
| USDJPY, EURJPY, GBPJPY | Six-letter pair, JPY quote | 0.01 |
| XAUUSD | Gold | 0.1 |
| XAGUSD | Silver | 0.01 |
| US30, NAS100, GER40 | Everything else (indices and CFDs) | 1.0 (index points) |
Ghost and the EA share this exact table, deliberately, so both ends agree on what a pip is. Neither side derives it from the broker's digits setting, which would let the two ends disagree on a five-digit versus four-digit feed.
What the MT5 Rail Does Not Do
Stated here rather than buried in a footnote, because finding out after you have wired up a strategy is worse than reading it now.
No trailing stop and no break-even
Neither exists on this rail, and neither exists on any other Ghost rail. Trailing is owned by your TradingView strategy, which manages the level and sends the resulting exit. If in-terminal trailing or break-even is a hard requirement for you, Ghost does not offer it.
No resting limit entries
Ghost queues market orders on this rail. A pending limit or stop entry that sits on the broker waiting to be triggered is not something the MT rail sends today.
No execution with the terminal closed
There is no cloud API and no server-side fallback. Close MetaTrader and the EA stops polling, and entries stop executing. Closes queue for 15 minutes and catch up on reconnect, but that is recovery, not coverage.
Never futures
The MT4/MT5 rail is forex and CFDs only. Futures run on the Tradovate, ProjectX, Rithmic, and NinjaTrader 8 rails instead. The Trade Copier is a separate product entirely: futures only, three brokers, and it does not touch MetaTrader.
Frequently Asked Questions
Can TradingView send a webhook straight to MT5?
No. The MetaTrader 5 terminal is a desktop application with no inbound HTTP listener and no cloud API, so there is no address a TradingView webhook could be delivered to. Every TradingView-to-MT5 product on the market solves this the same way: a program running inside your terminal calls out to a server and asks for work. In Ghost that program is the QuantCrawler Bridge EA, and the direction of travel is always terminal-to-server, never server-to-terminal.
Which TradingView plan do I need, and why do my webhooks never fire?
Webhook notifications are included on Essential, TradingView's entry paid tier, so you do not need a higher plan for this. The far more common cause of a silent failure is two-factor authentication: TradingView only allows webhook alerts when 2FA is enabled on your account. Without it the alert saves, looks correct, and simply never sends the webhook. If nothing at all is arriving in Ghost, check 2FA before you check anything else.
Do my TradingView alerts expire?
Yes, on the lower tiers. Essential and Plus alerts expire on a timer, and Premium is the first tier where an alert can be set to run indefinitely. An expired alert looks exactly like a broken integration: the strategy still plots, the alert still appears in your list, and no webhook is ever sent. Active alert limits differ by tier too: 20 on Essential, 100 on Plus, 400 on Premium, 1000 on Ultimate.
Why is my MT5 order rejected with an unknown or invalid symbol error?
Almost always broker symbol decoration. Many brokers do not list plain EURUSD. They list EURUSDm, EURUSD.pro, EURUSD.a, or XAUUSD.r, and an order for the undecorated name is rejected. Ghost applies the prefix and suffix stored on your MT account row before the command is queued, and the Bridge EA has its own SymbolPrefix and SymbolSuffix inputs. Set the decoration in exactly one of those two places. Filling in both decorates the symbol twice (EURUSDmm) and produces the same rejection you were trying to fix.
Does Ghost trail my stop or move it to break-even on MT5?
No. There is no server-side trailing stop and no break-even logic on the MT rail, and none on any other Ghost rail either. Trailing belongs to your TradingView strategy, which owns the decision and simply sends the resulting exit. If trailing or break-even managed inside the terminal is a hard requirement for you, Ghost does not offer it.
Do I need my computer on for orders to execute?
The terminal has to be running and the EA has to be polling. Ghost does not require or resell any particular hosting product, and whether the terminal runs on your own machine or a hosted Windows machine is entirely your choice, but there is no path that executes with the terminal closed. If the EA has not polled within 20 seconds Ghost treats it as offline and fails new entries loudly rather than queuing a trade that cannot happen. Closes behave differently on purpose: they stay queued for 15 minutes and execute the moment the EA reconnects, because a late close beats an orphaned open position.
What lot size does Ghost send, and can it convert contracts for me?
Ghost sends the quantity configured on your ticker straight through as decimal lots, with no conversion. A quantity of 1 is one standard lot, which is 100,000 units of the base currency on a standard FX pair, not one micro contract. If you want micros, set 0.01. Pip and lot values vary far too much between brokers and instruments for an automatic conversion to be safe, so the number you type is the number the EA sends, and a volume your broker will not accept comes back as a rejection carrying the broker's own error text.
Does the same setup work for MT4?
Yes. MT4 and MT5 are one rail in Ghost, sharing the same bridge contract, the same key format, the same poll cadence, and the same pip table. You pick the terminal type when you create the connection, and the only meaningful difference is on the EA side, where MT4 submits with OrderSend and MT5 builds a trade request. Each terminal instance gets its own connection and its own key.
Can I run MT5 forex and futures from the same Ghost account?
Yes, but not on this rail. The MT4/MT5 rail is forex and CFDs only and never trades futures. Futures run through the separate Tradovate, ProjectX, Rithmic, and NinjaTrader 8 rails on the same Ghost subscription, with each ticker routed to whichever broker account you assign it to. The Trade Copier is a different product again: futures only, across three brokers, and it does not support MT4 or MT5.
Continue Learning
PineConnector Alternatives →
An honest comparison, including where PineConnector still wins
TradingView Webhook Setup Guide →
How Ghost webhooks work and the full JSON payload reference
TradingView to MT4 →
The same bridge on MetaTrader 4, and where the two differ
MT5 Symbol Mapping →
Broker prefixes, suffixes, and how to find your exact symbol name
Ghost Webhook Automation →
Connect TradingView to 11 brokers
Risk Disclosure: Trading involves substantial risk of loss and is not suitable for all investors. This content is for educational purposes only and does not constitute financial advice.
Last updated: November 2026