Commit Graph

1661 Commits

Author SHA1 Message Date
creslin
ba31c809cb
avoid list index out of range in trim_tickerlist
trim_tickerlist is called from load_datafile. 
 trim_tickerlist will throw an index out of range error when parsing a json file for a timerange outside its contents.
This patch to load_datafile checks the timerange is in the file or not handles the exception as:
 - first time hit: 
---- Return None existing code will try to download file/timerange from exchange
 - second time hit: 
---- Log that the exchange does not have the timerange requested 
---- Bypass trim_tickerlist function to avoid triggering the index out of range function 

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
"""
2018-05-31 14:33:22 +03:00
creslin
491aaef73c
Update __init__.py 2018-05-31 12:14:19 +03:00
creslin
2600e189bd
Add USDT to the list of fiat currencies
USDT is common many exchanges and treated as a currency. 
It is helpful to allow USDT to be accepted as a fiat current when testing config.json
 
By way of example of a usecase
A strategy or otherwise report may not query:  config['stake_currency'] and currency = config['fiat_display_currency']
as the config.json with fail test, so cannot build  a base/pair such as BTC/USDT that is valid will not be built cleanly. 

Pulling BTC/USDT from config values can be useful to download query ticker file name and data, enumerating base/pair price to whitelist target pairs, performing correlation coefficient statistics etc.

As example: building a dataframe such as here 
           date       BTC/USDT      ETH/BTC          XLM/BTC        LTC/BTC
0    1517443200       10283.00       0.109475       0.000052       0.016031

The transposing to actual USDT ticker value row-wise per pair
               date  BTC/USDT   ETH/USD   XLM/USD     LTC/USD
1517443200  10283.00   1125.731425  0.535950  164.846773
2018-05-30 10:42:51 +03:00
creslin
280e8b3208
Update backtesting.md - correct instructions
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
2018-05-26 20:14:33 +03:00
creslin
607c895065
Update backtesting.md: how to call a custom strat
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
2018-05-26 20:09:20 +03:00
Samuel Husso
e267b84510
Merge pull request #741 from pan-long/setup-defaults
Auto apply default values in setup.
2018-05-23 10:24:22 +03:00
Pan Long
c7ef69f4eb Auto apply default values in setup.
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.
2018-05-22 22:09:52 +08:00
Michael Egger
13d6297b9f
Merge pull request #711 from gcarq/pyup-update-ccxt-1.14.24-to-1.14.27
Update ccxt to 1.14.27
2018-05-20 10:31:27 +02:00
pyup-bot
65c069dd9f Update ccxt from 1.14.24 to 1.14.27 2018-05-20 06:41:38 +02:00
Samuel Husso
b0536dba0b
Merge pull request #709 from gcarq/pyup-update-ccxt-1.14.10-to-1.14.24
Update ccxt to 1.14.24
2018-05-19 09:15:02 +03:00
peterkorodi
0c051b1b7a Make plot_dataframe able to show trades stored in database. (#692)
* Show trades stored in db on the graph
2018-05-19 09:14:42 +03:00
pyup-bot
16eb793081 Update ccxt from 1.14.10 to 1.14.24 2018-05-19 06:56:37 +02:00
Samuel Husso
1cc132afe2
Merge pull request #695 from gcarq/pyup-update-ccxt-1.13.148-to-1.14.10
Update ccxt to 1.14.10
2018-05-17 08:23:32 +03:00
Samuel Husso
d985405fe7
Merge pull request #683 from xmatthias/fix_get_real_amount
Fix get real amount
2018-05-17 08:22:34 +03:00
pyup-bot
e88fabe1d6 Update ccxt from 1.13.148 to 1.14.10 2018-05-17 00:26:32 +02:00
Samuel Husso
7f1f1ec1ad
Merge pull request #688 from gcarq/pyup-update-pandas-0.22.0-to-0.23.0
Update pandas to 0.23.0
2018-05-16 08:37:38 +03:00
pyup-bot
8094f84efe Update pandas from 0.22.0 to 0.23.0 2018-05-16 05:16:24 +02:00
Matthias Voppichler
ef78f2f03a Add test for invalid order_fee dict 2018-05-15 20:13:43 +02:00
Matthias Voppichler
a1fa688da0 Add tests for the new scenario 2018-05-15 19:49:47 +02:00
Matthias Voppichler
263bf918b1 Fix bug pointed out in #679 2018-05-15 19:49:28 +02:00
Samuel Husso
58a2af8d80
Merge pull request #678 from arudov/fix/get-balance
Fixed bot crash while requesting the current balance
2018-05-15 18:10:02 +03:00
Samuel Husso
594b541f34
Merge pull request #680 from gcarq/pyup-update-ccxt-1.13.147-to-1.13.148
Update ccxt to 1.13.148
2018-05-15 18:07:16 +03:00
pyup-bot
cc3e4e9aa7 Update ccxt from 1.13.147 to 1.13.148 2018-05-15 16:41:31 +02:00
Janne Sinivirta
d74a0f0526
Merge pull request #677 from gcarq/pyup-update-coinmarketcap-5.0.1-to-5.0.3
Update coinmarketcap to 5.0.3
2018-05-15 17:39:37 +03:00
Anton
d112d90e8e Make telegram message beautiful 2018-05-15 13:37:34 +03:00
Michael Egger
2383a83c2d
Merge pull request #675 from gcarq/pyup-update-ccxt-1.13.142-to-1.13.147
Update ccxt to 1.13.147
2018-05-15 12:36:27 +02:00
pyup-bot
c2245362da Update coinmarketcap from 5.0.1 to 5.0.3 2018-05-15 08:41:22 +02:00
pyup-bot
c96f912043 Update ccxt from 1.13.142 to 1.13.147 2018-05-15 01:11:29 +02:00
Anton
f175f48418 Fix get balance functionality 2018-05-15 00:31:56 +03:00
Janne Sinivirta
6cc8017943
Merge pull request #670 from gcarq/flakify-scripts
Scripts: fix syntax errors and flake8ify
2018-05-14 08:42:11 +03:00
Samuel Husso
e0bd45efab Scripts: fix syntax errors and flake8ify 2018-05-14 08:08:40 +03:00
Samuel Husso
f80864b5bc
Merge pull request #668 from gcarq/pyup-update-ccxt-1.13.138-to-1.13.142
Update ccxt to 1.13.142
2018-05-14 07:14:18 +03:00
pyup-bot
9a09e6b815 Update ccxt from 1.13.138 to 1.13.142 2018-05-14 03:26:26 +02:00
Michael Egger
91f90920c2
Merge pull request #665 from xmatthias/fix_fiat_convert
Fix fiat convert
2018-05-13 22:37:01 +02:00
Matthias Voppichler
8549201502 add test for new fiat_convert logic 2018-05-13 20:46:02 +02:00
Samuel Husso
0665a23b0f
Merge pull request #663 from gcarq/pyup-update-ccxt-1.13.136-to-1.13.138
Update ccxt to 1.13.138
2018-05-13 21:27:01 +03:00
Matthias Voppichler
b1c53ec656 refactor "patch_coinmarketcap" to conftest"
add patch_coinmarketcap to get_patched_freqtradebot
2018-05-13 20:04:40 +02:00
Matthias Voppichler
790f35a5c8 fix test which resets singleton without reinstating it 2018-05-13 20:03:54 +02:00
Matthias Voppichler
3246c60472 Fix coinmarketcap ticker 2018-05-13 20:00:38 +02:00
Matthias Voppichler
57fc9df5f3 Fix typo 2018-05-13 19:54:19 +02:00
Matthias Voppichler
144be37a9a Convert ID to string 2018-05-13 19:53:23 +02:00
Matthias Voppichler
9b8f90dc9f log error in find_price 2018-05-13 19:50:04 +02:00
Matthias Voppichler
d07491ceb2 Dynamically load cryptomap 2018-05-13 19:46:08 +02:00
pyup-bot
14c140d242 Update ccxt from 1.13.136 to 1.13.138 2018-05-13 16:26:25 +02:00
Michael Egger
263d34ae82
Merge pull request #660 from xmatthias/fix_hyperopt_testfluke
Fix testfluke in hyperopt
2018-05-13 14:51:27 +02:00
Matthias Voppichler
8f17b11610 Fix testfluke in hyperopt 2018-05-13 13:38:29 +02:00
Samuel Husso
177962fa05
Merge pull request #657 from gcarq/pyup-update-ccxt-1.13.133-to-1.13.136
Update ccxt to 1.13.136
2018-05-13 10:23:34 +03:00
pyup-bot
d51ac94662 Update ccxt from 1.13.133 to 1.13.136 2018-05-13 05:41:24 +02:00
Samuel Husso
40dfe4b3a9
Merge pull request #655 from xmatthias/dev_reduce_verbosity
Reduce verbosity of get_ticker_history
2018-05-12 22:20:08 +03:00
Matthias Voppichler
8b098859f4 Reduce verbosity of get_ticker_history 2018-05-12 20:15:59 +02:00