How to automate Tradingview alerts & indicators with Alert2Trade

in automated •  last year 

Intro

If you've ever traded cryptocurrency, you might be familiar with Tradingview.com, the most popular online charting service globally. It boasts millions of users and holds a strong position in the industry due to its popularity. This platform provides numerous charts for various cryptocurrencies and essential tools like indicators, which aid in determining the optimal moments for entering or exiting trades.

However, while these tools are powerful, they lack the ability to directly convert alerts into complex trades on your cryptocurrency exchange. This is where Alert2Trade comes into play. It enables you to bridge this gap by utilizing both Tradingview and Alert2Trade, allowing you to use any Tradingview indicator to create a bot that automatically executes trades when alerts are triggered. These alerts are then immediately sent to exchanges like Binance, Coinbase, or Kucoin.

How It Works:

The process is straightforward and achievable even for those with limited experience. Here's a simplified breakdown of the steps:

  1. Add your preferred Tradingview indicator (free or paid) to your account.

  2. Create a new alert by right-clicking the buy/sell icon and selecting "Create Alert."

  3. Input your trading instructions in the message box and include your Alert2Trade URL in the "Webhook" box under notifications.

Essential Components:

To get started, you'll need the following:

  1. A Tradingview Pro+ account allowing Webhook notifications, with your chosen indicator/script added.

  2. Alert2Trade.com script(s) to receive incoming webhooks.

  3. An account on Binance, Coinbase, or Kucoin to execute trades via Alert2Trade.

image.png

Setting Up Tradingview:

Sign up and subscribe to a premium Tradingview account.
Find an indicator script that suits your needs. One recommended option is the MarketGodX script by KingThies, which offers value and solid backtest results.

image.png

Setting Up Exchange API Keys:

For the Alert2Trade script to execute trades, it requires your exchange API keys. Here's how to set them up:

Access your exchange account settings to generate API keys for external applications.
Create new keys, ensuring they only have trading access, not withdrawal permissions. Test on exchange sandboxes or with a small fund amount before real trading.

image.png

Configuring Alert2Trade:

Purchase the Alert2Trade script and upload it to your web host with PHP support.
Edit the settings.php file with your exchange API keys matching the ones you generated.

image.png

Now you’ve completed all 3 steps it’s time to give the automated trading system a try. As mentioned we highly recommend using the exchange sandbox to test everything, as any mistakes could cost you money if it’s not done properly.

To create your first trading bot, open a chart on Tradingview of a coin you want to trade and that’s available on your supported exchange/pair. For this example we will be creating a bot on the BTCUSDT pair on Binance Futures. Now you will need to select a timeframe, this is where you can see how often the signals get made and also view backtest historical signal data. For this example we will be using the 4H timeframe.

Now you will need to right click on the Buy or Sell icon and select “Create Alarm”. Next you will need to configure your Settings. Make sure the ‘Condition’ is set to MarketGod Indicator with Buy or Sell. Next you will need to change the ‘Trigger’ to ‘Once every bar close’ and “Expiration” to open ended. Now name your alert whatever you like, i.e. “BTC 4H Buy Alert”.

Next comes the interesting bit, the message. This text area is where we will send the commands/orders that we want to be executed on Binance. The example below will cancel all open orders then place a limit buy order for 10% of your balance at 20% below the current price, with 10x leverage.

binance(BTCUSDT){

cancel(side=all);

limit(side=buy, amount 10%b, offset=20%, leverage=10);

}

Next we need to update the ‘Notifications’ tab, go down to the Webhook URL and change it to the URL of your Alert2Trade script. For example https://mywebhost.com/api.php?pin=123. Please note that Tradingview requires webhooks to be sent over SSL, so activating HTTPS on your webhost is needed before trading can be sent.

Now you can save your alert, every time there is a Buy signal on the 4H Binance Futures chart the order information will be sent to Binance and executed. You can now do the same but for Sell signals, so you can position yourself no matter which direction the market is going. Pretty cool huh?

image.png

Conclusion:

Utilizing Tradingview indicators with Alert2Trade can significantly simplify and automate your trading. This approach minimizes risk and enables participation in the market regardless of time or location. The costs are reasonable, and customization options abound, allowing you to tailor the strategy to your preferences. Feel free to ask questions or leave comments for further clarification!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!