Pine Strategies

Connect a TradingView Pine strategy as a signal leader. The strategy's alerts fire a webhook that copies to your accounts through the same copy engine as a broker leader.

How It Works

A Pine strategy is a TradingView strategy script running on a chart. When it places an order, TradingView fires an alert, and that alert posts a webhook to BackTrader. BackTrader reads the order from the alert and copies it to every follower, the same way it copies a broker leader's fills.

The strategy shows up on Accounts as its own row. It has no broker login and no balance. Last Ping is the time of the last signal we received, and clicking it opens the signal feed so you can see exactly what TradingView sent.

Pine strategies are available on the Pro plan. On other plans the Pine Strategy tile shows an Upgrade Plan button instead of the form. Webhook alerts also require a paid TradingView plan, since the free tier cannot send webhooks.

Adding a Strategy

You create the strategy in BackTrader first, then paste its webhook URL and alert message into a TradingView alert.

Create the strategy in BackTrader

  1. Open Accounts from the sidebar and click Add Account.
  2. Select Pine Strategy.
  3. Enter a Strategy Name. This is how the row is labeled on Accounts and the Trading Floor.
  4. Click Generate URL. This creates the private webhook URL for this strategy.
  5. Copy the Webhook URL and the Alert Message. You will paste both into TradingView in the next part. You can always get them again later from the row's Manage button.
  6. Click Add Strategy.

Set up the alert in TradingView

  1. In TradingView, open a futures chart for the market you want to trade (for example ES, NQ, or MES on CME) and add your strategy to it. BackTrader maps the chart's ticker to the contract your accounts trade, so the chart symbol has to be a futures symbol.
  2. Create an alert on the strategy. For the condition, choose your strategy and the "Order fills only" option so the alert fires once per order.
  3. In the Message box, delete the default text and paste the Alert Message exactly as copied. Do not edit it. The curly-brace placeholders are what TradingView fills in with the order and position details.
  4. On the Notifications tab, turn on Webhook URL and paste the Webhook URL.
  5. Set the alert to never expire (Open-ended), then save it.

Make it the leader

  1. Adding a strategy does not make it the leader. Go to the Trading Floor, click Change Leader, and crown the strategy row.
  2. Enable the followers you want to copy it and set their multipliers, the same as with a broker leader.
  3. The next order the strategy places is copied to every enabled follower. Check Last Ping on the strategy row, or open its signal feed, to confirm signals are arriving.

Managing a Strategy

Everything about a strategy is on its Accounts row.

Manage, rename, or remove

  1. Click Manage on the strategy row to see the Webhook URL and Alert Message again.
  2. Rename the strategy from the row like any other account. The webhook URL does not change.
  3. Keep the webhook URL private. Anyone who has it can send signals to your followers. If it leaks, delete the strategy and create a new one, which gives you a fresh URL.
  4. To remove a strategy, click the trash icon on its row. Close any open follower positions first, the same as removing a broker leader.
  5. If you also want to stop TradingView from firing, delete or pause the alert on the TradingView side. A strategy with no alert simply stops receiving signals.