(10-05-2018, 04:51 AM)Piff_Sara Wrote:(07-19-2018, 11:30 PM)mark.sch Wrote: This is a limitation of the Web UI version. The CLI version works as you expect it to work - with db historDoes the CLI also download automatically time windows that are not present in the db? For example, I started to run a live trading today (5-10-2018) with a strategy that needs a warm up of 10 days, using 1Day candles. In my database i only got data from 1-09-2018 till 1-10-2018 (hence 4 days are missing). Does the CLI automatically download the 4 missing days up to the 5th of October?
If it's just a few minutes before, I know it fetches them on the fly and stitches the datasets together. Haven't tried it with more than that. What you should do instead is:
1) In your config, under the importer settings, modify the dates so that you have at least the previous 10 days up to now. Note that times are in UTC, so you need to make sure the hours on the end date are properly offset compared to your local date (for instance, since I'm UTC+3, I need to offset by subtracting 3 hours from my local time).
2) Make sure, in your config, that the candleWriter is set to "enabled: true". Otherwise, it will fail when trying to stitch the datasets. Not sure why this is, but it's useful overall, since the setting allows it to record history while it's trading.
3) Run the import first:
Code:
node gekko --config your-config.js --import
Code:
node gekko --config your-config.js
Some extra tips:
- Because you're writing the candles, you're essentially importing when trading, so if you ever need to restart the process, you'll already have the db up to date.
- If you're running on a Linux machine through an SSH session, note that node will stop when you exit the terminal session. To make your command run outside of any sessions, run it with nohup like this:
Code:
nohup node gekko --config your-config.js &
- To stop a nohup process, first check for node processes like this:
Code:
ps aux | grep node
Code:
kill 22104
Code:
killall -9 node
Hope that helps!