Skip to main content

Feature highlight: automate TradingView alert scenarios, even complex ones

ยท 4 min read
@boekenbox

Welcome to a feature highlight, where we explore how you can turn Gunbot into a TradingView alert bot. In this guide, we'll dive into TradingView webhook alerts and how you could use them to automate your trading decisions, even in complex scenarios involving multiple indicators.

Let's consider a scenario where you want to receive alerts based on varying indicators, in any order of time. The end goal? You receive timely alerts for your chosen indicators, and Gunbot does the heavy lifting by placing trades once all conditions are met.

Symbol image of gunbot affiliate program

note

This guide assumes that your webhook connectivity is already configured. If you need help with this, please refer to the webhook alerts documentation. Our support team is also on hand if you have any issues.

Let's walk through it.

Step 1: Define Your Conditionsโ€‹

First things first, identify the number of buy and sell conditions necessary for your strategy. Be as specific as possible here; the more refined your conditions, the more tailored your trading approach will be.

Step 2: Configure Gunbotโ€‹

Next, head to Gunbot and add a pair with an alert strategy. Set the desired alert count and investment amount (see image below). Copy all the alerts which should look something like this:

Buy alerts:
passphrase binance customlong USDT-ETH 1 0 1
passphrase binance customlong USDT-ETH 1 0 2
passphrase binance customlong USDT-ETH 1 0 3
Sell alerts:
passphrase binance customshort USDT-ETH full 0 1
passphrase binance customshort USDT-ETH full 0 2

When creating the alerts on TradingView, these alert texts are what you should enter in the message field. One for each alert you'll create.

Gunbot alerts setup

This example uses market orders, it's also possible to use limit orders with the target price added in the alert message by using a placeholder like {{close}} (as provided by TradingView). The passphrase part of the webhook alert message refers to a passphrase you'd setup yourself in Gunbot, so that it only accepts alerts that use the expected passphrase.

Step 3: Set Up TradingViewโ€‹

Now, head to TradingView and open a chart with the asset you want to trade. Apply the indicators you plan to use for your strategy.

Step 4: Create Buy Alertsโ€‹

In TradingView, set up your buy alerts (see images below). For this example, we'll use VWAP bands and EMA crosses as our conditions - executing trades when both shorter-term EMAs cross below the longer-term EMA and the price drops below the lower VWAP band.

Buy alert 1โ€‹

TradingView buy alert 1

Buy alert 2โ€‹

TradingView buy alert 2

Buy alert 3โ€‹

TradingView buy alert 3

Step 5: Set Up Sell Alertsโ€‹

Similarly, create sell alerts for each of your conditions in TradingView (see images below). In our example, we'd set up sell orders when a short-term EMA crosses above the long-term EMA, and the price exceeds the upper VWAP band.

Sell alert 1โ€‹

TradingView sell alert 1

Sell alert 2โ€‹

TradingView sell alert 2

Step 6: Start Tradingโ€‹

Finally, make sure to save all your alerts and hit the 'Start Trading' button in Gunbot. The trading bot will now execute your trading scenario whenever all of these conditions are met! It does not matter in which sequence the alerts arrive, whenever all criteria for a buy order are fulfilled, the bot will place the buy order. (and vice versa for selling)

Wrapping It Up - Power at Your Fingertips ๐ŸŽฏโ€‹

Gunbot's integration with TradingView webhook alerts is a powerful feature that augments your trading strategies. It allows you to leverage complex scenarios involving multiple indicators without needing any coding knowledge โ€“ it's like having an additional layer of intelligence on your trades.

In essence, Gunbot makes it possible for traders to capitalize on their strategic insights without needing to code or continually monitor market conditions. ๐Ÿ˜Ž

With some initial setup, your trades can execute automatically based on your preferred indicators and conditions. It's never been easier to start making the most out of your trading opportunities!