Start free

TradingView quickstart

First TradingView alert in 10 minutes

Build a safe first alert, validate the payload locally, then send one controlled TradingView test.

Generator

TradingView alert payload

Generated message

Paste this in TradingView alert message after confirming the webhook URL belongs to the same account.

Dry-run validator

Validate without execution

Test alert

Guided account test

  1. Open the account in the dashboard and confirm status Live.
  2. Open TradingView alert dialog and paste the webhook URL from that account.
  3. Paste the generated message, use once per bar close, then send one test.
  4. Read Transactions first: status explains quota, syntax, account offline, expired, duplicate, unknown symbol or broker rejection.

Pine Script

Ready examples for MT4, MT5 and cTrader

MT4
//@version=5
indicator("TC MT4 first alert", overlay=true)
longSignal = ta.crossover(ta.sma(close, 9), ta.sma(close, 21))
if longSignal
    message = "{\"command\":\"buy\",\"platform\":\"MT4\",\"symbol\":\"" + syminfo.ticker + "\",\"vol_lots\":0.10,\"sl_pips\":20,\"tp_pips\":40,\"ttl_ms\":2000,\"comment\":\"tv-mt4\"}"
    alert(message, alert.freq_once_per_bar_close)
MT5
//@version=5
indicator("TC MT5 percent risk", overlay=true)
shortSignal = ta.crossunder(ta.ema(close, 12), ta.ema(close, 26))
if shortSignal
    message = "{\"command\":\"sell\",\"platform\":\"MT5\",\"symbol\":\"" + syminfo.ticker + "\",\"vol_pct_balance\":1,\"sl_pips\":25,\"tp_pips\":50,\"ttl_ms\":2000,\"comment\":\"tv-mt5\"}"
    alert(message, alert.freq_once_per_bar_close)
cTrader
//@version=5
indicator("TC cTrader pending", overlay=true)
breakout = close > ta.highest(high, 20)[1]
if breakout
    message = "{\"command\":\"buystop\",\"platform\":\"cTrader\",\"symbol\":\"" + syminfo.ticker + "\",\"price\":" + str.tostring(high) + ",\"vol_dollar\":1000,\"sl_pips\":20,\"tp_pips\":45,\"ttl_ms\":2000,\"pending_expiration\":\"15m\",\"comment\":\"tv-ctrader\"}"
    alert(message, alert.freq_once_per_bar_close)