Dollar-Cost Averaging (DCA) Dynamic Triggers and Percentages

This section follows on from the information contained in the following locations. Please read them first.


Dollar-cost averaging (DCA) can be used dynamically to buy additional amounts of a particular coin, as it decreases in value, in order to lower your average combined purchase price for the coin.
Be aware that if your DCA buys go past all the levels you set or skip any numbered levels, DCA buys will use the default un-numbered settings.


Here’s how it works:

The DEFAULT_DCA_buy_trigger_X setting determines the price point in a negative percentage, at which your buy strategy allows another DCA buy.
So if you have a coin and want to allow a DCA buy at -2%, your trigger setting should be -2.
Decimals are allowed as above; if you use less than a whole number one (1), format with a leading zero (i.e -0.50%)

The DEFAULT_DCA_buy_percentage_X setting determines the percentage amount of the DCA buy, measured by your existing coin holdings.
So if you want to buy 100% of your existing coin balance, your buy percentage would be 100.
If you want to buy 50% of your current coin balance, your buy percentage would be 50.

The following examples assume that all buying strategies are (true) and would otherwise allow the DCA buy.
You first need to setup your triggers.
You can set any number of buy_percentage amounts, but you only need to set as many as you are using with the DEFAULT_DCA_max_buy_times setting.


Buy the same number of coins each level

We will use the following as an example.

DEFAULT_DCA_buy_trigger_1 = -1.0
DEFAULT_DCA_buy_percentage_1 = 100
When the coins BT% is <= -1.0% AND your DCA strategies are true, buy 100% of current coin holdings
 
DEFAULT_DCA_buy_trigger_2 = -1.75
DEFAULT_DCA_buy_percentage_2 = 50
When the coins BT%  is <= -1.75% AND your DCA strategies are true, buy 50% of current coin holdings
 
DEFAULT_DCA_buy_trigger_3 = -2.25
DEFAULT_DCA_buy_percentage_3 = 33.33
When the coins BT%  is <= -2.25% AND your DCA strategies are true, buy 33.33% of current coin holdings
 
When no numbered levels are present, DCA buys will use the DCA default un-numbered settings
DEFAULT_DCA_buy_trigger = -3
DEFAULT_DCA_buy_percentage = 5

If no default is set, and no level specific value is found, ProfitTrailer can not complete the buy.

In the above example:
Each trigger level is defined by the number at the end of the setting string (1, 2, 3, etc…)
1 is the first time it buys in DCA, 2 is the second, etc.
Absent a specific level, the default is used. If you skip level 2, it will use the default.
The percentages in the above example show what would happen if you wanted to buy the same amount as the initial buy, for 3 times.


Let’s say for example you have NEO and your initial pairs log buy is 10 NEO coins.

the 1st DCA buys 100% of your current coin balance, 10 coins, adding 10 coins (100%), so now you own 20 coins.
the 2nd DCA buys 50% of your current coin balance, 20 coins, adding 10 coins (50%), so now you own 30 coins.
the 3rd DCA buys 33.33% of your current coin balance, 30 coins, adding 10 coins (33.33%), so now you own 40 coins.

You can go on much longer buying roughly 10 coins each time. Remember that a partial fill will throw off the future calculations.

