All Collections
Get Started
Indicators and Triggers
Using TradingView Signals with Coinrule
Using TradingView Signals with Coinrule

How TradingView signals work on Coinrule

Oleg Giberstein avatar
Written by Oleg Giberstein
Updated over a week ago

How TradingView Triggers Coinrule's Actions

There are several ways TradingView Signals can interact with rules.

Signal and action

When using an indicator or a script to directly buy or sell a coin, the rule will only carry out buys or sells and will execute whenever the indicator or script produces a signal.

When using this, you need to connect the Webhook URL and input it in the "Message" section on TradingView

- "buy" or "sell" plus the provided token, when using an indicator
- "{{strategy.order.action}}" plus the token when using a strategy script

When you are ready to launch the rule, you can paste the provided data into the TradingView alert.

Signals and Coinrule IFTTT logic

In this situation, you can select TradingView Signals along with Coinrule's logic and conditions. This provides another layer of customization to your rules.

This setup could be used to buy a coin using an indicator, or a script, and then sell it using one of Coinrule's conditions. This is ideal for when you want to set a take-profit or stop-loss on your rule without having to rely on the script or indicator to trigger and sell.

Buy Signal and Sell Signal

Another unique aspect of Coinrule's TradingView integration is being able to set up both buy and sell triggers within the same rule. Both indicators and scripts can be used for buy and sell orders that will trigger one after the other.

This results in only one trade open at a time, with buy and sell orders opening sequentially.

Note: It is key to remember that the coin selected on the “Action” block within Coinrule will determine what coin your rule will trade.

Indicators and Scripts

You can access TradingView indicators and scripts by selecting the "Indicators and Strategies" Icon on the bar at the top of the screen.

Using the "Search" function, you can find your chosen indicator, for example, MACD or Bollinger Bands. Alternatively, you can search for a script, such as, Coinrule's "Buy the Dips".

As shown in the image above, a script will have the green and red, up and down arrows next to the name. An Indicator will have an "Fx" icon next to the name.


You can use Indicators such as RSI, MACD, Bollinger Bands and all other TradingView Indicators with Coinrule. You can specify the values of the indicator that will activate the signal.

Using the image below as an example, you can set the indicator to produce a signal when RSI is approaching overbought and is greater than 65. Once the indicator value has been met, a buy or sell signal will be produced which will trigger your rule.


Scripts are complete strategies that contain both buy and sell signals. Scripts can incorporate several indicators and conditions and produce a signal when the conditions are met. This will produce either a buy or sell signal depending on how the script is set up. Once this signal is produced it will trigger the action within your rule and the trade will be executed.

Below is an image of Coinrule's Maximised Moving Average Crossing script.

TradingView has the largest trading community in the world. Traders post new strategies every day, you can find the best trading scripts available on TradingView here.

How to Setup Indicators and Scripts

The first step is to set up your rule on Coinrule with your chosen configuration.


If your signal is originating from an indicator and you want the rule to buy and sell from the signals, you can create two separate alerts - one for buying and one for selling.

The "message" section has to contain "buy" or "sell" before the token to specify what signal will trigger what action of the rule.

Here is an example :

"Buy vQyKV28VBtekitH97KR_m4pB", use this for the message in the alert that will trigger the buy order.

"Sell vQyKV28VBtekitH97KR_m4pB", use this for the message in the other alert that will trigger the sell order.


You can run advanced trading strategies now on Coinrule, connecting them to TradingView scripts. That only requires a single alert, which will automatically define when it's time for buying and selling.

Once you have selected your script from the "Indicators and Strategies" menu, you will select the "Alerts" icon and then "Create Alert" Icon.

After choosing your script you will then paste the "Message" and "Webhook URL" you receive from Coinrule when launching your rule into the "Message" and "Webhook URL" boxes on TradingView.

You can use "{{strategy.order.action}}" in the "message" section before the token. 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”.

Here is an example of what you would insert into the "Message" box when using a script :

"{{strategy.order.action}} KOYeZeW3teghCNLG1htMm5j8"

Once you have completed this, your rule will be trading using TradingView Signals!

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.


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.

Did this answer your question?