Webhooks
TradingView webhook JSON examples for futures strategy alerts
Educational payload patterns for connecting chart strategy alerts to MimikTrader. TradingView is a separate product; MimikTrader is not affiliated with TradingView, Tradovate, or any prop firm. For step-by-step UI setup, see the webhook strategies help guide.
Baseline market entry
Use strategy placeholders, not indicator plot text. TradingView fills these when the alert fires.
{
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"quantity": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"position": "{{strategy.market_position}}",
"id": "{{ticker}}-{{strategy.order.id}}-{{time}}"
}Entry with bracket overrides
Overrides only apply when the matching take-profit or stop override is enabled on the MimikTrader strategy. Tick offsets and absolute prices are both supported.
{
"action": "buy",
"symbol": "{{ticker}}",
"quantity": "1",
"takeProfit": { "ticks": 40 },
"stopLoss": { "ticks": 20 },
"id": "{{ticker}}-long-{{time}}"
}{
"action": "sell",
"symbol": "{{ticker}}",
"quantity": "1",
"takeProfit": { "limitPrice": 5325.00 },
"stopLoss": { "stopPrice": 5280.00 },
"id": "{{ticker}}-short-{{time}}"
}Limit, stop, and stop-limit entries
Non-market entries need a price. orderType applies to entries when entry override is enabled; it is ignored on close and flatten so a stray field cannot turn a flatten into a resting order.
{
"action": "sell",
"symbol": "{{ticker}}",
"quantity": "1",
"orderType": "stop",
"price": "{{close}}",
"id": "{{ticker}}-stop-entry-{{time}}"
}Close vs flatten
close exits the alert symbol only. flatten liquidates every open position on the leader account — including manual trades and other strategies.
{
"action": "close",
"symbol": "{{ticker}}",
"id": "{{ticker}}-exit-{{time}}"
}{
"action": "flatten",
"symbol": "{{ticker}}",
"id": "flatten-all-{{time}}"
}Every payload needs symbol, including flatten. Flatten still liquidates the whole account — the field is required by the payload format, not used to pick what to close. Omit it and the alert is rejected with a 400, and TradingView does not retry a 4xx.
Idempotency
TradingView retries webhooks on 5xx. Use a stable id built from bar {{time}}, not wall-clock {{timenow}}, so a retry of the same fill keeps the same id. If you omit id, MimikTrader keys on the bar time when the JSON includes time — so same-bar duplicates collapse — and only fall back to a 10-second fingerprint when it includes neither. Never put {{timenow}} in the time field — it changes on every post, so retries stop matching.
Common rejection reasons
- Plain-text default alert messages instead of JSON
- Wrong webhook URL (the secret is in the URL, not the JSON)
- Strategy group with zero or multiple leaders
- Account locked by daily loss, trailing drawdown, or consistency
Related
Paste-ready JSON, then copy to every account
Create a webhook strategy in MimikTrader, drop the URL and JSON into your chart alerts, and route entries through your leader with brackets and per-account risk enforced.
Start Free Trial