Pine Script Webhook Alert for PickMyTrade

Builds the PickMyTrade webhook JSON payload inside Pine, so a TradingView alert can auto-trade a connected Apex, Tradeify, or Bulenox account.

Pine Script v6 Free · TradingView free plan
Pine Script
//@version=6
strategy("Target Filled - PickMyTrade Webhook Example", overlay=true, calc_on_every_tick=false)

// --- Inputs ---------------------------------------------------
acctToken = input.string("YOUR_PICKMYTRADE_TOKEN", "PickMyTrade Account Token")
orderQty  = input.int(1, "Contracts", minval=1)

// --- PickMyTrade payload builder (assembled at runtime) -----------
// Match these field names exactly to the alert template your own
// PickMyTrade dashboard generates — rename here if yours differs.
pmtPayload(direction) =>
    '{"symbol": "' + syminfo.ticker + '", "data": "' + direction + '", "quantity": ' +
     str.tostring(orderQty) + ', "token": "' + acctToken + '"}'

// --- Sample signal — replace with your own entry logic ---------
fastMA = ta.ema(close, 9)
slowMA = ta.ema(close, 21)

if ta.crossover(fastMA, slowMA)
    strategy.entry("Long", strategy.long, qty=orderQty)
    alert(pmtPayload("buy"), alert.freq_once_per_bar_close)

if ta.crossunder(fastMA, slowMA)
    strategy.entry("Short", strategy.short, qty=orderQty)
    alert(pmtPayload("sell"), alert.freq_once_per_bar_close)

Settings

InputDefaultPurpose
acctTokenYour PickMyTrade account token, copied from the dashboard.
orderQty1Contract quantity sent in the payload and used for the entry.

How to use

  • Generate an alert template in your PickMyTrade dashboard first, and mirror its exact field names inside pmtPayload.
  • Swap the EMA-crossover placeholder for your own entry conditions.
  • Create a single TradingView alert with condition "Order fills and alert() function calls" and paste in the PickMyTrade webhook URL.
  • Per-firm routing — which broker and account a payload lands on — is configured on the PickMyTrade side, not in Pine. See the PickMyTrade Apex setup guide.

Which firms allow this

Automation policy varies by firm and can change between the evaluation and a funded account. Current policy for the firms PickMyTrade most commonly routes to:

FirmAutomation Policy
Apex Trader FundingAllowed during the evaluation. Not allowed for commercial/resold automation on live Performance Accounts — a script may still drive manual-confirm execution.
TradeifyExplicitly permitted on both evaluations and funded accounts.
BulenoxPermitted during evaluations via TradingView alerts to an execution broker; page caveats to always verify current policy.

Frequently Asked Questions

What webhook format does PickMyTrade use?
A JSON object carrying the account token, symbol, side, and quantity — the snippet above builds it at runtime with str.tostring. Field names have to match whatever template your PickMyTrade dashboard actually generates, so pull that template first and rename the keys here if they differ.
Can I automate Apex with Pine Script?
Yes. PickMyTrade forwards TradingView alerts into Rithmic and Tradovate accounts, which covers Apex evaluations and funded Performance Accounts, plus firms like Tradeify and Bulenox. Apex Trader Funding's own policy: "Allowed during the evaluation. Not allowed for commercial/resold automation on live Performance Accounts — a script may still drive manual-confirm execution." You're still responsible for staying inside the rules once it's live — that's what the kill switch and max-trades snippets are for.

Get a Pine Script tuned to your prop firm.

Invite-only on TradingView within 24 hours. From $19/mo, cancel anytime.