> ## Content Index
> Fetch the complete content index at: https://blog.ceyloncash.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Automating Trading View Strategy with a 3Commas DCA Bot
- URL: https://blog.ceyloncash.com/creating-dca-bot-and-getting-webhook-from-3commas/
- Published: 2021-09-19T08:59:23.000Z
- Updated: 2021-09-19T09:14:22.000Z
- Description: Found an attractive Buy Sell Alerting indicator on Trading View (Video Published on Sri Crypto Youtube Channel) and wanted to make a DCA Bot out of it and Trigger buying signals with Trading view.
- Author: Nisal Chandrasekara
- Tags: dca, 3commas, bots

**Abbreviations**

- TV - Trading View
- DCA Bot - Dollar Cost Averaging Bot

## **#Inspiration**

Found an attractive Buy Sell Alerting indicator on Trading View (Video Published on Sri Crypto Youtube Channel) and wanted to make a DCA Bot out of it and Trigger buying signals with Trading view.

## **#What it Does**

For each candle closure on TV Chart, if all conditions met for Buy, Trading view will show a "**Buy"** Alert below the candle. It will trigger a DCA Bot on 3Commas Platform and Binance account will initiate a Long Trade with 10$. 

![](https://digitalpress.fra1.cdn.digitaloceanspaces.com/tdd7bvn/2021/09/image-2.png)

Taking Profits with +0.5% price deviations. *(wanted to exit the deal ASAP)*

Ladder buying / averaging the trade starting from -1% deviation. Martingale strategy (2x) is used for Order size Multiplication and Price Deviation.

## #How I Built — TL:DR

> TLDR: Created DCA Bot with 3Commas and automated it with Trading view Script for Buy Signals. 

> Set Safety order values for 2x and Safety order steps for 2x.

**What you need?**

- Trading View Account — [https://www.tradingview.com/gopro/?share\_your\_love=Nisal](https://www.tradingview.com/gopro/?share%5Fyour%5Flove=Nisal&ref=blog.ceyloncash.com)

[Join me on TradingView, this place is awesome.TradingView Premium Account![](https://www.tradingview.com/static/images/favicon/apple-touch-icon-180x180.png)TradingView![](https://www.tradingview.com/static/images/logo-preview.png)](https://www.tradingview.com/gopro/?share%5Fyour%5Flove=Nisal&ref=blog.ceyloncash.com)

- 3Commas Account — [https://3commas.io/?c=Bot](https://3commas.io/?c=Bot+House&ref=blog.ceyloncash.com)+House

[3Commas - Crypto Trading Bot Automated Altcoin/Bitcoin Platform✔ 3Commas Crypto Trading Platform - Smart tools for cryptocurrency investors ✔ Useful information about smart trading and crypto trading bots ✔![](https://3commas.io/assets/favicon-e94c7cbd5562d5433a6b7a0d37385cd08d79ade4a2fa815bfb110eea019fce37.ico)3Commas![](https://3commas.io/img/og_image.jpg)](https://3commas.io/?c=Bot+House&ref=blog.ceyloncash.com)

*Above links will help you to obtain some* ***discounts*** *on platforms and I would get a small commission from the platform.*

### **#Adding Script / Indicator**

- First You have to have an Indicator which supports alerts on Trading View. you can try the below script if you like.

*Script should have *Alert Conditions* option enabled.(This is a must for setting Alerts on Trading View)*

[SRI Strategy (Tweaked - CMNisal) — Indicator by NisalMix of few indicators to Identify buying and selling alerts. RSIBollinger BandsIchimoku Cloud![](https://www.tradingview.com/static/images/favicon/apple-touch-icon-180x180.png)TradingView![](https://s3.tradingview.com/q/QKU1G51J_big.png)](https://www.tradingview.com/script/QKU1G51J-SRI-Strategy-Tweaked-CMNisal/?ref=blog.ceyloncash.com)

- You can click on the Add to Favorite Scripts button on the indicator’s page.

![](https://cdn-images-1.medium.com/max/1600/1*W80m5pzTW4d8KQpHGO8PDw.png)

Add to Favorite Scripts

- Add the indicator to the desired chart.

![](https://cdn-images-1.medium.com/max/1600/1*ObsvuJOR_-p1UOVUB2X8Uw.png)

Add to your chart

### #Creating DCA Bot and Getting Webhook from 3commas

- Create a 3Commas DCA Bot / Copy from exiting bot link.

[https://3commas.io/bots/6032553/shared\_show?secret=076db2dff1](https://3commas.io/bots/6032553/shared%5Fshow?secret=076db2dff1&ref=blog.ceyloncash.com)

- Don't forget to set the deal start condition as "**Trading view custom Signal"**

![](https://digitalpress.fra1.cdn.digitaloceanspaces.com/tdd7bvn/2021/09/image-9.png)

- Scroll down and Find the "**Message for Deal Start Signal"**

![](https://digitalpress.fra1.cdn.digitaloceanspaces.com/tdd7bvn/2021/09/image-4.png)

- Copy the JSON (marked in red) and head back to Trading view. *(Clicking JSON will copy content to clipboard)*

### #Creating Alert with Trading View

- Select the desired symbol on Trading View and let’s start Adding Alerts (Alt+A)

![](https://cdn-images-1.medium.com/max/1600/1*dFnsET_6Gvq0NucqmW-J5A.png)

- When Adding the alert for indicator, Select the Condition you want. In this case we will get the **Long Entry** as Alert Condition.
- These points are Important when you're setting up the alerts. Check the Screenshot below.

 \- Options - **Once per Bar Close** for Avoiding false signals

 \- Webhook URL - paste the link: **[https://3commas.io/trade\_signal/trading\_view](https://3commas.io/trade%5Fsignal/trading%5Fview?ref=blog.ceyloncash.com)**

 \- Tick Webhook URL

 \- Message - Paste the JSON you copied from the 3Commas Deal Start condition.  

![](https://digitalpress.fra1.cdn.digitaloceanspaces.com/tdd7bvn/2021/09/image-5.png)

##   
Vola! Your Bot should be Starting deals with Buy Alerts. 

### *Now you can just sit back and watch.*  😉

## #P.S.

If you want to be alerted when a new deal starts, you can setup below options.

- Connect Telegram with 3Commas.
- Notify on Trading View.
- Pop up on Trading view.
- [Connect Blockchain Whispers Portfolio Feature + Telegram from site.](https://blockchainwhispers.com/premium/61047?ref=blog.ceyloncash.com)

## References -

**3Commas**

- [Read more about 3Commas TV custom signals](https://help.3commas.io/en/articles/3108938-how-to-use-tradingview-custom-signals?ref=blog.ceyloncash.com)

**Telegram Communities** 

- Bot House - [t.me/BotHouse](https://t.me/BotHouse?ref=blog.ceyloncash.com)
- CMNisal - [t.me/CMNisal](https://t.me/CMNisal?ref=blog.ceyloncash.com)
- Crypto Room Hourly - [t.me/CryptoRoomHourly](https://t.me/CryptoRoomHourly?ref=blog.ceyloncash.com)

**Youtube**

- CMNisal - [https://www.youtube.com/cmnisal](https://www.youtube.com/cmnisal?sub%5Fconfirmation=1&ref=blog.ceyloncash.com)
- Sri Crypto - [https://www.youtube.com/c/SriCrypto](https://www.youtube.com/c/SriCrypto?ref=blog.ceyloncash.com)