Skip to content

TradingView Webhook Alerts: Complete Syntax Guide

 

A working TradingView webhook alert for PineConnector has four parts in a fixed order: your License ID, a command, a symbol, and any parameters, all separated by commas. When an alert does not execute, the cause is almost always one of a short list: broken message format, a missing required parameter, a webhook or TradingView plan issue, or a terminal that is not actually listening. This guide covers the full syntax and then the rejection causes in order of likelihood.


How Is a PineConnector Alert Message Structured?

Every alert message follows the same skeleton:

LicenseID,Command,Symbol,Parameters

A real example: 60123456789,buy,EURUSD,vol_lots=0.1

Component What It Is Rules
License ID Your unique 13 to 14 digit number from the portal's Connections page Exactly one per message, always first
Command The action, like buy, sell, or closelong Exactly one per message, no equals sign
Symbol The instrument as your broker names it, like EURUSD or US30.Cash Exactly one per message
Parameters Details like volume, stop loss, take profit Always use an equals sign, any order after the symbol

Three structural rules cause most rejections when broken: the order is mandatory, the separators must be commas, and each message can contain only one License ID, one command, and one symbol. Spaces around the commas are fine either way.


Which Commands Can You Send?

The commands fall into a few families:

Family Commands Notes
Market entries buy, sell Alternatives like long and short also work. A volume parameter is required
Pending entries buystop, buylimit, sellstop, selllimit Require both a volume parameter and an entry parameter
Closing closelong, closeshort, closelongshort, closeall closeall requires the symbol of the chart the EA runs on
Cancelling cancellong, cancelshort Remove pending orders for a symbol
Modifying newsltplong, newsltpshort, and pending order variants Update stop loss or take profit on existing positions
EA control eaon, eaoff Pause or resume the EA remotely

So 60123456789,closelong,GBPUSD closes all GBPUSD longs, and 60123456789,buystop,EURUSD,entry_pips=20,vol_lots=0.1 places a buy stop 20 pips above the market.


What Are Explicit Parameters, and Why Use Them?

PineConnector's syntax was updated in January 2026 with explicit parameters, and they are the recommended way to write new alerts. Each one states its unit directly, so the EA executes exactly what the message says instead of interpreting a generic value through your EA settings.

The main ones:

  • Volume: vol_lots= for a fixed lot size, vol_dollar= to risk a cash amount, vol_pct_bal_loss= to risk a percentage of balance
  • Stop loss: sl_pips=, sl_price=, or sl_pct=
  • Take profit: tp_pips=, tp_price=, or tp_pct=
  • Pending entry: entry_price=, entry_pips=, or entry_pct=

Two rules to remember. Every entry command needs exactly one volume parameter. And the risk based volume parameters, vol_dollar= and the percentage ones, require a stop loss in the same message, because the EA sizes the position from the stop distance.

A complete explicit alert looks like this:

60123456789,sell,GBPJPY,vol_dollar=50,sl_pips=20,tp_pips=60

That risks $50 if the 20 pip stop is hit, with a target 60 pips away.

The older legacy parameters, risk=, sl=, tp=, and pending=, remain fully supported, but their meaning depends on your EA settings, which is a common source of surprises. Explicit parameters need the MT5 EA version 3.53.2 or later. For how these alerts fire from Pine Script in the first place, see our guide to the Pine Script alert() function.


Why Do Valid Looking Alerts Get Rejected?

Work down this list in order. It is sequenced by how often each cause shows up.

  1. A structural break. Wrong component order, a missing comma, two commands in one message, or an equals sign on a command. Compare your message against the skeleton character by character.
  2. A missing required parameter. Entry commands without a volume parameter, vol_dollar= without a stop loss, or a pending command without an entry level.
  3. A symbol mismatch. The symbol must match your broker's naming exactly. If your broker lists GBPJPY.a, then GBPJPY will not match.
  4. A secret key mismatch. If Signal Authentication is enabled in your portal, the secret= value must match exactly, and it is case sensitive. PineApple and pineapple are different keys.
  5. A typo in a parameter name. A surprisingly common one from real support cases: trailing spelled as trialing. A misspelled parameter is simply ignored or rejected.
  6. The webhook itself. The webhook URL must be pasted into the alert's notification settings, and sending webhooks requires a paid TradingView plan.
  7. The terminal is not listening. MT5 must be running with the EA attached, automated trading enabled, and the EA not halted by a previous eaoff command.

One diagnostic tip that saves a lot of guessing: the Signals Log in your PineConnector portal shows signals that were received and processed. Rejected signals do not appear there at all. So if your alert fired on TradingView but the log is empty, the message itself is being rejected, and the answer is in points 1 through 5.


How Do You Test an Alert Before Going Live?

Do not debug syntax with real money on the line. The reliable sequence:

  1. Craft the message, or build it with the Syntax Builder in the docs, which assembles compliant syntax and lets you send a test.
  2. Send a manual test alert from TradingView with a demo account connected.
  3. Confirm the signal appears in the portal's Signals Log and the trade appears in MT5 with the right direction, symbol, and size.
  4. Only then attach the message to your live strategy's alert.

The full parameter reference, including trailing stops, breakeven parameters, and entry filters, lives in the official Syntax Guide.


FAQ

Do commands like buy use an equals sign?
No. Commands never take an equals sign. Only parameters do. buy=1 is invalid; buy followed by parameters like vol_lots=1 is correct.

Can I put two commands in one alert message?
No. One License ID, one command, one symbol per message. For multi step actions, combined commands like closelongopenshort exist as single commands.

Where do I find my License ID?
On the Connections page of your PineConnector portal. It is a 13 to 14 digit number and always comes first in the message.

Do I need a paid TradingView plan for webhook alerts?
Yes. Webhook notifications are a paid TradingView feature, so a free TradingView account cannot send alerts to PineConnector.

Should I use risk= or vol_lots= for new strategies?
Use the explicit parameters like vol_lots=. They are self contained and do not depend on EA settings. Legacy risk= still works but requires the EA's Volume Type setting to match your intent.

My alert fired on TradingView but nothing reached MT5. Where do I look first?
Check the Signals Log in the portal. If the signal is absent, the message is being rejected, so recheck the syntax. If it is present but no trade opened, look at the terminal side: EA attached, automated trading enabled, symbol available.


Start your 7-day trial for $14 with us here and send your first automated trade from TradingView to MT5 today.


Published on July 23, 2026


Leave a comment

Back To PiCo Blog

Great traders focus on strategy.
74,000+ of them automate the rest.

The alerts you already write become the orders you no longer have to place.

No credit card required
Full Advanced plan: Bridge, Analytics, Tasks, Notifications
Go live in under 30 minutes
Start 14-day free trial
Built on Microsoft Azure · Empowering traders since 2021