TradingView to MT5, on video
A walkthrough of Path A, from the EA on your chart to the first alert. Then follow the steps below at your own pace.
Path A · MetaTrader 5
EA on your chart · ~10 minInstall the EA
Get Smart Trader Bridge from the MQL5 Market (or your download) and open MetaTrader 5 logged into the account that should trade.
- Market purchases appear automatically under Navigator › Expert Advisors › Market.
- No Navigator? Press Ctrl + N.
Let MT5 talk to the bridge
One-time setup. Open Tools › Options (Ctrl + O) and go to the Expert Advisors tab:
- Tick Allow algorithmic trading.
- Tick Allow WebRequest for listed URL.
- Double-click the empty row and add the bridge address.
- Press OK.
https://ws.smartraderbot.comAttach the EA to a chart
Open a chart of the symbol you'll trade and drag the EA onto it (step 1's picture). Its settings window opens:
- TradingView_Symbol — leave empty if your broker names the symbol like TradingView does. If not (e.g. TradingView
USOILbut your broker saysWTI), attach to the WTI chart and typeUSOILhere. - Order_Size — leave empty to trade the size your alert sends, or type a fixed lot like
0.10. Order_Size_Adjustment (empty = 1×) scales it, e.g.0.5halves it. - On the Common tab make sure Allow Algo Trading is ticked.
- Press OK.
Switch Algo Trading on
The Algo Trading button in MT5's top toolbar must be green. Red means every order is blocked — the EA warns you on the chart if it's off.
Copy your webhook URL
On first attach the EA registers your account by itself and prints your personal webhook URL. Open the Toolbox (Ctrl + T) › Experts tab, select the URL line, right-click › Copy.
New computer or VPS later? Just attach the EA again — it recognises your account and restores the same URL automatically.
Build the alert message
Open the Webhook generator (free account) and choose MetaTrader 5. Fill in:
- MT5 login — your account number (shown in the setup box).
- Strategy no. — any number; each strategy on the same symbol needs its own.
- Stop loss / Take profit — in points or % of entry, or 0 for none.
Press Copy JSON. No account on the bridge? Ask us for a template via helpdesk@smartraderbot.com — or create one in a minute.
Create the TradingView alert
- On your chart open Alerts › Create alert (Alt + A) and pick your strategy as the condition.
- Message tab: delete what's there and paste the JSON.
- Notifications tab: tick Webhook URL and paste your URL.
- Press Create. Done — the next signal trades on MT5.
Path B · Exchange / broker API
no MT5 · ~10 minCreate an API key on the exchange
In your exchange account open API Management (Binance: profile › API Management; Bybit/OKX/KuCoin: account › API) and create a key:
- Create a new API key (label it e.g.
smart-trader-bridge). - Copy the API key and secret — the secret is shown only once.
- Enable reading and trading (spot/margin and/or futures) — never withdrawals.
- Restrict access to trusted IPs and add the bridge server's addresses:
185.162.8.1382a12:9cc0:0:6::59Save the key in your vault
Create your bridge account, confirm your e-mail, then open Vault: choose the exchange, give the key a short name like my-bybit, paste the key/secret (and passphrase for KuCoin, OKX, Bitget) and save.
my-bybit — no secrets.Venue notes
What each venue asks for.
| Venue | Needs |
|---|---|
| Binance, Binance.US, Bybit, MEXC, BingX, Gate.io, Kraken, Coinbase, Alpaca | API key + secret |
| KuCoin, OKX, Bitget | API key + secret + passphrase |
| Capital.com | API key + login e-mail + the API key's password; ticker = the EPIC (GOLD, US500); hedging mode off |
| OANDA | v20 API token + account ID (practice token for Test) |
| Robinhood | Crypto only. API key + the base64 private key whose public key you registered in Robinhood's crypto API settings; Test = dry-run (no test environment) |
| Webull | US stocks & crypto. App Key + App Secret after Webull approves your API application (1–2 days); with 2FA on, approve the request in the Webull app when you save the key |
| Interactive Brokers | US stocks, IBKR Pro. Consumer key, access token + secret, private signature and encryption keys (PEM) and the DH prime from IBKR's OAuth self-service setup (activation can take up to 2 weeks); use a second username for the API so TWS / mobile logins don't end its session; Test = your paper account (DU…) |
Build the alert message
Open the Webhook generator › Exchange / broker API:
- Venue & market — e.g. Bybit · Futures.
- Mode — start with Test (sandbox/testnet; dry-run where a venue has none). Bybit and Binance also offer Demo — their Demo Trading accounts, which use different API keys from their testnets (
"demo_trading": "Yes"). - Credentials — pick your vault key.
- Keep Strategy alert ticked for strategies — closes and partial exits then reduce the position instead of opening new ones.
Copy the JSON, and copy your webhook URL from Overview.
Create the TradingView alert
Exactly like Path A step 7: Message = the JSON, Notifications › Webhook URL = your URL, Create.
0.01 BTC), not in dollars — the bridge converts to contracts where a venue needs it.Test, check, go live
Let a test signal fire, then open Trade log › Exchange orders. Each order shows the venue's answer:
- filled / placed — it worked.
- dry_run — test mode on a venue without a testnet: checked, not sent.
- rejected — the reason is next to it (bad key, not enough balance, …).
Happy with it? Rebuild the message with Mode: Live and update the alert.
Troubleshooting
the usual suspectsThe Experts tab says “one-time MT5 setup needed” / WebRequest blocked (4014)
https://ws.smartraderbot.com under Tools › Options › Expert Advisors). The EA retries every 30 seconds — no need to re-attach.The chart says STB: approve device at bridge.smartraderbot.com
Alerts fire but nothing trades on MT5
mt_trading_account is exactly your login · the alert's ticker matches the chart symbol or the EA's TradingView_Symbol · the webhook URL is the one from your Experts tab. The trade log shows each signal and why it was or wasn't executed.Broker error Invalid stops or Unsupported filling mode
Exchange order rejected: API key invalid / permission denied
real_order: No) is paired with a testnet key, demo mode (demo_trading: Yes) with a Demo Trading key, and live mode with a live key.How do I stop everything quickly?
Still stuck?
Write to helpdesk@smartraderbot.com with your account number (never your webhook URL or keys).
Enjoying the bridge? Invite others and earn STB — free months or USDT.