cyberjunky / freqtrade-cyber-bots

Freqtrade bot helpers and strategies
MIT License
12 stars 8 forks source link

dca_strategy does not make trades #9

Closed scubix closed 2 weeks ago

scubix commented 3 months ago

Trying backtests with all sorts of stretegies, the dca_strategy does not make any trades while all other strategies I currently test do:

2024-05-23 13:10:19,831 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2023-12-03 07:30:00 up to 2024-05-21 11:30:00 (170 days).
2024-05-23 13:10:28,713 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy DCAStrategy
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Version - Base Strategy: '1.6.0'
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Running with stoploss configuration: '{}'
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Running with leverage configuration: '{}'
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Version - DCA Strategy: '1.7.0'
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Running with trading direction(s): 'long'
2024-05-23 13:10:28,713 - freqtrade.strategy - INFO - Running with bo:so: '1:1'
2024-05-23 13:10:28,713 - freqtrade.strategy.hyper - INFO - No params for buy found, using default values.
2024-05-23 13:10:28,713 - freqtrade.strategy.hyper - INFO - No params for sell found, using default values.
2024-05-23 13:10:28,714 - freqtrade.strategy.hyper - INFO - No params for protection found, using default values.
2024-05-23 13:10:28,730 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2023-12-03 07:30:00 up to 2024-05-21 11:30:00 (170 days).
2024-05-23 13:10:30,146 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/backtest-result-2024-05-23_13-10-30.meta.json"
2024-05-23 13:10:30,148 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/backtest-result-2024-05-23_13-10-30.json"
2024-05-23 13:10:30,164 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/.last_result.json"
.....
=============================================== LEFT OPEN TRADES REPORT ===============================================
|   Pair |   Entries |   Avg Profit % |   Tot Profit USDT |   Tot Profit % |   Avg Duration |   Win  Draw  Loss  Win% |
|--------+-----------+----------------+-------------------+----------------+----------------+-------------------------|
|  TOTAL |         0 |           0.00 |                 0 |           0.00 |           0:00 |     0     0     0     0 |
================================================== ENTER TAG STATS ===================================================
|   TAG |   Entries |   Avg Profit % |   Tot Profit USDT |   Tot Profit % |   Avg Duration |   Win  Draw  Loss  Win% |
|-------+-----------+----------------+-------------------+----------------+----------------+-------------------------|
| TOTAL |         0 |           0.00 |                 0 |           0.00 |           0:00 |     0     0     0     0 |
==================================================== EXIT REASON STATS =====================================================
|   Exit Reason |   Exits |   Avg Profit % |   Tot Profit USDT |   Tot Profit % |   Avg Duration |   Win  Draw  Loss  Win% |
|---------------+---------+----------------+-------------------+----------------+----------------+-------------------------|
|         TOTAL |       0 |           0.00 |                 0 |           0.00 |           0:00 |     0     0     0     0 |
================================= SUMMARY METRICS =================================
No trades made. Your starting balance was 10000 USDT, and your stake was unlimited.
===================================================================================

Backtested 2023-12-03 07:30:00 -> 2024-05-21 11:30:00 | Max open trades : 32
================================================================= STRATEGY SUMMARY =================================================================
|    Strategy |   Entries |   Avg Profit % |   Tot Profit USDT |   Tot Profit % |   Avg Duration |   Win  Draw  Loss  Win% |              Drawdown |
|-------------+-----------+----------------+-------------------+----------------+----------------+-------------------------+-----------------------|
|   SMAOffset |      1198 |           1.20 |          5016.982 |          50.17 |       13:06:00 |   821     0   377  68.5 | 3176.979 USDT  18.96% |
| DCAStrategy |         0 |           0.00 |             0.000 |           0.00 |           0:00 |     0     0     0     0 |        0 USDT   0.00% |
====================================================================================================================================================
amargedon commented 3 months ago

That's correct! The DCA strategy is meant to be used as base for derived strategies and provides a base framework to work with.

I'm using it in several (private) strategies, and these strategies provide the trade entry and exit conditions/logic.

amargedon commented 2 weeks ago

I've added, and will be updating with changes, some example file for a strategy and the config file. That should help understand the logic in a better way.