Webhooks & API

How to Construct JSON for Simultaneous Buy and Sell Signals in TradersPost

Learn how to construct JSON for simultaneous buy and sell signals in TradersPost and optimize your strategy using TradingView alerts or Pine Script.

Tom Hartman

Marketing

3 Min Read Reviewed by Mike Christensen Fact-checked by Mike Christensen
BluSky — The Future of Trading. Prop firm futures trading. Sign up at BluSky.pro.
Update history
  1. Correction

    Traders ask whether one alert can signal two tickers, so the guidance now covers batch signals, more JSON fields, every valid action, and one-at-a-time orders at Interactive Brokers.

Traders often encounter scenarios where they need to send simultaneous buy and sell signals for different stocks. For example, closing a position in one ticker while opening a position in another. This guide explains how to construct JSON alerts for such cases in TradingView and how TradersPost processes them for seamless execution. Besides ticker and action, the alert JSON can also carry optional fields such as sentiment, quantity, price, time, and interval1.

Key Concept: One Ticker per Signal

Each signal names one ticker, so the simplest setup is one alert per ticker. With Allow batch signals on in your strategy settings (the default for new strategies; older strategies must turn it on), one webhook request can instead carry a JSON list of up to five signals, each processed as its own signal and in no guaranteed order2. For example:

  • Ticker A (Sell Signal): Close an open position.
  • Ticker B (Buy Signal): Open a new position.

Steps to Set Up Alerts

1. Create Alerts in TradingView

To use separate alerts, create one for each ticker.

  1. Open the chart for Ticker A (e.g., TQQQ) and set up a sell alert:
  2. {
       "ticker": "TQQQ",
       "action": "sell"
    }
  3. Open the chart for Ticker B (e.g., SQQQ) and set up a buy alert:
  4. {
       "ticker": "SQQQ",
       "action": "buy"
    }

Besides buy and sell, the action field also accepts exit, reverse, breakeven, cancel, add, and resize3.

2. Trigger Alerts Simultaneously

Both alerts will trigger at the same time if your TradingView strategy aligns the conditions for both signals concurrently. TradersPost will receive and execute both alerts simultaneously, except at Interactive Brokers, which processes one order at a time per account4.

Using Indicators Instead of Strategies

For faster signal responsiveness:

Benefits of Using Indicators:

  • Faster signal triggering.
  • Greater flexibility for sending custom alerts.

Key Takeaways

  1. Separate Alerts or One Batch: Each ticker can have its own alert, or one alert can send up to five signals when Allow batch signals is on.
  2. Simultaneous Execution Supported: TradersPost processes alerts concurrently if received at the same time, except at Interactive Brokers, which processes one order at a time per account4.
  3. Pine Script Pairing: Use programmatic alerts for precise control over simultaneous signals.
  4. Indicator Conversion: Consider using indicators for faster signal response.

Conclusion

Constructing JSON for simultaneous buy and sell signals in TradersPost is straightforward with separate alerts for each ticker, or with one batch alert. By leveraging TradingView’s alert system or custom Pine Script configurations, you can ensure seamless execution of complex trading strategies. With TradersPost’s robust platform, your signals are processed efficiently, enabling precise and timely trading actions.

References

1 docs.traderspost.io, TradingView
2 docs.traderspost.io, Signal Message Reference
3 docs.traderspost.io, Signal Template Creator
4 docs.traderspost.io, Interactive Brokers

  • Webhooks & API Sep 16, 2026

    Resize Open Position Webhook Explained

    Learn how the resize webhook action sets your target position size and lets TradersPost calculate the difference order automatically.

  • Webhooks & API Sep 16, 2026

    Batch Signals: Five Trades in One Webhook

    Learn how batch signals let one webhook request carry up to five signals, when to use them, and how validation works before you go live.

  • Video
    Webhooks & API Nov 18, 2025

    Are JSON Properties Case Sensitive?

    JSON properties in TradersPost are case sensitive. Users should copy property names directly from the documentation to ensure correct formatting and avoid execution errors.

  • Webhooks & API Sep 3, 2025

    TradersPost vs Capitalise AI Comparison

    Comprehensive broker API comparison: access requirements, rate limits, and integration capabilities for automated trading.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

TradersPost operates as a non-custodial automated trading platform, enabling users to connect alerts from their preferred trading platforms to their selected brokerage or exchange accounts. It abstains from the transmission, custody, or management of customer funds, covering both traditional and cryptocurrency assets. Typically, registration requirements set by regulatory entities such as the SEC, FINRA, or FinCEN apply to entities that hold or transmit customer funds. To ensure ongoing compliance, TradersPost regularly engages with regulatory authorities to confirm its adherence to all relevant local and federal laws.

TradersPost does not provide alerts, signals, research, analysis, or trading advice of any kind. It is designed to assist traders and investors in making their own trading decisions based on their alerts. The platform does not offer recommendations regarding securities to buy or sell, nor does it provide trading or investing advice. The platform and its features, capabilities, and tools are provided 'as-is' without any warranty.

Risk Disclosure: The use of automated trading systems involves inherent risks, including the potential for significant financial loss. These systems operate based on predetermined algorithms that may not fully adapt to changing market conditions, possibly making them unsuitable for some investors. Individuals are advised to thoroughly assess their financial situation and risk tolerance before using this platform.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

Broker, exchange, trading platform, company names, product names, service marks, trademarks, and logos appearing on this website are the property of their respective owners and are used solely to identify supported connections and technical compatibility. TradersPost is an independent third-party platform and is not affiliated with, endorsed by, sponsored by, or authorized by any of these organizations unless expressly stated. Technical compatibility does not imply a commercial partnership, sponsorship, endorsement, or authorization. See Important Disclosures for trademark information.

© 2026 TradersPost, Inc. All rights reserved.