mikekonan / exchange-proxy

exchange-proxy
GNU General Public License v3.0
110 stars 32 forks source link

Issue with large startup_candle_count #38

Open dnuno89 opened 2 years ago

dnuno89 commented 2 years ago

Hello, I'm having an issue when using startup_candle_count > 800. I really don't need that much candles, but my strategy works on 5m and 1h candles, so to have 100 1h candles I have to set a minimum of 100*12 5m candles. However, I've found that the number or candles in my dataframe varies unexpectedly when using this proxy. To check it, I'm printing the length of both 5m and 1h dataframes at the beginning of the populate_indicators() function.

When I'm not using the proxy, the length of the 5m candles is always a number near but higher than startup_candle_count, and the number of 1h candles is near the number of 5m candles divided by 12. For example, for startup_candle_count = 801 I'm getting 999 5m candles and 83 1h candles.

When I'm using the proxy, for startup_candle_count = 700 this behavior is the same, but if I use 800 or more startup candles, then the length of the 1h candles becomes near but higher than startup_candle_count, and the number of 5m candles is that multiplied by 12 (so around 10000). For example, with the proxy enabled, for startup_candle_count = 801 I'm getting 11995 5m candles and 999 1h candles, while for startup_candle_count = 700 I'm getting 999 5m candles and 83 1h candles.

When this happens, I'm also getting this error for each time new candles are received (this uses startup_candle_count = 801):

...
2022-02-22 14:32:28,367 - freqtrade.data.converter - INFO - Missing data fillup for ALGO/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,447 - freqtrade.data.converter - INFO - Missing data fillup for VET/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,474 - freqtrade.data.converter - INFO - Missing data fillup for XRP/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,501 - freqtrade.data.converter - INFO - Missing data fillup for IMX/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,510 - freqtrade.data.converter - INFO - Missing data fillup for QRDO/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,519 - freqtrade.data.converter - INFO - Missing data fillup for ARKER/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,563 - freqtrade.data.converter - INFO - Missing data fillup for TLOS/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,590 - freqtrade.data.converter - INFO - Missing data fillup for ZEC/USDT: before: 620 - after: 999 - 61.13%
2022-02-22 14:32:28,684 - freqtrade.data.converter - INFO - Missing data fillup for EOS/USDT: before: 620 - after: 999 - 61.13%
...

This latter error seems to me that refers to the 1h data (based on the 999 length).