zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Stuck fetching pre-roll data

Open boxxa opened this issue 8 years ago • 8 comments

When starting using crossover_vwap, the bot never actually starts.

node zenbot.js trade gdax.BTC-USD --strategy=crossover_vwap

I have over 500 hours of data in my cloud environment and running other strategies but this one seems to be stuck. Simulations run fine.

If i go into the trade.js file and remove the days variable and set it to 1, it runs right away. Maybe a bad calculation I will try to calculate some debug logs.

boxxa avatar Dec 14 '17 22:12 boxxa

What are your other parameters? I believe the default needs 108 periods before it has enough data to start, so no signals will happen. Though that shouldn't prevent it from starting at all though, just means you won't see buy/sell signals until the indicators start appearing.

tiagosiebler avatar Dec 15 '17 11:12 tiagosiebler

Recently gdax has been taking much longer than it previously was. It now takes maybe at least 5x as long to gather the same amount of data in days. I don't know if this is due to gdax limiting getting trade history, or just due to the very high volume recently coming into gdax and other exchanges which would be causing much more data to be created.

brucetus avatar Dec 17 '17 09:12 brucetus

I have 687+ hours fetched and it just doesn't move on from pre-roll data from gdax. Have tried period=120m. Anyone using this successfully on gdax?

JimWas avatar Dec 18 '17 23:12 JimWas

Noticed the same thing, definitely a bug.

DeviaVir avatar Dec 19 '17 10:12 DeviaVir

Same thing here. Going on forever.

sergejostir avatar Dec 20 '17 01:12 sergejostir

The days calculation fails on trade.js. https://github.com/carlos8f/zenbot/blob/master/commands/trade.js#L313

For some reason, it is returning NaN when doing the calculation. To get past it until I can look at it more, change this line to what you need. 1 day should work but if you are trading a larger period, you need to make it bigger. https://github.com/carlos8f/zenbot/blob/master/commands/trade.js#L335

Current var backfiller = spawn(path.resolve(__dirname, '..', zenbot_cmd), ['backfill', so.selector, '--days', days])

Fix var backfiller = spawn(path.resolve(__dirname, '..', zenbot_cmd), ['backfill', so.selector, '--days', 1])

boxxa avatar Dec 20 '17 01:12 boxxa

Mine also stuck fetching for days when running strategy crossover_vwap. I found out that a min_periods need to be specified. Correct:

 ./zenbot.sh trade --paper --strategy=crossover_vwap --min_periods=100

peara avatar Dec 27 '17 05:12 peara

The days calculation fails on trade.js. https://github.com/carlos8f/zenbot/blob/master/commands/trade.js#L313

For some reason, it is returning NaN when doing the calculation. To get past it until I can look at it more, change this line to what you need. 1 day should work but if you are trading a larger period, you need to make it bigger. https://github.com/carlos8f/zenbot/blob/master/commands/trade.js#L335

Current var backfiller = spawn(path.resolve(__dirname, '..', zenbot_cmd), ['backfill', so.selector, '--days', days])

Fix var backfiller = spawn(path.resolve(__dirname, '..', zenbot_cmd), ['backfill', so.selector, '--days', 1])

I changed the settings as you mentioned and I noticed that backfill is running in pre-roll phase. However, trade command does not take into account the pre-roll data then signals are not computed (yet?). I use a period of 1h . I will wait one additional day to see whether signals are fired. For information, it happened with Binance exchange.

FredMichel avatar Oct 11 '21 15:10 FredMichel