Start free
TradingView + Pine Script + webhook

Route Pine Script alerts to MT4, MT5 and cTrader

TheConnector receives your TradingView webhook, reads the Pine Script alert payload and routes the signal to the right MT4, MT5 or cTrader account. The free plan includes 10 accounts so beginner traders can test seriously before paying.

Covered points
10 connected accounts on the free plan
TradingView webhook payloads from Pine Script
MT4, MT5 and cTrader covered on one public workflow
TradingView + Pine Script + webhook

Accepted webhook payload

Use a JSON alert message that matches the fields parsed by TheConnector: action, symbol, risk or fixed volume, optional SL/TP and account routing.

  • action aliases: buy/long, sell/short, buystop/buy_stop, buylimit/buy_limit, closelongshort/close_long_short
  • fields: symbol/pair, risk, volume/lot, sl/stop_loss, tp/take_profit, price
  • routing: account/accountCode, platform and streamId/id. The per-account webhook URL carries the access key.
TradingView + Pine Script + webhook

Why 10 free accounts matter

Trading is hard and many beginner strategies need time before they become profitable. A free base offer reduces pressure and lets traders validate several demo or live accounts first.

  • Test several brokers or terminals
  • Keep demo and live accounts separated
  • Grow only when the setup is proven
TradingView + Pine Script + webhook

Technical flow

TradingView fires the alert, TheConnector accepts the webhook and the terminal robot receives only the routed instruction for its account.

  • Stable JSON alert message
  • Account-level routing
  • Symbol mapping for broker suffixes
Practical examples

Webhook payload example

Keep payloads explicit: the account connector can route the alert only when the action, symbol and target platform are clear.

{
  "action": "buy",
  "symbol": "EURUSD",
  "risk": 0.5,
  "sl": 15,
  "tp": 30,
  "source": "TradingView",
  "id": "tv-tradingview-pine-script-webhook-test-001",
  "account": "DEMO-MT5-001",
  "platform": "mt5"
}
Pine Script

Alert pattern to adapt

Use this as a reading pattern, then adjust order size, symbols and account routing before any real use.

//@version=5
indicator("The Connector webhook", overlay=true)
fast = ta.sma(close, 9)
slow = ta.sma(close, 21)
longSignal = ta.crossover(fast, slow)
if longSignal
    alert("{\"action\":\"buy\",\"symbol\":\"" + syminfo.ticker + "\",\"risk\":0.5,\"sl\":15,\"tp\":30,\"source\":\"TradingView\",\"id\":\"" + syminfo.ticker + "-" + str.tostring(time) + "\",\"account\":\"DEMO-MT5-001\",\"platform\":\"mt5\"}", alert.freq_once_per_bar_close)
MT5

Limits to keep in mind

  • Test each alert on a demo account before production.
  • Broker, platform and network conditions still matter: validate the route before increasing volume.
  • Use symbol mapping to adapt broker-specific names before sending live signals.
  • A signal that arrives too late must be treated as expired rather than replayed.