How to Setup Your Rule Using TradingView Signals
Step 1: Create Rule on Coinrule
To create your rule using TradingView signals, the first step is to set up your rule on the create rule page. See example
Step 2: Launch Rule
Once you are done entering the rule's conditions and you are ready to launch the rule. Click 'launch'. After clicking, 'launch' a pop-up opens with settings for TradingView - this provides the Webhook URL and Message. Do not launch the rule again yet as we need to copy and paste these details when creating the TradingView alert. See image
Step 3: Open TradingView
Once you open TradingView, select the Coin pairing and Exchange being used in your rule on Coinrule.
It is important to note that your TradingView Signal can either originate from an Indicator or Script.
If your signal is originating from an Indicator and you want the rule to buy and sell from the signals, you will create two separate alerts - a buy alert and a sell alert.
If your TV signal is originating from a Script, it is important to note that it only requires a single alert, which will automatically define when it's time for buying and selling. TradingView scripts will automatically buy and sell coins depending on the signal they receive. When a buy or sell is signaled, the script will automatically generate the text “buy” or “sell”.
Step 4: Name Alert
Let's create a strategy an alert using an indicator.
Next, select "Create Alert" icon on TradingView and choose your preferred settings/indicator and then name your Alert. See image
Step 5: Paste Message Into Alert
Once your Alert has been named, the next step is to enter the message. The "message" section has to contain "buy" or "sell" before the token to specify what signal will trigger what action of the rule. Copy and paste the message from Coinrule into the alert. See message from Coinrule:
When using a strategy Script, here is an example of what you would insert into the "Message" box:
"{{strategy.order.action}} 8xf6XNhVSG3sVsQ89s1cQeY-"
When using an Indicator, replace {{strategy.order.action}} with "Buy" for the buy signal alert and "Sell" for the sell signal alert. Here is an example :
"Buy 8xf6XNhVSG3sVsQ89s1cQeY-", use this for the message in the alert that will trigger the buy order. See image:
OR
"Sell 8xf6XNhVSG3sVsQ89s1cQeY-", use this for the message in the other alert that will trigger the sell order.
Step 6: Copy and Paste Webhook URL from Coinrule into TradingView
When creating your tradingview alert, click the 'Notifications' icon right next to 'Settings'. On the notifications tab, copy and paste the webhook URL from Coinrule into the TV alert and select "Create". See images:
Copy here
Paste here
Step 7: Launch Rule on Coinrule.
Once the TV alert has been created, go back to Coinrule to launch your rule.
Once you have completed this, your rule will be trading using TradingView Signals!
See illustration to create an alert originating from an Indicator here:
See illustration to create an alert originating from an Script here:
Watch this full tutorial about connecting a TradingView script
Important: It is important to note that if you believe your rule does not work even if strategy signals are being sent from TradingView, the first step will be to double check the Alert log on TradingView and confirm what message TradingView is sending. For example, if the message is {{strategy.order.action}} ABCD
, TradingView should send either buy ABCD
or sell ABCD
. Also long ABCD
or short ABCD
would work. However, when using TradingView strategies or scripts users more often than not usually omit to replace the {{strategy.order.action}}
variable and as a result, rules are not triggered as expected in such cases.
Troubleshooting
In some cases, it may happen that TradingView does not send an alert promptly as you may expect. The most common reason is that alerts and signals work differently in live market conditions than on historical data. You can read more about the topic here.
Create your rules with TradingView signals today with Coinrule.