Dave-Vallance / bt-ccxt-store

Fork of Ed Bartosh's CCXT Store Work
MIT License
423 stars 187 forks source link

Fix that significantly improved live datafeed #54

Open viper7882 opened 2 years ago

viper7882 commented 2 years ago

Hi @Dave-Vallance and user of bt-ccxt-store,

In the event you've noticed the live datafeed while using bt-ccxt-store is slow after it switched from HISTORICAL state to LIVE state, I share the same sentiment with you.

After spending a couple of hours in front of screen debugging into it, I've managed to root cause the issue and made a fix that significantly improved live datafeed @ PR4. Basically the fix is to selectively load _fetch_ohlcv only when it is required and when _fetch_ohlcv is running, it will always look forward for next date instead of from the previous date.

Unfortunately, I've also made other changes on top of my branch and unable to pull request directly into Dave's branch. Hence I'm leaving the fix as it is @ PR4. Anyone (including Dave) interested could feel free to pick it up and use it.

Thank you for your attention and happy trading.