Automating TradingView Strategies with Limit Orders

3 min read

1. Introduction #

PickMyTrade lets traders automate TradingView strategies using limit orders, giving you precise control over entry price while keeping full automation with Tradovate.

With limit order automation:

  • Orders are submitted at a predefined price
  • Trades execute only when price reaches that level
  • This approach works well for pullbacks, breakout-retests, and mean-reversion strategies

In this guide, you’ll learn how to configure a TradingView strategy to send limit orders, modify the generated JSON, and complete the webhook setup in TradingView.


2. How Limit Order Automation Works in PickMyTrade #

When you automate a TradingView strategy with limit orders:

  • TradingView generates buy or sell signals
  • PickMyTrade submits a LIMIT (LMT) order
  • Orders stay pending until they fill or a new signal replaces them

As a result, you maintain control over entry price without losing automation.

Key Requirements #

To ensure proper execution, your setup must meet the following requirements:

  • The strategy must generate entry signals
  • The order quantity must be fixed
  • The alert JSON must include a limit price
  • Market position must be tracked correctly to allow reversals

3. Step-by-Step Setup in PickMyTrade #

Step 1: Generate the Alert in PickMyTrade #

  1. Log in to PickMyTrade
  2. Go to Generate Alert
  3. Select TradingView Strategy
  4. Enter your TradingView symbol (for example, MNQ1!)
  5. Click Generate Alert
PickMyTrade dashboard showing Generate Alert page with TradingView Strategy selected and symbol entry field for creating webhook JSON.
Trading interface displaying generated alert JSON with copy button for exporting the message into a text editor.

Step 2: Copy the Generated JSON #

Next, click Copy and paste the JSON into a text editor such as Notepad++, VS Code, or Notepad. This allows you to safely edit the message before using it in TradingView.

interface displaying generated alert JSON with copy button for exporting the message into a text editor.

Step 3: Modify the JSON for Limit Orders #

Make the following required changes to the generated JSON.

#Field NameActionValue
1dataReplace{{strategy.market_position}}{{strategy.order.action}}
2quantitySet2
3order_typeAdd"LMT"
4reverse_order_closeSettrue
5gtd_in_secondAdd1

Make the following required changes to the generated JSON before using it in TradingView.


Code editor screen showing PickMyTrade JSON fields being edited to include order type LMT, quantity, and limit price values.

Final JSON for Limit Orders #

{
  "symbol": "MNQ1!",
  "date": "{{timenow}}",
  "data": "{{strategy.market_position}}",
   "gtd_in_second": 1,
  "quantity": 4,
  "order_type": "LMT",
  "risk_percentage": 0,
  "price": "{{close}}",
  "tp": 0,
  "percentage_tp": 0,
  "dollar_tp": 0,
  "sl": 0,
  "dollar_sl": 0,
  "percentage_sl": 0,
  "trail": 0,
  "trail_stop": 0,
  "trail_trigger": 0,
  "trail_freq": 0,
  "update_tp": false,
  "update_sl": false,
  "breakeven": 0,
  "breakeven_offset": 0,
  "token": "lqf****",
  "pyramid": true,
  "same_direction_ignore": false,
  "reverse_order_close": true,
  "multiple_accounts": [
    {
      "token": "lq****",
      "account_id": "DEMO****",
      "risk_percentage": 0,
      "quantity_multiplier": 1
    }
  ]
}


5. Configure TradingView Webhook and Alert #

Create the TradingView Alert #

  1. Open the TradingView strategy on your chart
  2. Click Create Alert
  3. Select Strategy → Order fills
  4. Enable Webhook URL
  5. Paste the Webhook URL generated in PickMyTrade
  6. Paste the modified JSON into the alert message body
  7. Click Save to activate the alert

For detailed, step-by-step instructions with screenshots, refer to the following guide:
https://docs.pickmytrade.trade/docs/configuring-tradingview-alerts/


FAQ’s #

What is a limit order in PickMyTrade strategy automation?

A limit order lets you define the exact price where you want to enter a trade. Tradovate keeps the order pending until price reaches that level or conditions change.

What changes are required in the TradingView alert JSON?

You need to modify the generated JSON by setting order_type to "LMT", adding a price field, fixed quantity, and enabling reversal settings if needed.

What happens if the limit price is never reached?

The order stays pending until it fills, expires, or a new signal replaces it based on your configuration.

Can I use limit orders with TradingView webhook alerts?

Yes. Create a TradingView alert, enable webhook URL, paste the PickMyTrade webhook, and use the edited JSON message body.