JSON alert templates for TradersPost & PineConnector
A bridge can only act on an alert it can parse. Here are the alert payloads that work — JSON for TradersPost, the message line for PineConnector — with the Pine placeholders that fill them automatically.
When you automate a strategy, the TradingView alert is the instruction the bridge executes. Structured, with dynamic placeholders, so each entry and exit carries the right action and size. (Generate one fast with the Pine alert generator.)
Pine placeholders you'll use
Inside a strategy() script, alert messages can include order-aware variables:
{{ticker}} // symbol
{{strategy.order.action}} // buy / sell
{{strategy.order.contracts}} // quantity
{{strategy.order.price}} // fill priceTradersPost (futures → Tradovate/ProjectX)
TradersPost expects JSON. A representative entry payload:
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"quantity": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}"
}Exits typically send an action of exit or a flat/close signal. Exact accepted fields evolve — confirm against docs.traderspost.io.
PineConnector (MT5 → NAS/XAU)
PineConnector reads a comma-separated message line, not JSON. The shape is licence id, command, symbol and risk parameters:
LICENCE_ID,buy,NAS100,risk=1 LICENCE_ID,closelong,NAS100
Use your real licence id and the exact command keywords from docs.pineconnector.com.
Common mistakes
- Symbol mismatch — the alert ticker must map to the broker symbol the bridge expects.
- Missing exit alerts — entries automate but positions never close.
- Wrong script type — order placeholders need a strategy(), not an indicator. See strategy vs indicator.
- Static quantity — hardcoding size instead of
{{strategy.order.contracts}}breaks multi-contract sizing.
Once the alert is right, see how to automate MNQ end-to-end and the setup guide.
FAQ
Does TradingView send JSON to TradersPost?
Yes — TradersPost parses a JSON alert body containing the ticker, action, quantity and optional price, populated by Pine placeholders like {{strategy.order.action}}.
What format does PineConnector use?
A comma-separated message line (licence id, command, symbol, risk), not JSON. Use the exact command keywords from PineConnector's documentation.
Why isn't my automated strategy closing positions?
You likely only set entry alerts. Add exit alerts (an exit/close action) so the bridge flattens the position.
Do I need a strategy() or an indicator for alerts?
For order-aware alerts that carry action and quantity, use a strategy(). Indicator alerts can fire but don't include order placeholders, so they need manual mapping.
Not financial advice. Performance figures referenced are hypothetical, modeled outputs (1,500-path Monte Carlo on a 12-month sample). Past performance does not guarantee future results. Tool names are referenced for education; verify current features and prop-firm rules directly.