Connecting to Zapier, n8n, or Make

TradeShields provides JSON-formatted alerts that you can use to integrate with automation platforms like Zapier, n8n, and Make (formerly Integromat). These platforms allow you to create workflows for managing trades, sending notifications, or logging activity based on TradeShields alerts.


How Alerts Work

TradeShields sends alerts in a structured JSON format, triggered by specific trade actions:

  • open_long / open_short: Signals the opening of a long or short position.
  • partial_close_long / partial_close_short: Signals a partial close of an existing position.
  • close_all: Signals the full closure of all positions.
  • stop_loss_hit / trailing_stop_hit: Indicates that a stop loss or trailing stop has been hit.
  • close_at_breakeven: Indicates that a position has been closed at breakeven.

Example Alert Payloads:

  1. Opening a long position:
{
  "ticker": "AAPL",
  "action": "open_long",
  "price": 150.25,
  "quantity": 10
}
 
  1. Closing all positions:
{
  "ticker": "AAPL",
  "action": "close_all",
  "price": 152.10
}
 

Connecting to Zapier

  1. Create a Webhook in Zapier:
    • In Zapier, create a new Zap and select Webhook by Zapier as the trigger.
    • Choose Catch Hook and copy the webhook URL.

      Add the Webhook URL to TradingView:

    • Create an alert in TradingView using your TradeShields strategy.
    • Paste the Zapier webhook URL into the Webhook URL field in the alert configuration.

      Process Alerts in Zapier:

    • Use the JSON payload to set up actions in your workflow, such as:
      • Sending a notification.
      • Logging trades in a Google Sheet.
      • Triggering trade execution via your broker's API.

Example Workflow:

  • Trigger: TradeShields sends an open_long alert.
  • Action: Log the trade in a Google Sheet and send a notification to Slack.

Connecting to n8n

  1. Set Up a Webhook in n8n:
    • Create a new workflow and add a Webhook node.
    • Copy the webhook URL from the node.

      Add the Webhook URL to TradingView:

    • Create an alert in TradingView using your TradeShields strategy.
    • Paste the n8n webhook URL into the Webhook URL field in the alert configuration.

      Design Your Workflow:

    • Use the JSON payload to trigger actions, such as:
      • Placing trades via your broker's API.
      • Sending notifications through Telegram.
      • Performing conditional logic for custom workflows.

Example Workflow:

  • Trigger: TradeShields sends a stop_loss_hit alert.
  • Action: Notify your phone via SMS and log the trade in Airtable.

Connecting to Make

  1. Create a Scenario in Make:
    • Add a Webhook module to your scenario and generate a webhook URL.
    • Copy the webhook URL.

      Add the Webhook URL to TradingView:

    • Create an alert in TradingView using your TradeShields strategy.
    • Paste the Make webhook URL into the Webhook URL field in the alert configuration.

      Map the JSON Data:

    • Use the JSON fields to define actions, such as:
      • Creating a row in a database.
      • Sending an email or Slack notification.
      • Triggering automated workflows with other tools.

Example Workflow:

  • Trigger: TradeShields sends a trailing_stop_hit alert.
  • Action: Send an email summary of the trade and update a database record.

Key Tips for All Platforms

  • Test Webhooks: Use a test alert from TradingView to verify that the webhook receives data correctly.
  • Use JSON Fields: Map fields like ticker , action , price , and quantity to corresponding actions in your workflows.
  • Leverage Conditional Logic: Platforms like n8n and Make allow advanced logic for custom handling of different trade actions.

Summary

By sending structured JSON alerts from TradingView, TradeShields integrates seamlessly with Zapier, n8n, and Make. These platforms enable advanced workflows, such as notifying users, logging trades, or automating execution via APIs. With just a few steps, you can unlock powerful automation features to enhance your trading process.

Still need help? Contact Us Contact Us