-
Notifications
You must be signed in to change notification settings - Fork 2k
Error: invalid bucket size spec: undefined #938
Comments
I'll take this.. I think it is somehow related to my PR #926. |
See PR #940 . |
…ng instances of --period to --periodLength
…ng instances of --period to --periodLength
…arwin.js genetic backtest. DeviaVir#926 DeviaVir#938 DeviaVir#940
…rs, renaming instances of --period to --periodLength
* In addition to the options on a command, there are options on strategies. There is a callback function in engine.js which sets the options as defined in a strategy. The strategy objects were not updated to have a periodSize option, only a period option. So, the periodSize attribute was not being set. This caused the execption in this bug. This commit adds a second option, named 'periodLength'. The name 'periodLength' was chosen, rather than the previous 'periodSize' for consistency; the description for the --period option already said 'period length', so it made sense that the additional variable be named that as well. Each reference to *.periodSize has been changed to *.periodLength. This commit continues PR #926. * In addition to the options on a command, there are options on strategies. There is a callback function in engine.js which sets the options as defined in a strategy. The strategy objects were not updated to have a periodSize option, only a period option. So, the periodSize attribute was not being set. This caused the execption in this bug. This commit adds a second option, named 'periodLength'. The name 'periodLength' was chosen, rather than the previous 'periodSize' for consistency; the description for the --period option already said 'period length', so it made sense that the additional variable be named that as well. Each reference to *.periodSize has been changed to *.periodLength. This commit continues PR #926 and #940. Third time is the charm :) * #926, #938, #940 - In the backtesters, renaming instances of --period to --periodLength * #926, #938, #940 - In the backtesters, renaming instances of --period to --periodLength * Added period and periodLength option, as they were expected for the darwin.js genetic backtest. #926 #938 #940 * #926, #938, #940 - In the (genetic) backtesters, renaming instances of --period to --periodLength
I'm having the exact same problem. I tried to see if I could cherry-pick some of your changes but it isn't clear which ones are bundled together. Are older releases not having this issue? |
@canselcik all my recent changes are in.. you should be able to pull the master branch, and not run into this problem. And no, older releases would not have this specific problem. |
Sounds good, thanks @haxwell. I'll give it a try right now. |
@haxwell Pulling After the changes, sure, the
Looks like
Looks like the following patch takes care of it:
and everything suddenly works. However this is clearly not the right patch, refactoring |
Yes, the present design shares state between the engine and certain commands. The problem you just found was that balance.js was not putting that state in the same place the engine expected to find it. I have submitted PR #978 to correct this. Good write-up! The ultimate solution I think will come in refactoring that state to be accessible via one object, rather than two or more as it currently is. This will be part of a unit-testing effort, issue #403. |
Are you still experiencing this problem? If not, consider closing this. |
Hi,
after last git pull i get this error when i try to start a simulation.
Lubuntu: 17.10
Error: invalid bucket size spec: undefined
at BucketSize.parse (/home/enri/gdax/zenbot/node_modules/timebucket/lib/bucket-size.js:15:21)
at new BucketSize (/home/enri/gdax/zenbot/node_modules/timebucket/lib/bucket-size.js:5:21)
at Bucket.resize (/home/enri/gdax/zenbot/node_modules/timebucket/lib/bucket.js:30:14)
at Command. (/home/enri/gdax/zenbot/commands/sim.js:84:51)
at Command.listener (/home/enri/gdax/zenbot/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (/home/enri/gdax/zenbot/node_modules/commander/index.js:653:12)
at Command.parse (/home/enri/gdax/zenbot/node_modules/commander/index.js:475:21)
at /home/enri/gdax/zenbot/zenbot.js:39:11
at /home/enri/gdax/zenbot/boot.js:24:7
at f (/home/enri/gdax/zenbot/node_modules/once/once.js:25:25)
at Glob. (/home/enri/gdax/zenbot/node_modules/glob/glob.js:151:7)
at emitOne (events.js:116:13)
at Glob.emit (events.js:211:7)
at Glob._finish (/home/enri/gdax/zenbot/node_modules/glob/glob.js:197:8)
at done (/home/enri/gdax/zenbot/node_modules/glob/glob.js:182:14)
at Glob.processGlobStar2 (/home/enri/gdax/zenbot/node_modules/glob/glob.js:637:12)
at /home/enri/gdax/zenbot/node_modules/glob/glob.js:626:10
at RES (/home/enri/gdax/zenbot/node_modules/inflight/inflight.js:31:16)
at f (/home/enri/gdax/zenbot/node_modules/once/once.js:25:25)
at lstatcb (/home/enri/gdax/zenbot/node_modules/glob/glob.js:519:7)
Thx
Enri
The text was updated successfully, but these errors were encountered: