Skip to main content

Dollar cost avg (DCA)

Double Up (DU) is a Gunbot feature to automatically average down assets, bringing down the average cost per unit when prices drop after a regular buy order.

By bringing the average price per unit down, the price to exit the trade profitably gets lower. Of course, the obvious risk of averaging down is investing more in units that already dropped in price. Use this feature carefully.


tip

Use the DU guestimator sheet to simulate your DU settings.

Feel free to make a copy of the file. Thanks Trashdog01!


How it works​

Below is an example of using Double up. The relevant settings used in the example would be:

  • DU_METHOD set to HIGHBB. With this method each DU buy is triggered when the upper Bollinger Band crosses down the last buy price.
  • DOUBLE_UP_CAP set to 1. Each DU buy is for 1:1 the amount of quote units already owned.
  • DU_CAP_COUNT set to 2. A maximum of two DU buys are allowed.
  • DU_BUYDOWN set to 1. The minimum required price difference for a DU buy compared to the buy price of the previous order.

Note that this example is kept simple intentionally, the amounts do not reflect real trades.

Using the example above: this is an overview of the buy orders made - notice how the average price per unit moves down after each DU buy:

UnitsPrice per unitInvested (cumulative)Avg Price per Unit
Buy10012.5001.250.00012500
DU Buy 110010.8002.330.00011650
DU Buy 22008.0903.948.0009870

The resulting sell order would have profitably sold all available units at a much lower price than the initial buy order:

UnitsPrice per unitProceeds
Sell40010.0004.000.000

Configurable options for averaging down are:

  • Buydown: A minimum price difference between the last buy and next DU buy. Regardless which DU method is picked, buydown must be reached for a DU buy.
  • DU method: HIGHBB as shown above, RSI where DU buys are only placed within a configurable RSI range, and a numerical value defining a percentage price drop compared to the last bought price.
  • Ratio: Defines how much extra quote units are bought for each DU buy.
  • Frequency: How many DU buy orders are allowed.
  • Trailing: DU buy orders can optionally use trailing.

danger

Double Up is a feature that allows you to invest significant amounts of your base currency. It's important to be cautious when setting the ratio and frequency, and to ensure that you have sufficient available funds.


DCA settings​

LabelConfig ParameterDefault ValueDetailed Description
Double up enabledDOUBLE_UPfalseEnables Dollar Cost Averaging (DCA), a strategy used to reduce the average buying price of a cryptocurrency by purchasing additional units at lower prices.
DU capDOUBLE_UP_CAP1Sets the ratio of the quote currency used for each DCA order relative to your existing holdings, helping to determine the scale of your DCA efforts.

For example, a setting of 1 means that each DCA order will match the amount of quote currency you currently hold, potentially doubling the investment to lower the average cost. It's advisable to set this high enough to significantly impact your average price but ensure it does not exceed your available balance.
DU cap countDU_CAP_COUNT0Limits the maximum number of DCA orders that can be executed. This parameter helps control the extent of your DCA strategy and manage risk by capping the total number of times you can average down on a declining asset.
DU buydownDU_BUYDOWN2Determines the minimum price drop (in percentage) from the last purchase that must occur before placing another DCA order.

A lower percentage can trigger more frequent buys, which may lead to a quicker reduction in the average cost but at the risk of using up more capital if the asset continues to decline.
DU methodDU_METHODHIGHBBDefines the strategy to trigger additional DCA orders. HIGHBB places orders when the upper Bollinger Band falls below the last purchase price; RSI triggers orders based on a specific RSI level; a numerical method places orders based on a set percentage below the last purchase price.

This flexibility allows you to tailor the DCA triggers to different market conditions or personal risk preferences.
DU RSI buyRSI_DU_BUY30Specifies the RSI threshold to initiate a DCA buy when using the RSI method. An RSI below this level indicates an oversold condition, suggesting a potentially advantageous point for averaging down.

This setting helps automate buying at perceived low points based on RSI, which can be crucial in volatile markets.

Overview of effects on different order types​

Config ParameterAffected Order TypesNot Affected Order Types
DOUBLE_UPDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
DU MethodDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
Double Up CapDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
DU Cap CountDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
DU BuydownDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
RSI DU BuyDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
Trail Me DUDCA buyStrategy buy, Strategy sell, Close, RT sell, Stop limit, RT buyback, RT buy
Trail Me Buy RangeStrategy buy, RT Buy, DCA buyStrategy sell, Close, Stop limit, RT sell, RT buyback