![DCA data-driven stock trading bot](https://images.rapidload-cdn.io/spai/ret_blank,q_lossy,to_avif,w_1640,h_924/https://blog.stockhero.ai/wp-content/uploads/2022/02/crypto_trading_bot.png)
In our last article, we talked about what DCA is. DCA is Dollar Cost Averaging. Implementing DCA is a very easy process in StockHero. Although one can also do a DCA using Short strategy, for simplicity, this tutorial will focus on running a Long-only DCA strategy.
If you have not signed up with StockHero, please do so now (Sign up). There is a free 14 days trial for new users.
This tutorial will use our StockHero Web App. Users can also setup a DCA bot using our mobile apps.
StockHero offers powerful DCA features that cater to new and advanced DCA traders’ requirements.
Research The Stock
Before we start to create a DCA bot in StockHero, you need to do some research on which stock you would like to buy. After you have decided which stock to DCA, proceed to the next section.
Setting Up DCA in StockHero Web App
1. Login to StockHero
2. Click on the Create Bot button
3. Select DCA as shown in the image below
4. The DCA create bot button will appear
5. You should see your currently select brokerage as well as the list of stocks.
6. Select the stock that you want to trade.
7. In the Trade Parameters screen, allocate the fund for this DCA bot to use for buying the selected stock.
The bot will not use more than the allocated fund IF you do not check the No Limit box. For Order Type, most users will select Market. To know what is the difference between limit and market order, we recommend that you read this article. In essence, market order ensures the order is executed (filled) immediately. Since DCA traders and investors typically has a long term horizon, they usually do not mind the small price slippage that can occur with market orders.
If you would like the DCA bot to keep buying perpetually when the stock’s price keeps descending, check the No Limit box. If you do, the Fund Allocation box will be hidden since it is no longer relevant.
Per Order Amount means how much stocks to buy per order. Be sure to adjust the order amount according to the stock price. If you doing DCA on a $100+ stock, it is good to have the Per Order Amount as few hundreds.
Entry Conditions
StockHero allows you to set up the DCA entry condition based on a few factors – Time, Indicators, Buy Down and Sell Up. If you would just like to buy a stock when pay day arrives, you can select Time. However, if you would like to buy a stock only when the price decreases, you can select Buy Down. In this example, we will explain how to DCA using Buy Down.
StockHero allows you to setup the very FIRST buy when the bot is created or after the price has hit your desired price level. You can then setup the bot to buy every X% dip from last Buy price. If you set the dip interval at 2%, it means the bot will buy based on the schedule below
First buy price: 100 USD
Second buy price: 98 USD
Third buy price: 96.04 USD (2% from 98USD. not 2% from 100 USD)
The Martingale Effect
Martingale allows a DCA trader to increase the quantity of stocks to buy at each successive trade. The overall effect is that the average purchase price can be lowered substantially. Of course, this also means that capital can be used up pretty fast. So, be aware of the accelerated diminishing effect of your capital if you decide to implement Martingale.
Exiting your DCA Trade
So, after you have setup when to buy a stock, you need to set up the bot to exit. If you have a profit target for this DCA strategy, simply set it in the Take Profit section. If you would like this DCA bot to keep buying perpetually (you can always Liquidate the stock manually in StockHero), set up the No. of Extra Orders and Take Profit to zero as shown in the image below.
Conclusion
We have finished the setup of a DCA bot using long-type Buy Down strategy. As you can see, the steps to launch a DCA bot in StockHero is simple and can be done within few minutes.
For advanced DCA traders, StockHero offers Indicator based entry conditions and TradingView integration. We will leave that exercise to another day.
Happy trading.