Tradingview integration

Buy, sell, DCA or partially close with Tradingview alerts

Tradingview has an advanced alerts system that you can use to send emails, notifications and a lot more to external parties. One of these applications is sending data via a webhook connection to StalexBot. This allows you to utilize Tradingview functionalities, but execute the buying, selling and DCAing in your StalexBot account.

How to setup a Tradingview webhook to StalexBot?

There are currently 3 types of triggers that can be activated by Tradingview webhooks in StalexBot. You can trigger the signal for one specific pair, for all open positions (for selling or DCAing) or all coins in your coin selection.

The base setup

Place a webhook tile in the desired location in your strategy. In this base setup, we would use a webhook tile as a buy signal.

Trigger a specific pair

The first option is to make a webhook for a specific pair. In this example, we want to buy BTC/USDT when it hits my trendline on Tradingview.

First I will select the right trigger for this. Hover over the webhook tile and click to edit.

Here the webhook URL and alert message becomes visible. We have to use these in our alert setup on Tradingview. Here's how it looks on Tradingview:

I have selected 'Less than' as my operator, because I want to buy when BTC is just below the trendline. The webhook URL is copied from the StalexBot webhook tile. Keep in mind this URL is different for every new webhook tile you create.

In the message, that I copied from StalexBot too, I have edited the pair to the specific pair I want to buy, namely: "BTC/USDT".

This is in a nutshell how to install a webhook tile for a specific coin.

Trigger all open positions

If you want one webhook signal to for example close all open positions, or DCA all open positions, you can use this option.

An application could very well be that you want to close all open positions when BTC/USDT breaks below an important trendline and you expect your coins to go down as a result too. The setup is similar to the specific coin trigger, just the alert message is different. Copy it exactly from the webhook editor.

Trigger all selected pairs

This option triggers the path the webhook tile is in to check for all pairs in your coin selection if it should act or not. Also if you have automatic coin selection turned on, it will check the path for all these selected coins.

Last updated