stable/freqtrade
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
..
exchange Reduce verbosity of get_ticker_history 2018-05-12 20:15:59 +02:00
optimize Test if timerange in json file before trimming. 2018-05-31 22:22:51 +03:00
rpc Make telegram message beautiful 2018-05-15 13:37:34 +03:00
strategy Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00
tests Merge pull request #734 from arudov/fix/pair-downloads 2018-05-29 08:05:10 +03:00
vendor add missing import 2017-11-20 22:26:32 +01:00
__init__.py Freqtrade: ccxt release shall be called 0.17.0 2018-05-12 09:57:10 +03:00
analyze.py Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00
arguments.py Make plot_dataframe able to show trades stored in database. (#692) 2018-05-19 09:14:42 +03:00
configuration.py Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00
constants.py fix 'max_open_trades must be greater than 0' regression 2018-05-03 10:48:25 +02:00
fiat_convert.py Fix error initializing coinmarketcap 2018-05-21 20:01:41 +02:00
freqtradebot.py Fix bug pointed out in #679 2018-05-15 19:49:28 +02:00
indicator_helpers.py indicator_helpers: apply correct typehints 2018-03-20 19:48:03 +01:00
main.py set ccxt loglevel to info 2018-05-25 21:23:15 +02:00
misc.py exchange: extract ccxt init to its own function (so that we can init ccxt from the scripts) 2018-04-22 10:57:48 +03:00
persistence.py Convert exchange-name to new format 2018-05-12 13:39:16 +02:00
state.py Add a Enum class State that contains Bot running states 2018-03-03 09:33:54 +08:00