Recent updates to Gavin’s DCA Backtest

We’ve been on a mission to squash bugs and improve the original backtester, Gavin’s DCA Backtest. In this article we’ll go through some of the latest updates in more detail so you can follow along what’s happening if you’ve missed the emails and announcements.

New Deal Start Conditions

At the beginning of 2022 3Commas added additional Deal Start Condition (DSC) presets. We were quick to follow and added the new technical indicator presets to the backtester and the 3c Sim indicator, namely BB%B, MACD, Parabolic SAR, SMA crosses & Heikin Ashi candles. They are all using the preset values available in 3commas.

3commas:

Backtester:

Then 3commas added support for RSI-14, yay! Not only the quicker RSI-7. They also added an option to select Less Than, Greater Than, Crossing Up or Crossing Down. Finally some more granular settings.

New advanced settings

Next up the focus was on the Advanced settings in the bot setting page:

  • Don’t start deal(s) if the daily volume is less than (Volume in BTC)
  • Minimum price to open deal
  • Maximum price to open deal
  • Cooldown between deals
  • Open deal & stop (not implemented into the backtester)
  • Close deal after timeout

The minimim volume to start deal was a bit hard to grasp as a user. Where can I find this information? The tooltip provided some cryptic information. Why is it in BTC? Oh, it’s the latest 24 hours volume. You can find this information on CoinMarketCap but it isn’t easily available to view on the chart. So we created an indicator that does exactly this -> visualises the min volume traded in BTC for the last 24 hours. See the indicator TTP Volume in BTC and the article about the indicator.

Minimum and maximum price to open a deal is easy to understand and was added along with the cooldown and timeout feature. Important to note is that the duration is calculated in bars and not by time duration.

Fees are often overlooked when reviewing a strategy but also very important. Are your quick scalping results being eaten up by the fees? Not accounting for the correct fees might result in the backtester exiting a trade when the bot in reality might have just missed the exit since 3c adds fees on top of your take profit, or vice versa. Now we’re in the nitty gritty details of under the hood implementation of how the TradingView strategy or 3commas calculates fees. We have increased the accuracy by including the fees in the DCA Settings in the indicator and not only the Strategy settings, but some additional minor tweaking is required to get it completely ironed out. We’re working on an upcoming update that tweaks the fees further.

Updated results table

We also updated the results table to make it smaller and more condensed, we moved up some relevant data to be on the same row and updated the wording on some items to make it more clear or compact. No need to take up valuable space on the chart if we don’t have to. We now also find APR in there so you can gauge the expected yearly result from the current setup.

Accuracy of the deal start condition

As a general advice we’ve always recommended users to use the 5 min or 15 min chart when backtesting. It’s a good compromise between accuracy and available historic data. Since we always want to combat the annoying repainting issues we can have on TradingView indicators we’re always using past data that only uses closed bars on all timeframes used (read: security calls for you who know pine). This causes a delay of at least 1 bar of the current timeframe when waiting for the bar to close and confirm the data.

Since we now have the backtester to backtest on past data and 3c Sim signal to use the latest up to date data to create signals from the same settings we find in the backtester; we’re now able to make the compromise to allow the backtester to only work on past data and therefore skip the bar delay. This should in theory increase the accuracy of the backtester on higher timeframes too. But extensive testing and review should be done to verify such a claim.

These are a good representation of why we always said to use a lower timeframe with the old implementation. The offset from the actual deal start was pushed one bar. IE on 5 min chart it was pushed just 5 minutes. 15 min TF = delayed 15 minutes and on 4 h = delayed 4h. Now it’s starting at the same bar regardless of timeframe (as long as you don’t use a higher timeframe on chart than you have in the DSC).

We’re always on the lookout for improvements, fixes and ideas. If you find anything please let us know! Do you want to dig in further and want to chat directly with me about it? Then you can either book a call for 1-on-1 discussions or hook me up on discord in the channel #dca-backtest.

You can gain access to TTP Gavin’s DCA Backtest or 3cSim Signal indicators by joining TTP via Patreon or TTP website.

Was this article helpful?