trim_tickerlist is called from load_datafile.
trim_tickerlist will throw an index out of range error when parsing a ticker json file for a timerange outside its current contents.
This patch to load_datafile checks the timerange is in the file or not handles the exception by downloading the file with complete range. If the Exchange does not have the full range a message is logged and the file not sent to ticker-parse.
In summary, is json file does not have full requested time range
1. download file
2. if still missing time range, log and continue without ticker trim.
Here is an example of the error prior to path and after patching.
This is from binannce using the pair "ZEN/BTC" and timerange "20180522-20180523"
"""
File "/Users/creslin/PycharmProjects/freqtrade/freqtrade/optimize/__init__.py", line 107, in load_data
pairdata = load_tickerdata_file(datadir, pair, ticker_interval, timerange=timerange)
File "/Users/creslin/PycharmProjects/freqtrade/freqtrade/optimize/__init__.py", line 84, in load_tickerdata_file
pairdata = trim_tickerlist(pairdata, timerange)
File "/Users/creslin/PycharmProjects/freqtrade/freqtrade/optimize/__init__.py", line 36, in trim_tickerlist
while tickerlist[start_index][0] < start * 1000:
IndexError: list index out of range
""""
"""
2018-05-31 14:08:04,680 - freqtrade.optimize - INFO - Start timerange not in cached data
2018-05-31 14:08:04,680 - freqtrade.optimize - INFO - Download the pair: "ZEN/BTC", Interval: 5m
dumping json to "/Users/creslin/PycharmProjects/freqtrade/freqtrade/tests/testdata/ZEN_BTC-5m.json"
2018-05-31 14:08:08,225 - freqtrade.optimize - INFO - Start timerange unavailable from exchange
"""
Correct instructions for calling a custom strategy file
To paraphrase the change:
Prior - to call a custom strategy -s the strategy file name within users_data/strategies/ directory
After - to call a custom strategy -s the class name within the strategy within users_data/strategies/ directory
Corrected instructions, to paraphrase the PR
prior - to call a custom strategy -s the custom strategy file name in user_data/strategies
after - to call a custom strategy -s the class name within the custom strategy file name in user_data/strategies
New versions of Docker will not start in OSX using the cmd in these instructions as /etc/localtime cannot be mounted.
The change provides an alternate command that does work.
`docker run --rm -e TZ=`ls -la /etc/localtime | cut -d/ -f8-9` -v `pwd`/config.json:/freqtrade/config.json -it freqtrade`
More info is in this thread:
https://github.com/docker/for-mac/issues/2396
Before this commit, during setup, even a default value is displayed for some config, if user doesn't enter anything, an empty value is applied.
After this commit, if user doesn't enter anything for a config with default value, the default value will be applied.