Sending Signals - Trading View Integration

Sending Signals - Trading View Integration

For Service Providers

Tradingview Integration Webhook

Send your Signals from TradingView to Zignaly


With this integration method, Link your TradingView alerts to Zignaly using the Webhook URL option in your TradingView alert box. Set up alerts to activate your signals and automatically open positions on Zignaly. You can also apply tradingview strategy integrations & studies.

 


Check out this article for more ways to send signals: 3 ways to send your Signals to Zignaly

  1. Develop your Syntax
  2. Video
  3. TradingView Strategy alerts

 


*Please note you must have a paid TradingView account to use webhooks on their platform.
TradingView does not give access to this feature with Trial accounts

  1. Develop your Syntax

Alerts syntax example

For ENTRY

This is an example of a basic alert to send us a buy signal from your TradingView account. In JSON format:

{"key":"77713ecef07230d14d4e5ffecXXXXXXX","pair":"xrpbtc","exchange":"zignaly","type":"entry","positionSizePercentage":"20","signalId":"xrpbtc"}

The signalId is optional (only required if you are gonna send sell signals later).

 

For EXITING

It's important that the signalId matches the signalId of a previous entry signal.

{"key":"77713ecef07230d14d4e5ffecXXXXXXX","pair":"xrpbtc","exchange":"zignaly","type":"exit","signalId":"xrpbtc"}
  • Optionally, you can add a lot more parameters within the alerts. Check all the available options in our SIGNALS document.

To build your Signals Syntax, we will establish the four components: 

        • First, you need to have your Key
        • Which type of Signal
        • Mandatory parameters
        • Optional parameters

The key is what connects the signal with your service, to get your key, go to your provider page, In the edit tab you will find your key in the SignalURL (key=xxxx)

Attention! Please be sure that you don't share the URL that contains your key, anyone with that key could manage your account.

Every signal you send will need to specify the type of signal and enter this into your syntax:

"type":"entry",
"type":"exit",

As well as other options:

"type":"stop"
"type":"start"
"type":"disableMarket"
"type":"enableMarket"
"type":"panicSell"
"type":"update"
"type":"cancelEntry"
"type":"reverse"

*For more details on each Type of signal, please select click on the specific type to view the definition and conditions in our Signals article.

 

On each type you will see the mandatory fields applied to this type of Signal.
(Check in the ‘signals’ article what are the mandatory fields for each Type of Signal.)

Now we can build our Syntax off of this information:
(Key,Type, plus mandatory fields> exchange, pair,positionSizePercentage & signalId)
Lets create a Type ‘entry’ signal (Example only):

{"key":"XXXXXXX","type":"entry","exchange":"binance","pair":"ethusdt","positionSizePercentage":"10","signalId":"123"}

 

positionSizePercentage The percentage is from the configured value in the allocated balance setting. It has to be a value between 1 and 100. As always if the resulting position size is below the minimum allowed by the exchange, it will fail.

signalId An ID that you can use to identify the positions that have been opened from a specific buy signal. Later, if you want to act against those positions (selling, rebuying), you need to use the same ID.


If you would like to add additional parameters to this signal please review the other options under ‘Parameters’ on our Signals documentation. Be sure these parameters are permissible with the type of signal you are using.
Example: "orderType":"market",

Other parameter options may include: stopLossPrice, takeProfitPercentage, takeProfitAmountPercentage...

If trading futures, you will need to add 3 required parameters to this entry signal:
  • exchangeAccountType (This is required to specify futures)
  • side (You must use this field to identify a Long or Short position)
  • leverage (Enter your leverage amount, if not using enter 1)

Now let assemble our entry signal to have our final completed Syntax (Example only):

For Spot

{"key":"XXXXXXX","type":"entry","exchange":"binance","pair":"ethusdt","orderType":"market",

"positionSizePercentage":"10","signalId":"123"}

 

For Futures

{"key":"XXXXXXX","type":"entry","exchange":"binance","exchangeAccountType":"futures",

"pair":"ethusdt","orderType":"market","side":"long","leverage":"2","positionSizePercentage":"10",

"signalId":"123"}

These are examples of an entry Syntax you would enter into your Tradingview alert box
Here is a good resource recommended by the community, to use to verify
that your syntax is correct > json format: https://jsonformatter.curiousconcept.com/

Now, Link your TradingView

On your TradingView account, open the corresponding chart (example Eth/USDT on Binance) & click ‘create an alert’:


(The conditions of your alert are up to you, for simplicity, in this example, we will use a basic price crossing condition.)

In order to link your TradingView account to Zignaly you need to use the Webhook URL option in your TradingView alert box.

Check the option and enter our signal endpoint: https://zignaly.com/api/signals.php

*Something that usually makes it difficult to send signals is the format of the webhook text. The way to avoid having problems with this is:

        • Enter this link: https://zignaly.com/api/signals.php
        • Copy it directly from the browser bar, as seen in this image:
        • After that, paste it on this alert box TV webhook URL. (Do not let the browser autocomplete the field).


          This is a problem in the format of the text that we are pasting on TV, the signal goes out of TV but it does not correctly detect the url where it should be sent​  


Enter your Signal Syntax into the message field.

(If you are using pine scripts or tradingview strategy alerts we will provide some additional resources at the end of this article)


Once you have filled in your alert box click ‘Create’

When your alert is triggered your position will open on Zignaly.

 


Take a look at this quick video to view the signal being sent to your Zignaly Copytrading service:

 


TV uses your strategy entry and exit to trigger the alert instead of the alert condition like in a study.

Here is an example:

if (longCondition)
   strategy.entry("LongEntry", strategy.long ,alert_message = entry_long_message)

longCondition would be the cross that triggers the long position

entry_long_message would be the signals syntax that you would like to send to zignaly when entering a Long position


Once your alert_message is setup, you can create an alert and enter this as the message:  {{strategy.order.alert_message}}​

You can find more information in the tradingview documentation: https://www.tradingview.com/support/solutions/43000481368-strategy-alerts/

and for the place holders:
https://www.tradingview.com/support/solutions/43000531021-how-to-use-a-variable-value-in-alert/

If you need any guidance on pinescript programming here is a telegram community support group: https://t.me/pinescripters

Was this article helpful?
13 out of 20 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.