How to Automate TradingView Alerts to Tradovate

Tradovate is the default execution platform behind an Apex evaluation and a supported option at Topstep. TradingView generates the signal but can't place the order itself — here's the webhook bridge that closes the gap.

TradingView can chart a Pine Script strategy and fire an alert the instant its conditions are met, but it has no way to place an order at a broker on its own. Getting from a chart signal to a live fill in a Tradovate evaluation account needs a bridge in the middle. This guide walks through that setup with CrossTrade, which links to Tradovate in the cloud, with nothing to install. Target Filled is built by the team behind CrossTrade, the automation platform we recommend.

What's needed before starting

  • A TradingView plan that supports webhooks — Essential or higher; the free plan doesn't expose the webhook field on an alert
  • An Apex or Topstep evaluation on Tradovate — log in at least once beforehand to confirm the environment is active
  • A CrossTrade account: the bridge that accepts the webhook and places the order on Tradovate. CrossTrade offers a 7-day free trial, no credit card required.
  • A Pine Script strategy with alert conditions wired up — either through strategy.entry()/strategy.exit() or a standalone alertcondition()

Step 1: Link Tradovate to CrossTrade

  1. Create an account at CrossTrade.
  2. Link your Tradovate account to CrossTrade in the browser. There's nothing to install. Make sure the Apex or Topstep evaluation account is the one you mean to trade, not a separate live account.
  3. Copy your CrossTrade webhook URL and secret key. The CrossTrade docs show where to find both. The webhook URL goes into the alert in Step 3; the secret key goes into the alert message in Step 2.
Trading on NinjaTrader 8 instead of Tradovate? CrossTrade connects to it through a desktop add-on rather than a cloud link. See the NinjaTrader setup for that route.

Step 2: Wire the Pine Script alert

There are two ways to produce the alert message, depending on how the script is built.

Option A: strategy.entry / strategy.exit (recommended)

With strategy.entry() and strategy.exit() calls, set the TradingView alert condition to "Order fills only" and paste a CrossTrade message like this one. The placeholders fill in the order's direction and size each time the alert fires:

CrossTrade alert
key=your-secret-key;
command=place;
account=sim101;
instrument=ES1!;
action={{strategy.order.action}};
qty={{strategy.order.contracts}};
order_type=market;
tif=day;

Replace your-secret-key with your CrossTrade secret key, sim101 with the account the order should go to, and ES1! with the instrument you trade. Every Target Filled Pro strategy has this message built in, so this step is a paste.

Option B: standalone alertcondition()

If the script fires alerts through alertcondition() instead of strategy calls, define each condition manually and wire a separate TradingView alert per direction:

Pine Script
longCond  = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))
shortCond = ta.crossunder(ta.ema(close, 9), ta.ema(close, 21))

alertcondition(longCond,  title = "Long Entry",  message = "Long entry")
alertcondition(shortCond, title = "Short Entry", message = "Short entry")

The {{strategy.order.*}} placeholders only work on strategy alerts, so each of these alerts carries a fixed direction and size. The long alert's message looks like this; the short alert is identical with action=sell:

CrossTrade alert
key=your-secret-key;
command=place;
account=sim101;
instrument=ES1!;
action=buy;
qty=1;
order_type=market;
tif=day;

Each alertcondition() needs its own TradingView alert, all pointed at the same CrossTrade webhook URL.

Step 3: Create the TradingView alert

  1. Right-click the chart and select Add Alert, or press Alt+A
  2. Under Condition, select the strategy name and Order fills only (for Option A), or the specific alertcondition name (for Option B)
  3. Under Notifications, check Webhook URL and paste your CrossTrade webhook URL from Step 1
  4. In Message, paste the CrossTrade message from Step 2. TradingView fills in the placeholders when the alert fires
  5. Set expiration well into the future — TradingView alerts expire by default, and a lapsed one means missed signals with no warning
  6. Click Create
Webhook alerts only work on an Essential-tier TradingView plan or higher. If the Webhook URL field is grayed out, the account is still on the free plan.

Prop firm compliance checklist

Before running any of this on a live Apex or Topstep evaluation, confirm the Pine Script includes:

  • A kill switch input — a manual toggle that blocks new entries without closing existing positions
  • A session filter — restricts trading to regular hours and avoids holding through overnight sessions most evaluations disallow
  • Bar-close entries — calc_on_every_tick = false in the strategy declaration, so entries fire on confirmed closes rather than intrabar ticks
  • An EOD flatten — force-closes all positions before market close, which both Apex and Topstep evaluations expect
  • A daily loss limit — a coded halt once realized-plus-unrealized loss crosses a threshold, mirroring the account's actual drawdown mechanic at the strategy level

Free code snippets covering each of these are available in our Pine Script snippets library.

A limit inside the script only sees what the strategy sees. For a second control at the account level, CrossTrade's Account Manager can set a max daily loss, a max daily profit, and a trailing drawdown on each account. When one is hit, it flattens the positions and locks the account. It can also flatten on a schedule at the end of the day. It works on Tradovate and NinjaTrader 8 (on NinjaTrader, only while NinjaTrader and the CrossTrade add-on are running). Treat it as a control you set, not a guarantee.

Common issues and fixes

  • Alert fires but no order appears in Tradovate. Check TradingView's alert log first to confirm the alert actually fired, then compare the message field by field against Step 2. A missing semicolon, a misspelled field name, or the wrong secret key is the usual cause.
  • Order fills at an unexpected price. Usually means the alert fired on an intrabar tick rather than bar close. Confirm calc_on_every_tick = false and set the TradingView alert to fire "Once per bar close."
  • Duplicate fills. The alert is set to "Once per bar" instead of "Order fills only." Switching the condition to fills-only usually resolves it.
  • Symbol not found in Tradovate. Tradovate uses dated front-month contract codes internally. Check the instrument value in the alert message against the CrossTrade docs for the symbol format to use.

Strategies with the CrossTrade alert already written.

Every strategy in Pro ships its CrossTrade-ready alert message, plus setup guides for Tradovate and NinjaTrader 8. Cancel anytime. Every update included.