TradingView Alerts

SignalStack can capture the incoming alerts from TradingView and convert them into executed orders in the connected brokerage or cryptocurrency exchange account automatically.

In this documentation, we will explore steps to bridge TradingView alerts with SignalStack for automated order execution:

Let's get started 🚀

Setup Webhook Notification

Step 1: Sign in to your TradingView account and open the TradingView chart you want to set up the webhook alert for.

image1.png

Step 2. Click on the "Alerts" icon at the top of the chart, navigate to the “Notifications”, and select Webhook URL from the dropdown as the notification method.

image3.gif

Step 3: Copy the webhook address generated in SignalStack, with respect to the connected broker or exchange, and paste it into the "Webhook URL" as shown below.

image4.png

Create TradingView Alert

Step 1: Navigate to the Settings tab and start creating the alert by specifying the values in the following fields:

Fields Comments
Condition Specific set of criteria or rules that, when met, trigger the alert.
Trigger Set frequency is whether an alert will be triggered only once or multiple times.
Expiration An alert will be automatically turned off when the Timer expiration setting is reached.
Alert Name Enter the alert name to display when the alert will be triggered
Message A message formatted in JSON containing information on the event to trigger when the defined conditions are met. For example:

{ "
symbol": "AAPL",
"action": "buy",
"quantity": 123
}

image2.png

For more information, please refer to this TradingView documentation - TradingView alerts

When TradingView generates the alerts upon the fulfillment of the specified conditions, the real-time notifications are triggered and sent to SignalStack via the Webhook connection configured.

SignalStack will automatically convert the signals into executed orders in your connected brokerage or cryptocurrency exchange account.


Create TradingView Alert Using A Strategy

To set up TradingView Strategy Alerts using SignalStack you only need to create a single alert. This strategy generates various order actions, and by using the dynamic order variable {{strategy.order.action}}, these actions are seamlessly integrated. When an alert is triggered in TradingView, it corresponds to the specific order action dictated by the strategy, and this alert is automatically sent to SignalStack. This process ensures that the alert you receive matches the order action recommended by the strategy.

Example....

{
"symbol": "AAPL",
"action": "{{strategy.order.action}}",
"quantity": 1
}

Tv5.PNG

In this example, we are utilizing the SuperTrend Strategy.  This strategy produces various order actions.  Therefore, I will only need to create one alert, and use the dynamic order variable {{strategy.order.action}}.


Conclusion

There are two different methods for setting up your TradingView Alerts with SignalStack

1) Alert - one alert per order action.  Where each alert is dedicated to each specific order action. This means you'll set up separate alerts for "buy," "sell," "sell short," and "buy to cover." Each of these alerts will be configured individually to respond to the corresponding action as dictated by your trading strategy. This method provides distinct alerts for each type of trade action, allowing for more tailored and specific responses to different market conditions or strategy signals.

{
"symbol": "AAPL",
"action": "buy",
"quantity": 1
}

2) Strategy Alert - you will create just one alert that can handle various order actions. This means that instead of setting up multiple alerts for each type of action (like buy, sell, sell short, etc.), you only set up a single alert. The specific order action – whether to buy, sell, or something else – is determined by the trading strategy you are using. This approach streamlines the alert process, ensuring that the correct action is taken based on the strategy's recommendation, all through a single, versatile alert.

{
"symbol": "AAPL",
"action": "{{strategy.order.action}}",
"quantity": 1
}

2a) Strategy Alert With Dynamic Position Sizing - If your strategy includes dynamic position sizing, then you can utilize the dynamic order variable {{strategy.order.contracts}}.

{
"symbol": "AAPL",
"action": "{{strategy.order.action}}",
"quantity": "{{strategy.order.contracts}}"
}

It is important to remember that while TradingView will autofill the Message box, you must change this message to match the formatting required by SignalStack.  When setting up your TradingView Alerts, you have two approaches.

  1. Individual Alerts for Each Order Action: Set up multiple alerts, with each alert dedicated to a specific order action. This involves creating separate alerts for actions such as "buy," "sell," "sell short," and "buy to cover." Each alert is configured to respond only to its designated action, providing tailored responses to different market conditions or signals from the trading strategy.
  2. Strategy Alert with a Single Alert: Create a single alert that can handle various order actions. This alert adapts to the order action (like buy, sell, sell short, buy to cover) as recommended by your trading strategy. It's a streamlined approach where one alert is versatile enough to cover all types of trade actions dictated by the strategy.

The choice between these methods depends on how you want to manage your alerts in response to the signals from your trading strategy.




Aug 21, 2024

Contact Us

Not finding what you're looking for? Contact Us Directly