QnzLAMBONE

DCA Calculator

QnzLAMBONE Updated   
Dollar Cost Averaging (DCA) is a strategy used to invest fixed amounts of money over given time intervals. It is typically used to grow an asset over time, while also reducing the risk that comes with volatility of the market.

This script was made to help make it easier to calculate Take Profit (%) when using Safety Orders on 3Commas. By using safety orders you can average down your initial investment which in turn brings down your Profit Target. A couple of the settings should look familiar if you've used 3Commas Bots before.

Input Settings

  • Bot Type: Select whether you are using a "Long" or "Short" bot.

  • Entry Price: Set this to your positions initial Entry Price.

  • Take Profit (%): Set this to the profit percent you are targeting.

  • Base Order Size: Order amount of your initial Entry.

  • Safety Order Size: Order amount of your first Safety Order.

  • Price Deviation (%): Step in percent from your initial order. This will be the deviation % of your first safety order

  • Safety Trades Count: Total number of safety orders to be used. Max value is currently 10.

  • Volume Scale: Volume of each additional safety order is multiplied by this value.

  • Step Scale: Step between each additional safety order is multiplied by this value.

  • Trading Fee (%): A fee is applied for each order that gets placed, then the total of those fees is added to the Take Profit (%). The trading fee depends on your exchange, but is typically between (0.1 to 0.15%).

  • Manual Safety Orders: For the manual safety orders, the checkbox will enable that specific safety order. You can set the "Entry Price" and "Order Size" of each one individually.
Release Notes:
  • Updated to Pinescript V5
  • Removed Trading Fee setting, as this indicator should really be used to estimate where to place your next safety trade rather than simulate a 100% accurate position with trading fees. Besides it just adds unnecessary complication to the simple math of the script.
  • Adjusted how the safety order price's get calculated, previously they were being calculated from the last safety order, now all safety orders are calculated from the initial base order price. But you probably won't even see a difference in functionality.
Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?