Pine Script alerts
TradingView Pine Script webhook JSON for HexTrade — alert_message placeholders, valid JSON, and the 3-second timeout.
HexTrade needs a valid JSON body. TradingView will POST whatever you put in the alert message. If the message is not JSON, the webhook fails.
You need a free HexTrade account to copy a webhook URL. Marketing walkthrough: TradingView webhook automation.
Placeholders that work
Paste this as the TradingView alert message after you replace accountId:
{
"ticker": "NQ",
"action": "{{strategy.order.action}}",
"sentiment": "{{strategy.market_position}}",
"quantity": "{{strategy.order.contracts}}",
"price": "{{close}}",
"platformType": "tradovate",
"accountId": "your_account_id"
}
{{strategy.order.action}} is buy or sell. Prefer {{strategy.order.alert_message}} only if your Pine already builds a full JSON string.
Requirements TradingView documents
- Paid TradingView plan for webhook alerts
- Two-factor authentication enabled
- Ports 80 or 443 only
- HexTrade must respond within a few seconds — do not point the alert at a slow self-hosted box
Official reference: How to configure webhook alerts.
Test without an order
Add "dryRun": true to the payload. HexTrade returns the planned trade and does not send an order.