DEFAULT_DCA_buy_percentage_1 = 100
DEFAULT_DCA_buy_percentage_2 = 50
DEFAULT_DCA_buy_percentage_3 = 33.33333333
DEFAULT_DCA_buy_percentage_4 = 25
DEFAULT_DCA_buy_percentage_5 = 20
DEFAULT_DCA_buy_percentage_6 = 16.66666667
DEFAULT_DCA_buy_percentage_7 = 14.28571429
DEFAULT_DCA_buy_percentage_8 = 12.5
DEFAULT_DCA_buy_percentage_9 = 11.11111111
DEFAULT_DCA_buy_percentage_10 = 10
DEFAULT_DCA_buy_percentage_11 = 9.09090909
DEFAULT_DCA_buy_percentage_12 = 8.33333333
DEFAULT_DCA_buy_percentage_13 = 7.69230769
DEFAULT_DCA_buy_percentage_14 = 7.14285714
DEFAULT_DCA_buy_percentage_15 = 6.66666667
DEFAULT_DCA_buy_percentage_16 = 6.25
DEFAULT_DCA_buy_percentage_17 = 5.88235294
DEFAULT_DCA_buy_percentage_18 = 5.55555556
DEFAULT_DCA_buy_percentage_19 = 5.26315789
DEFAULT_DCA_buy_percentage_20 = 5
DEFAULT_DCA_buy_percentage_21 = 4.76190476
DEFAULT_DCA_buy_percentage_22 = 4.54545454
DEFAULT_DCA_buy_percentage_23 = 4.34782609
DEFAULT_DCA_buy_percentage_24 = 4.16666667
DEFAULT_DCA_buy_percentage_25 = 4
DEFAULT_DCA_buy_percentage_26 = 3.84615385
DEFAULT_DCA_buy_percentage_27 = 3.70370370
DEFAULT_DCA_buy_percentage_28 = 3.57142857
DEFAULT_DCA_buy_percentage_29 = 3.44827586
DEFAULT_DCA_buy_percentage_30 = 3.33333333
DEFAULT_DCA_buy_percentage_31 = 3.22580645
DEFAULT_DCA_buy_percentage_32 = 3.125
DEFAULT_DCA_buy_percentage_33 = 3.03030303
DEFAULT_DCA_buy_percentage_34 = 2.94117647
DEFAULT_DCA_buy_percentage_35 = 2.85714286
DEFAULT_DCA_buy_percentage_36 = 2.77777778
DEFAULT_DCA_buy_percentage_37 = 2.70270270
DEFAULT_DCA_buy_percentage_38 = 2.63157895
DEFAULT_DCA_buy_percentage_39 = 2.56410256
DEFAULT_DCA_buy_percentage_40 = 2.5
DEFAULT_DCA_buy_percentage_41 = 2.43902439
DEFAULT_DCA_buy_percentage_42 = 2.38095238
DEFAULT_DCA_buy_percentage_43 = 2.3255814
DEFAULT_DCA_buy_percentage_44 = 2.27272727
DEFAULT_DCA_buy_percentage_45 = 2.22222222
DEFAULT_DCA_buy_percentage_46 = 2.17391304
DEFAULT_DCA_buy_percentage_47 = 2.12765957
DEFAULT_DCA_buy_percentage_48 = 2.08333333
DEFAULT_DCA_buy_percentage_49 = 2.04081633
DEFAULT_DCA_buy_percentage_50 = 2
DEFAULT_DCA_buy_percentage_51 = 1.96078431
DEFAULT_DCA_buy_percentage_52 = 1.92307692
DEFAULT_DCA_buy_percentage_53 = 1.88679245
DEFAULT_DCA_buy_percentage_54 = 1.85185185
DEFAULT_DCA_buy_percentage_55 = 1.81818182
DEFAULT_DCA_buy_percentage_56 = 1.78571429
DEFAULT_DCA_buy_percentage_57 = 1.75438596
DEFAULT_DCA_buy_percentage_58 = 1.72413793
DEFAULT_DCA_buy_percentage_59 = 1.69491525
DEFAULT_DCA_buy_percentage_60 = 1.66666667
DEFAULT_DCA_buy_percentage_61 = 1.63934426
DEFAULT_DCA_buy_percentage_62 = 1.61290323
DEFAULT_DCA_buy_percentage_63 = 1.58730159
DEFAULT_DCA_buy_percentage_64 = 1.5625
DEFAULT_DCA_buy_percentage_65 = 1.53846154
DEFAULT_DCA_buy_percentage_66 = 1.51515152
DEFAULT_DCA_buy_percentage_67 = 1.49253731
DEFAULT_DCA_buy_percentage_68 = 1.47058824
DEFAULT_DCA_buy_percentage_69 = 1.44927536
DEFAULT_DCA_buy_percentage_70 = 1.42857143
DEFAULT_DCA_buy_percentage_71 = 1.40845070
DEFAULT_DCA_buy_percentage_72 = 1.38888889
DEFAULT_DCA_buy_percentage_73 = 1.36986301
DEFAULT_DCA_buy_percentage_74 = 1.35135135
DEFAULT_DCA_buy_percentage_75 = 1.33333333
DEFAULT_DCA_buy_percentage_76 = 1.31578947
DEFAULT_DCA_buy_percentage_77 = 1.2987013
DEFAULT_DCA_buy_percentage_78 = 1.28205128
DEFAULT_DCA_buy_percentage_79 = 1.26582278
DEFAULT_DCA_buy_percentage_80 = 1.25
DEFAULT_DCA_buy_percentage_81 = 1.2345679
DEFAULT_DCA_buy_percentage_82 = 1.2195122
DEFAULT_DCA_buy_percentage_83 = 1.20481928
DEFAULT_DCA_buy_percentage_84 = 1.19047619
DEFAULT_DCA_buy_percentage_85 = 1.17647059
DEFAULT_DCA_buy_percentage_86 = 1.1627907
DEFAULT_DCA_buy_percentage_87 = 1.14942529
DEFAULT_DCA_buy_percentage_88 = 1.13636364
DEFAULT_DCA_buy_percentage_89 = 1.12359551
DEFAULT_DCA_buy_percentage_90 = 1.11111111
DEFAULT_DCA_buy_percentage_91 = 1.09890110
DEFAULT_DCA_buy_percentage_92 = 1.08695652
DEFAULT_DCA_buy_percentage_93 = 1.07526882
DEFAULT_DCA_buy_percentage_94 = 1.06382979
DEFAULT_DCA_buy_percentage_95 = 1.05263158
DEFAULT_DCA_buy_percentage_96 = 1.04166667
DEFAULT_DCA_buy_percentage_97 = 1.03092784
DEFAULT_DCA_buy_percentage_98 = 1.02040816
DEFAULT_DCA_buy_percentage_99 = 1.01010101
DEFAULT_DCA_buy_percentage_100 = 1

Make it work like V1

Here is another example:

DEFAULT_DCA_buy_trigger_1 = -1
DEFAULT_DCA_buy_trigger_2 = -1
DEFAULT_DCA_buy_trigger_3 = -2
DEFAULT_DCA_buy_trigger_4 = -3
DEFAULT_DCA_buy_trigger_5 = -5
 
DEFAULT_DCA_buy_percentage = 100

The example above will trigger at the percentages shown, assuming the buy strategies are true, and will buy 100% of the current coin holdings each time. In effect the above settings will tell the DCA to buy like the version 1.0 settings which always doubled down. Be very careful when using this type of scenario as you can quickly run out of balance.

  • dca_buying.txt
  • Last modified: 5 months ago
  • by mopon