iterativv / NostalgiaForInfinity

Trading strategy for the Freqtrade crypto bot
GNU General Public License v3.0
1.97k stars 487 forks source link

Synchronization Problem with Bot Transactions #373

Closed Va1b0rt closed 7 months ago

Va1b0rt commented 8 months ago

Description: Hello there!

I've been encountering a recurring issue with my bot's output. It seems that despite having three bots running – one in Dry-run mode and two connected to it as consumers – I'm experiencing discrepancies in their transaction timings. Ideally, I expect them to execute trades simultaneously or at least within a similar timeframe. However, they are entering trades with a delay of 10-15 minutes, and sometimes even missing trades altogether. Upon investigating, I suspect this may be due to the "Outdated history for pair" warning.

Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,610 - freqtrade.strategy.interface - WARNING - Outdated history for pair T/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,618 - freqtrade.strategy.interface - WARNING - Outdated history for pair TLM/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,633 - freqtrade.strategy.interface - WARNING - Outdated history for pair UNFI/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,637 - freqtrade.strategy.interface - WARNING - Outdated history for pair UNI/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,648 - freqtrade.strategy.interface - WARNING - Outdated history for pair XLM/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,664 - freqtrade.strategy.interface - WARNING - Outdated history for pair XVS/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,680 - freqtrade.strategy.interface - WARNING - Outdated history for pair ZIL/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,683 - freqtrade.strategy.interface - WARNING - Outdated history for pair ZRX/USDT:USDT. Last tick is 18 minutes old Jan 01 12:43:02 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:43:02,684 - freqtrade.worker - INFO - Bot heartbeat. PID=69558, version='2023.8.dev, strategy_version: v14.0.719', state='RUNNING' Jan 01 12:50:38 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:50:38,445 - freqtrade.strategy.interface - WARNING - Outdated history for pair 1INCH/USDT:USDT. Last tick is 15 minutes old Jan 01 12:50:38 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:50:38,449 - freqtrade.strategy.interface - WARNING - Outdated history for pair AAVE/USDT:USDT. Last tick is 15 minutes old Jan 01 12:50:38 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:50:38,453 - freqtrade.strategy.interface - WARNING - Outdated history for pair ACH/USDT:USDT. Last tick is 15 minutes old Jan 01 12:50:38 cryptomaniac.pp.ua freqtrade[69558]: 2024-01-01 12:50:38,457 - freqtrade.strategy.interface - WARNING - Outdated history for pair ADA/USDT:USDT. Last tick is 15 minutes old

Steps Taken: Initially, I dismissed this as insignificant, but it's becoming increasingly problematic. I've attempted to rectify the situation by ensuring system time synchronization, but to no avail. Additionally, I considered the possibility of hardware limitations, but with my setup boasting an Intel Xeon E3-1270v3 processor and 16GB of RAM, I believe it should be more than capable of handling this strategy.

Next Steps: I'm reaching out to seek advice and explore other potential solutions to address this issue. Any insights or alternative approaches would be greatly appreciated!

Ath3r commented 8 months ago

How many pairs have you configured in your volume pair list?

Maybe try reducing your pairlists count.

This strategy is a bit CPU intensive.

Va1b0rt commented 8 months ago

I understand that this strategy puts a strain on the processor, but the issue doesn't seem to lie with the hardware. The CPU load consistently ranges from 35% to 60%, and the RAM usage is at 70%. Thus, I doubt hardware is the culprit. Nonetheless, I'll attempt to reduce the number of pairs and will update you on the results.

iterativv commented 8 months ago

There is chance some pairs don't have volume for some minutes. If it's not overall, all pairs, then it's not connected with CPU.

Va1b0rt commented 7 months ago

I tried your recommendation and reduced the number of pairs by half, and it helped. I have completely stopped receiving the 'Outdated history' errors. I consider this issue resolved. I also want to thank everyone for their help in resolving this issue.