TradingView Webhook Strategies: Automate Orders From Alerts
Turn a TradingView strategy alert into a real order on your leader account — which then copies to every follower in the group.
9 min read
A webhook strategy gives you a private URL. When TradingView fires an alert, it posts a small piece of JSON to that URL, and MimikTrader places the matching order on your copy group's leader account. From there the order follows the normal copy pipeline — the same one your manual trades use — so every follower gets it with their own sizing and risk rules applied.
Before you start
- A MimikTrader Pro subscription. Webhook strategies are a Pro feature. Without Pro, saved strategies are kept and new entries are not traded — but close and flatten alerts always go through, so an open position is never trapped by a plan change.
- A TradingView paid plan. Webhook alerts are not available on the free plan.
- A copy group with exactly one leader account. The strategy places its order on that leader. A group with no leader, or more than one, cannot be selected.
- A TradingView strategy, not an indicator. This matters more than anything else on this page — see the warning below.
{{strategy.order.action}} that only exist on strategy alerts. On an indicator alert TradingView sends those placeholders through as literal text, MimikTrader cannot read an action from them, and the signal is rejected. In the alert dialog, the Condition must be your strategy — not an indicator plot.Setting it up
- 1
Create the strategy in MimikTrader
Go to Webhooks in the sidebar and choose New strategy. Give it a name, pick the copy group it should trade, and set your order defaults — direction, size, entry type, and any take-profit or stop-loss you want attached automatically. Save. - 2
Copy the webhook URL and the alert JSON
As soon as the strategy is created, MimikTrader shows your webhook URL and a ready-made alert JSON. Copy both. If you ever need them again, choose Reveal webhook URLfrom the strategy's menu — keep the URL private, since anyone who has it can send signals. Rotating the secret invalidates the old URL immediately and you will have to update the alert in TradingView. - 3
Create the alert in TradingView
Open your chart, add your strategy to it, then press Alt + A (or use the alarm-clock icon) to create an alert. In the Condition dropdown, select your strategy. - 4
Paste the URL into the Notifications tab
In the alert dialog, open the Notifications tab. Tick Webhook URL and paste the URL you copied in step 2 into the field beside it. This is the step people most often miss — the webhook field is not on the Settings tab. - 5
Paste the JSON into the Message box
Back on the Settings tab, clear the Messagebox and paste the alert JSON from step 2. TradingView's default message is plain text, not JSON, and will be rejected. Then click Create. - 6
Check it arrived
Back in MimikTrader, expand the strategy and look at Recent signals. Every accepted or rejected post shows up there with its outcome and a reason. If the row says Dispatched, the order went to your leader. You can also choose Send test signalfrom the strategy's menu at any time — it runs a payload through the real pipeline without placing anything.
What goes in the Message box
The JSON we generate for you looks like this. You can paste it as-is — every placeholder is filled in by TradingView when the alert fires.
{
"secret": "your-secret",
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"quantity": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"position": "{{strategy.market_position}}",
"id": "{{timenow}}-{{ticker}}-{{strategy.order.id}}"
}The fields
action— required.buy,sell,close,flattenorreverse. Be clear on the difference:closecloses the alert's symbol only, whileflattencloses every open position on the leader account — including positions from other strategies or manual trades. The aliaseslong,short,exitandflatare also accepted and mean buy, sell, close and flatten — soflatis account-wide too.symbol— required. The contract to trade.tickeris accepted as an alias, so an alert written for another platform that sendstickerworks unchanged. If both are present,symbolwins.quantity— optional whole number. Only used if your strategy is set to take its size from the signal, or you have turned on the size override.orderType— optional.market,limit,stoporstop_limit. Applies to the entry for buy/sell/reverse, and only when the entry override is enabled on the strategy; an explicitentryTypefield wins over it. It is deliberately ignored on close and flatten — your exit stays on the strategy's configured exit type, so a stray field can never turn a guaranteed market close into one that waits on a price. To change the exit type from an alert, use the explicitexitTypefield (with apricefor non-market exits).price— required when your entry type is Limit, Stop or Stop-limit. Ignored for Market entries.takeProfit/stopLoss— optional, and only used when the matching override is enabled on the strategy. Either a plain number (interpreted in the mode your strategy is configured for) or an object naming its own unit:{ "ticks": 40 }for a tick offset,{ "limitPrice": 5325.00 }for an absolute take-profit price, or{ "stopPrice": 5280.00 }for an absolute stop price. Note the absolute key is specific to the leg —limitPricebelongs to takeProfit andstopPriceto stopLoss. Overrides adjust the protection your strategy already has configured; they do not add protection to a strategy whose take-profit or stop is off. One constraint when mixing units: if one leg is in ticks and the other is an absolute price, the alert must carry aprice(so a market entry with mixed units is rejected) — keep both legs in the same unit on market entries.position— optional. When TradingView reportsflathere, a buy or sell is treated as a close rather than a new entry, which is what makes strategy exits work correctly.id— recommended. A unique id per alert. MimikTrader uses it so a TradingView retry cannot place the same order twice. If you leave it out we fall back to a 10-second fingerprint, which means two genuinely different alerts for the same symbol and action inside 10 seconds would be treated as one.time— optional. The bar time, i.e. TradingView's{{time}}placeholder. If you are not sending anid, including the bar time sharpens the fallback fingerprint so two different bars are never mistaken for a duplicate. Do not use{{timenow}}here — it renders a fresh wall-clock value on every post, which makes every post look unique and disables the duplicate guard entirely. (Inside theidfield{{timenow}}is fine — there, per-alert uniqueness is exactly the point.)test— optional. Sendtrueto dry-run the webhook: the signal runs every intake check — authentication, rate limit, payload parsing, strategy enabled, trading window, direction filter, group target — then stops before dispatch and shows up under Recent signals as Skipped with the reason test signal. It proves the pipe, not the trade: broker connection, contract resolution, subscription and risk checks are not exercised, so a green test can still be followed by a failed live order for those reasons. Test posts count toward the strategy's rate limit.secret— optional. If present it must match your strategy's secret, giving you a second check alongside the one already in the URL.
Contract symbols and roll
Leave {{ticker}} in place. TradingView sends a continuous symbol such as MES1!, and MimikTrader resolves the current front-month contract from your broker's own reference data — Rithmic and Tradovate both. That means you do not have to edit your alert every time the contract rolls.
If resolution is ever ambiguous, MimikTrader fails closed and records the reason on the signal rather than guessing at a contract. You can also send an explicit dated contract — for example MESM6 — and we will use exactly that.
How sizing is decided
Two settings work together, and both always apply:
- Size quantity — the base number of contracts (or, in Signal quantity mode, the size that came from the alert).
- Signal quantity multiplier — multiplied on top of that base. Results are rounded up to whole contracts, so a base of 3 with a 0.4 multiplier places 2.
For fixed sizing, the strategy card shows the resulting size in plain terms — for example Size 1 × 3 = 3 contracts — so what you see is what will be placed. In Signal-quantity mode the base comes from each alert, so the card shows the multiplier that will be applied to it (for example Signal quantity × 2). Follower accounts then apply their own multiplier on top, as they do for any copied trade.
Alert frequency and lifetime
- Set the frequency in your strategy code. Strategy alerts fire when the strategy generates an order, so avoid intrabar signals unless you intend to trade them.
- TradingView alerts expire after a period depending on your plan. If your signals stop arriving with no rejection rows in MimikTrader, check whether the alert expired.
- Keep the URL private. Anyone who has it can send signals to your strategy. Rotate the secret if you think it has leaked.
When something does not arrive
Expand the strategy and read Recent signals first. Most problems show up there with a reason attached:
- No row at all — the post never authenticated. The URL is wrong or the secret has been rotated, the strategy was deleted, or the same alert was already received (a duplicate). Re-copy the URL from the strategy and re-paste it into TradingView.
- Failed, with a payload message— the JSON was not understood. The usual cause is an indicator alert, or TradingView's default plain-text message left in place.
- Skipped — the signal was understood but deliberately not traded: the strategy is disabled, it is outside your trading window, the direction is not allowed, the group is not active, your subscription no longer includes webhook strategies (the reason reads entitlement: entry suppressed — closes and flattens still go through even then), or it was a test signal dry run. The reason column says which.
- Dispatched— the order went to your leader. From that point it behaves like any other trade, so if a follower did not get it, the answer is in that follower's risk settings or connection state.