Smart Trader Bridge
Setup guide Affiliate Sign in Create account
Setup guide · no experience needed

From TradingView alert
to a real order

Pick where your trades should go. Each path takes about ten minutes, and every step shows you exactly where to click.

Prefer to watch?

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 min
01

Install 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.
Run MT5 on a VPS or a computer that stays on — the EA can only trade while the terminal is open.
Navigator ▸ Accounts ▸ Indicators ▾ Expert Advisors ▾ Market Smart Trader Bridge ▸ Examples ▸ Scripts ▸ Services EURUSD,H1 Smart Trader Bridge Smart Trader Bridge 1 2 3
1 the EA in Navigator · 2 drag it onto a chart · 3 its name appears top-right when attached
02

Let MT5 talk to the bridge

One-time setup. Open Tools › Options (Ctrl + O) and go to the Expert Advisors tab:

  1. Tick Allow algorithmic trading.
  2. Tick Allow WebRequest for listed URL.
  3. Double-click the empty row and add the bridge address.
  4. Press OK.
https://ws.smartraderbot.com
Skipping this is the #1 setup mistake: the EA then prints “one-time MT5 setup needed” in the Experts tab and can't connect.
Options✕ Server Charts Trade Expert Advisors Notifications Email Community Allow algorithmic trading Disable algorithmic trading when the account has been changed Disable algorithmic trading when the profile has been changed Allow DLL imports (potentially dangerous, enable only for trusted applications) Allow WebRequest for listed URL: https://ws.smartraderbot.com + add new URL like 'https://www.mql5.com' OK Cancel 1 2 3 4
Tools › Options › Expert Advisors — 1 algo trading · 2 WebRequest · 3 the bridge URL · 4 OK
03

Attach 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:

  1. TradingView_Symbol — leave empty if your broker names the symbol like TradingView does. If not (e.g. TradingView USOIL but your broker says WTI), attach to the WTI chart and type USOIL here.
  2. 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.5 halves it.
  3. On the Common tab make sure Allow Algo Trading is ticked.
  4. Press OK.
One EA per chart, one chart per symbol. Trading five symbols? Open five charts and attach the EA to each.
Smart Trader Bridge 1.40 (EURUSD,H1)✕ CommonInputs VariableValue ab TradingView_Symbol ab Order_Size (blank = strategy contracts) ab Order_Size_Adjustment (blank = 1x) ≡ FillingTypeORDER_FILLING_IOC ✓ Display Logstrue 01 Poll Interval (seconds)5 LoadSave OK Cancel Reset Common tab: Allow AlgoTrading (must be ticked) 1 2 3 4
1 symbol mapping (optional) · 2 lot override (optional) · 3 Common › Allow Algo Trading · 4 OK
04

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.

Algo Trading OFF — red: every order is blocked Algo Trading ON — green: the EA can trade One click toggles it for the whole terminal — it stays on after restarts. 1
1 green = on. It's a terminal-wide switch and survives restarts.
05

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.

Treat the URL like a password — anyone who has it can send trades to your account. Never post it in a screenshot or chat.

New computer or VPS later? Just attach the EA again — it recognises your account and restores the same URL automatically.

12:04:31.2Smart Trader Bridge +----------------------------------------------------------+ 12:04:31.2Smart Trader Bridge | Smart Trader Bridge | TradingView setup 12:04:31.2Smart Trader Bridge +----------------------------------------------------------+ 12:04:31.2Smart Trader Bridge | Account : 12345678 (YourBroker-Server) 12:04:31.2Smart Trader Bridge | Webhook URL : keep it private - it carries your API key 12:04:31.2Smart Trader Bridge | https://ws.smartraderbot.com/v5/API_7a47…cf30cf 12:04:31.2Smart Trader Bridge | In each alert set "mt_trading_account": "12345678" 12:04:31.2Smart Trader Bridge | Live log & dashboard: https://bridge.smartraderbot.com 12:04:31.2Smart Trader Bridge +----------------------------------------------------------+ CopyOpenClear Trade Exposure History News Alerts Experts Journal Toolbox: View › Toolbox (Ctrl+T) 1 2 3
1 Toolbox › Experts · 2 the webhook URL line · 3 right-click › Copy
06

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.

WEBHOOK GENERATOR Build an alert message MetaTrader 5 Exchange / broker API MT5 login 12345678 Strategy no. 1 Alert type Strategy alert SL / TP measured in Points Stop loss 300 Take profit 0 Step the stop-loss on TP1 / TP2 Breakeven buffer (1 pip) ALERT MESSAGE Copy JSON { "mt_trading_account": "12345678", "platform": "metatrader", "ticker": "{{ticker}}", "order_action": "{{strategy.order.action}}", "target_type": "pips", "stop_loss": "300", "sl_trailing": "enabled", "be_buffer": "enabled", "strategy_number": "1"} 1 2 3
1 MetaTrader 5 tab · 2 login, strategy no., SL / TP · 3 Copy JSON
07

Create the TradingView alert

  1. On your chart open Alerts › Create alert (Alt + A) and pick your strategy as the condition.
  2. Message tab: delete what's there and paste the JSON.
  3. Notifications tab: tick Webhook URL and paste your URL.
  4. Press Create. Done — the next signal trades on MT5.
TradingView needs a paid plan for webhooks. Test on a demo account first.
Create alert on BTCUSDT Settings Message Notifications MESSAGE { "mt_trading_account": "12345678", "platform": "metatrader", "ticker": "{{ticker}}", "order_contracts": "{{strategy.order.contracts}}", "order_action": "{{strategy.order.action}}", "market_position": "{{strategy.market_position}}", "target_type": "pips", "stop_loss": "300", "strategy_number": "1" …} NOTIFICATIONS Notify in app Show toast notification Send email Webhook URL https://ws.smartraderbot.com/v5/API_•••••••• Create Cancel 1 2 3 4
1 the JSON message · 2 tick Webhook URL · 3 paste your URL · 4 Create

