Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Stuck fetching pre-roll data #871

Open
boxxa opened this issue Dec 14, 2017 · 8 comments
Open

Stuck fetching pre-roll data #871

boxxa opened this issue Dec 14, 2017 · 8 comments
Labels

Comments

@boxxa
Copy link

boxxa commented Dec 14, 2017

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.

@tiagosiebler
Copy link
Contributor

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.

@brucetus
Copy link
Contributor

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.

@JimWas
Copy link

JimWas commented Dec 18, 2017

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?

@DeviaVir DeviaVir removed the question label Dec 19, 2017
@DeviaVir
Copy link
Owner

Noticed the same thing, definitely a bug.

@sergejostir
Copy link

Same thing here. Going on forever.

@boxxa
Copy link
Author

boxxa commented Dec 20, 2017

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])

@peara
Copy link

peara commented Dec 27, 2017

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

@FredMichel
Copy link

FredMichel commented Oct 11, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants