Home › Pine Script Snippets › PickMyTrade Webhook

Pine Script Webhook Alert for PickMyTrade

Example of building a webhook JSON message in Pine for PickMyTrade; confirm field names against the message your dashboard generates.

//@version=6
strategy("PickMyTrade Webhook", overlay=true, calc_on_every_tick=false)

// ── Inputs ──────────────────────────────────────────────
pmtToken = input.string("YOUR_PICKMYTRADE_TOKEN", "PickMyTrade Token")
qty      = input.int(1, "Contracts", minval=1)

// ── PickMyTrade JSON payload (built at runtime) ──────────
// Mirror the exact field names from your PickMyTrade alert
// template if they differ from these defaults.
buildMsg(side) =>
    '{"symbol": "' + syminfo.ticker + '", "data": "' + side + '", "quantity": ' + str.tostring(qty) + ', "token": "' + pmtToken + '"}'

// ── Entry logic (replace with your own conditions) ───────
longCondition  = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))
shortCondition = ta.crossunder(ta.ema(close, 9), ta.ema(close, 21))

if longCondition
    strategy.entry("Long", strategy.long, qty=qty)
    alert(buildMsg("buy"), alert.freq_once_per_bar_close)

if shortCondition
    strategy.entry("Short", strategy.short, qty=qty)
    alert(buildMsg("sell"), alert.freq_once_per_bar_close)

Settings

How to use

Frequently Asked Questions

What webhook format does PickMyTrade use?

A JSON object carrying the symbol, side and size. PickMyTrade's own dashboard generates the exact message for your account, and its documentation says to use that generated JSON unedited. This snippet shows the general shape of a Pine-built payload as an example only, so confirm every field name against the template your dashboard generates before using it.

Can I automate Apex with Pine Script?

Yes. PickMyTrade forwards TradingView webhook alerts to Tradovate accounts, including Apex evals and PAs. Other brokers, such as Rithmic, connect through its separate pickmytrade.io site. Check PickMyTrade's pages for the current list of supported firms and brokers. You stay responsible for monitoring the system and staying inside firm rules; the kill switch and max trades snippets exist for exactly that reason.

Related

Want a complete eval-ready strategy wired for PickMyTrade?

This snippet is a building block. Our paid scripts are complete strategies — entries, safety rules, and webhook alerts ready for PickMyTrade or TradersPost, tested on 3 years of MES/NQ data. Invite-only on TradingView, from $24/mo.

View Plans — From $24/mo