Skip to main content
DCA bots: Backtesting

Wondering how you can Backtest strategies that you would like to use with your bots? Read on!

Updated this week

Backtesting is a method for testing the effectiveness of a strategy and its parameters on historical price movement data. During the process, a trader can check how a strategy performed in the past, helping them decide whether to use that strategy in the future. The results provide a graphical representation of the strategy's transactions, a list of those transactions, and a set of statistical parameters that assist in making further decisions and optimizing the parameters.

⚠️ Important Note

  • Backtesting is available on the following exchanges:

    • Binance Spot

    • Binance US

    • Binance USDT-M

    • Binance USDT-M (EEA)

    • Bybit Spot

    • Bybit USDT Perp

    • OKX Spot

    • KuCoin Spot

    • Kraken Spot

    • Gate.io Spot

    • Gate.io USDT Futures

  • If you upgrade from the Trial Pro Plan to a paid Pro subscription, your backtest limits do not reset immediately. Your usage will continue from the remaining backtests in your current cycle.

Backtesting Limits per Plan

The Backtesting feature has monthly usage limits based on your subscription plan:

  • 🟢 Pro Plan: 10 backtests per month

  • 🔵 Expert, Asset Manager, and Custom Plans: 100 backtests per month


How to Access the Backtest Option

To use the Backtest feature, ensure you have enabled BETA mode.

Steps to Enable BETA Mode:

  1. You must enable the BETA testing mode to use our new DCA launcher!
    Go to the Settings page and enable Beta-testing for this tool:

  2. Navigate to the DCA bot launcher.

  3. Look for the Backtest option within the configuration settings.

By enabling BETA mode, you can test your strategies with historical data for better insights and decision-making!


How to set up Backtesting

Step 1: Set Up Your DCA Bot

Before you begin backtesting, you must configure your DCA bot's parameters. This includes setting up the strategy parameters such as:

  • Base order size

  • Safety order size

  • Max safety orders count

  • Take profit (%)

  • Price deviation to open safety orders

Once the DCA bot is configured, you are ready to move forward to backtesting.

Step 2: Navigate to the Backtesting Feature

  1. Go to the section labeled Backtest.

  2. Choose the test period by selecting from the predefined options (3M, 6M, 9M, 1Y) or set a custom range.

  3. Click the Proceed Backtest button to begin.

Step 3: Running the Backtest

Once the backtest is initiated, you will see a progress bar indicating that the system is processing your request.

You can cancel the backtest during this period by clicking the Cancel button (shown as a small icon on the right of the progress bar). If canceled, you need to wait for one minute before you can initiate a new backtest.

Important

Canceling a backtest while it is still processing will still count toward your monthly limit. Be mindful when starting a test to avoid using up attempts unnecessarily.

During the backtest calculation, users can modify the parameters in the DCA form. In this case, there are two possible scenarios:

  1. Cancel and Restart: Users can cancel the ongoing backtest by clicking the Cancel button, then wait for one minute before clicking Refresh Backtest to start a new test with the updated parameters.

  2. Wait for Completion: Users can wait until the current backtest is completed. Once finished, two buttons will be available:

    • Show Details: To view the results of the completed backtest.

    • Refresh Backtest: To start a new backtest with the updated parameters.

If an error occurs during the backtest, you will receive a message to try again in 1 minute.

Step 4: Viewing Backtest Results

Once the backtest is complete, you will see the Show details button. Clicking on this will display detailed information about your backtest performance.

The details provided will include:

  • PnL (Profit and Loss): The net profit or loss from your strategy, based on all closed trades during the backtesting period. It represents the difference between total profits and losses. The calculation is relative to the maximum possible amount the bot could have used during the backtest.

  • Fees: The total transaction costs incurred during backtesting, including all commissions and exchange fees.

  • Volume: The total amount of assets traded throughout the backtesting period.

  • MDD (Maximum Drawdown): The greatest decline in the portfolio's value from its highest point to the lowest, showing the worst-case loss during a specific period.

  • MFD (Maximum Floating Drawdown): The largest drop in portfolio value during an open position, highlighting how much unrealized loss occurred before it recovered.

You can view the graphical representation of these trades on the chart.

Step 5: Interpreting the Chart

Each buy or sell point is marked with an icon:

  • Buy: Green

  • Sell: Red

When you hover over these icons, you’ll get additional information about the trade, such as the base order, safety order, take profit (TP), and stop loss (SL) levels.

The chart shows two main sections:

  1. Price movement of the asset: This part of the chart shows the asset’s price action and your bot’s buy/sell points.

  2. Cumulative PnL: The bottom section shows your strategy's performance over time, indicated by the change in PnL.

Step 6: Reviewing the Overview & Logs

The next important element of the backtest is the statistics that are generated from the test. Users can view a downloadable table that summarizes the transaction results based on historical data. Here are the key parameters in the table and their meanings:

  • PnL/ROI: The profit or loss made during the backtesting period, shown in both dollar value and percentage. ROI is calculated based on the investment blocked or potentially used by the bot.

  • Win Rate: The percentage of successful trades out of the total trades made.

  • Average win trade: The average profit gained from successful trades.

  • Average loss trade: The average loss from unsuccessful trades.

  • Max. Drawdown: The largest decrease in your account's balance from a peak value before any recovery, showing the potential risk.

  • Max. Floating Drawdown: The largest drop in portfolio value during an open position, highlighting how much unrealized loss occurred before it recovered.

  • Sortino Ratio: A measure of risk-adjusted performance, showing how well the strategy performed with downside risk taken into account.

  • Sharpe Ratio: Another risk-adjusted performance metric that shows how well the strategy performed considering the overall volatility of returns.

  • Standard deviation: A statistical measure that shows the variability in the returns during the backtest.

  • Deals closed: The total number of trades or transactions completed during the backtest.

  • Max. safety orders used: The maximum number of times the strategy averaged the price (using safety orders) within a single trade.

  • Average trade duration: The average time that each trade remained open.

  • Max. trade duration: The longest time a single trade was kept open during the backtest.

  • Total fees: The overall transaction costs, including any commissions or exchange fees.

Trade Logs

Users can also view detailed logs of all trades conducted during the backtest. These logs will include:

  • Date and time: The exact date and time the trade occurred.

  • Pair: The trading pair involved (e.g., ETH/USDT, BTC/USDT).

  • Type: The nature of the trade (e.g., Long or Short)

  • Price: Average Buy/Sell Price

  • Volume: The amount traded in the transaction.

  • PnL: The profit or loss made of the deal

  • MFD: The largest drop in portfolio value during an open position, highlighting how much unrealized loss occurred before it recovered.

Step 7: Exporting Results

After reviewing the results, you can download the backtest overview and logs by clicking the Export Overview/Export Logs button at the top right. This will allow you to save your test results for future reference.


FAQ

1️⃣ Where do we get the candle data?

The historical price data used for backtesting is obtained directly from the exchange, not from TradingView.

2️⃣ When does the backtest limit reset?

Backtest limits reset 30 days after your subscription starts or renews, not on a fixed date for all users.

3️⃣ Fees displayed and fee tier assumption

The "Fees" displayed during backtesting currently use the exchange's default fee rates. Real fees are only collected after the exchange fills an order in most cases. This may change in a future update to reflect the actual exchange fee tier level.

4️⃣ What are the current restrictions?

  • Maximum Deals per Pair: 3

  • Maximum Pairs in a Multi-Pair Bot: 10

Did this answer your question?