Path B · Exchange / broker API

no MT5 · ~10 min
01

Create 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:

  1. Create a new API key (label it e.g. smart-trader-bridge).
  2. Copy the API key and secret — the secret is shown only once.
  3. Enable reading and trading (spot/margin and/or futures) — never withdrawals.
  4. Restrict access to trusted IPs and add the bridge server's addresses:
185.162.8.138
2a12:9cc0:0:6::59
Futures: set the account to one-way position mode (not hedge mode) so flips and closes net correctly.
API Management Create API LABELsmart-trader-bridge API KEYvmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zv… SECRET KEY — shown ONCE, copy it nowNhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP… API RESTRICTIONS Enable Reading Enable Spot & Margin Trading Enable Futures Enable Withdrawals — never IP ACCESS RESTRICTIONS Unrestricted (less secure) Restrict to trusted IPs only 185.162.8.1382a12:9cc0:0:6::59 1 2 3 4
Illustration of a typical API page — 1 create · 2 copy the secret now · 3 trade on, withdrawals off · 4 trusted IPs
02

Save 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.

Keys are encrypted on our server and never shown again. Your TradingView alert will only contain the name my-bybit — no secrets.
Exchange trading and the vault are the exchange plan: €9.90/month, first 7 days free. MT5 through the EA from the MQL5 Market needs no subscription. The €19.80 Bundle adds our own MT5 EA as a download, for one MT5 account at a time.

Venue notes

What each venue asks for.

VenueNeeds
Binance, Binance.US, Bybit, MEXC, BingX, Gate.io, Kraken, Coinbase, AlpacaAPI key + secret
KuCoin, OKX, BitgetAPI key + secret + passphrase
Capital.comAPI key + login e-mail + the API key's password; ticker = the EPIC (GOLD, US500); hedging mode off
OANDAv20 API token + account ID (practice token for Test)
RobinhoodCrypto only. API key + the base64 private key whose public key you registered in Robinhood's crypto API settings; Test = dry-run (no test environment)
WebullUS 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 BrokersUS 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…)
03

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.

WEBHOOK GENERATOR Build an alert message MetaTrader 5 Exchange / broker API Venue Bybit Market Futures Mode Test Order type Market Credentials my-bybit Stop loss % 1.5 Strategy alert (position fields) Step the stop-loss on TP1 / TP2 ALERT MESSAGE Copy JSON { "credential": "my-bybit", "real_order": "No", "exchange": "bybit", "order_market": "Futures", "order_type": "Market", "ticker": "{{ticker}}", "order_action": "{{strategy.order.action}}", "target_type": "percentage", "stop_loss": "1.5"} 1 2 3
1 Exchange / broker API tab · 2 venue, mode, your vault key · 3 Copy JSON
04

Create the TradingView alert

Exactly like Path A step 7: Message = the JSON, Notifications › Webhook URL = your URL, Create.

Quantity is in the coin/asset (e.g. 0.01 BTC), not in dollars — the bridge converts to contracts where a venue needs it.
Create alert on BTCUSDT Settings Message Notifications MESSAGE { "credential": "my-bybit", "real_order": "No", "order_market": "Futures", "order_type": "Market", "exchange": "bybit", "ticker": "{{ticker}}", "order_contracts": "{{strategy.order.contracts}}", "order_action": "{{strategy.order.action}}", "market_position": "{{strategy.market_position}}", …} NOTIFICATIONS Notify in app Show toast notification Send email Webhook URL https://ws.smartraderbot.com/v5/API_•••••••• Create Cancel 1 2 3 4
Same TradingView steps as Path A — 1 message · 2–3 webhook URL · 4 Create
05

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.

Received Sent to EA Exchange orders Positions VENUESYMBOLSIDEQTYMODESTATUSRESPONSE BybitSOL/USDT:USDT buy2 test filled closed id=…9f2 BinanceBTC/USDT buy0.001 test dry_run validated, not sent OKXETH/USDT:USDT sell0.5 live filled closed id=…41c 1 2
1 Exchange orders tab · 2 status + the venue's own response

Troubleshooting

the usual suspects
The Experts tab says “one-time MT5 setup needed” / WebRequest blocked (4014)
MT5 isn't allowed to contact the bridge yet. Do Path A step 2 (add 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
Your account is registered and this computer couldn't be matched to it automatically (for example your broker renamed its server). Sign in, open Overview, press Allow a new device next to the account, and re-attach the EA within 10 minutes. No bridge account? Write to helpdesk@smartraderbot.com.
Alerts fire but nothing trades on MT5
Check, in order: the Algo Trading button is green · the chart's EA shows its name top-right · the alert's 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
The EA already widens a too-tight stop to your broker's minimum and falls back to a filling mode the symbol supports. If you still see it, try the other FillingType in the EA inputs (IOC ↔ FOK) and make sure the stop distance in your alert is realistic for the symbol.
Exchange order rejected: API key invalid / permission denied
Re-check that the key is copied completely, that trading (and futures, if used) is enabled, that the trusted-IP list contains the bridge's addresses, and that test mode (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?
MT5: press Algo Trading (turns red) or remove the EA from the chart. Exchanges: disable or delete the alert in TradingView, or delete the key in your vault. For a leaked URL, press Rotate key on Overview — the old URL stops working instantly.

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.

Create free account