stable/freqtrade/optimize
creslinux 13662d4e11 Test if timerange in json file before trimming.
trim_tickerlist throws an index out of range error when parsing a json file for a timerange outside its current contents.
This patch test for that condition and returns the the file as-is with a log warning to refresh-cache  on fail

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 22:01:07,060 - freqtrade.configuration - INFO - Parameter --timerange detected: 20180522-20180523 ...
2018-05-31 22:01:07,060 - freqtrade.configuration - INFO - Parameter --datadir detected: freqtrade/tests/testdata ...
2018-05-31 22:01:13,168 - freqtrade.optimize - WARNING - start timerange for ZEN/BTC not in cache, to update cache use
2018-05-31 22:01:13,168 - freqtrade.optimize - INFO - --refresh-pairs-cached. *Nb The coin may be newer to the exchange
"""
2018-05-31 22:22:51 +03:00
..
__init__.py Test if timerange in json file before trimming. 2018-05-31 22:22:51 +03:00
backtesting.py Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00
hyperopt.py Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00