1. Home
  2. TradingView
  3. Pine scripts
  4. Backtester
  5. Gavin’s backtester profits vs funds

Gavin’s backtester profits vs funds

First confirm that you have the latest version of the backtester. To do that, add the backtester to a new chart layout and read the version number from the chart, left hand side. When you add the backtester it will always be the latest version so now that you know what’s the latest version number you can go to your existing chart layouts and confirm the are all using the latest version too.

In order to make sure you are getting accurate results follow these steps:

  1. Setup your DCA settings first: long/short, BO, SO, scales, etc.
  2. If you are doing a long then use QUOTE currency for BO and SO. If you are doing a short then use BASE currency.
  3. Once done with those settings check the RESULTS TABLE in the chart and check the value for “Bot allocation”. This value is in QUOTE currency. In BTC/USDT, USDT is the quote currency.
  4. Open the backtester settings and select properties
  5. Make sure that “Initial capital” has the same exact amount as the one you captured in the previous point.
  6. Make sure that “Base currency” remains as default
  7. Do not modify “Order size” or any other parameters
  8. Confirm that the “Commission” percentage matches the one your exchanges offers

Currently Gavin’s DCA backtester calculates profits for LONG and SHORT bots using QUOTE currency.

In SHORT bots, bot allocation is also calculated in QUOTE currency based on the most recent price action in the chart.

Always confirm that the profits from TradingView (bottom panel) match exactly the profits in backtester results in the chart. If they don’t match it means that the script is misconfigured and most likely all the results are wrong.

Below you can see a long and a short setup and how the profits match exactly between TV and backtester ones.

Updated on May 31, 2022

Was this article helpful?

Related Articles


  1. If we reset the backtester to default settings, will it then have the ideal quote/currency/size settings?

Leave a Comment