DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.22k stars 2.04k forks source link

Allow to backfill in batch/parallel many selectors & to continue to fill them in real-time #1155

Open firepol opened 6 years ago

firepol commented 6 years ago

Use case: I want to analyze/backfill/run rimulator several cryptos on several exchanges. All the time I have to manually backfill every selector.

1) I would like to configure a list of my favorite selectors e.g. in the conf.js as follows:

c.favorite_selectors = gdax.BTC-USD, gdax.ETH-USD, binance.TRX-BTC, binance.ADA-BTC

2) I'd like to run a script or a command (an .sh script came first to my mind) that, for each of my favorite selectors will run a zenbot instance in background to backfill, with the possibility (command line argument) to specify how many days in the past. The result for 10 favorite selector would be 10 zenbot instances running at the same time, imagine if you specify 365 days to backfill an entire year.

I'm not sure if it's a good idea to run many zenbot instances at the same time to do this (every node instance takes memory) so I was thinking about the third idea, to have just one instance of zenbot that runs many tasks in parallel, as follows.

3) as mentioned above, I'd like to run only one instance of zenbot with a new option called "custom" (I initially thought "monitor", but "custom" would allow to extend this).

"Custom" means we can add new options in the future, e.g. just auto-backfill X amount of days, or run similarly to --paper_trading but for all favorite currencies at the same time, ability to activate alarms (to be notified via configured notifiers) on special triggers etc. we can think to make it easy to develop more features for such an option.

For now I see only backfill and later configure triggers and send alarms.

DeviaVir commented 6 years ago

I think personally it would be pretty cool to have this set up in a way that gekko has as well, with separate workers on different strats/different pairs. The level of effort to get that is not even that far away, I might take a stab at this in the near future for the fun of it.