HomePine Script Snippets › PickMyTrade Webhook

Pine Script Webhook Alert for PickMyTrade

Builds the PickMyTrade webhook JSON in Pine so TradingView alerts can auto-trade Apex, Tradeify, and Bulenox accounts.

//@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 your account token, the symbol, side, and quantity — this snippet builds it at runtime. Field names must match the alert template your PickMyTrade dashboard generates, so copy the template from the dashboard and mirror its keys if they differ from the defaults here.

Can I automate Apex with Pine Script?

Yes. PickMyTrade forwards TradingView webhook alerts to Rithmic and Tradovate accounts, including Apex evals and PAs, and also supports firms like Tradeify and Bulenox. 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. Instant delivery from $50.

View Plans — From $50