Merge branch 'develop' of https://github.com/freqtrade/freqtrade into develop

This commit is contained in:
Paul D. Mendes 2020-05-13 00:32:46 +04:00
commit 87d9388a9c
5 changed files with 18 additions and 9 deletions

View File

@ -65,7 +65,7 @@ docker-compose up -d
#### Docker-compose logs #### Docker-compose logs
Logs will be written to `user_data/freqtrade.log`. Logs will be written to `user_data/logs/freqtrade.log`.
Alternatively, you can check the latest logs using `docker-compose logs -f`. Alternatively, you can check the latest logs using `docker-compose logs -f`.
#### Database #### Database

View File

@ -20,7 +20,7 @@ It applies a tight timeout for higher priced assets, while allowing more time to
The function must return either `True` (cancel order) or `False` (keep order alive). The function must return either `True` (cancel order) or `False` (keep order alive).
``` python ``` python
from datetime import datetime, timestamp from datetime import datetime, timedelta
from freqtrade.persistence import Trade from freqtrade.persistence import Trade
class Awesomestrategy(IStrategy): class Awesomestrategy(IStrategy):
@ -59,7 +59,7 @@ class Awesomestrategy(IStrategy):
### Custom order timeout example (using additional data) ### Custom order timeout example (using additional data)
``` python ``` python
from datetime import datetime, timestamp from datetime import datetime
from freqtrade.persistence import Trade from freqtrade.persistence import Trade
class Awesomestrategy(IStrategy): class Awesomestrategy(IStrategy):

View File

@ -387,12 +387,19 @@ class Hyperopt:
trials = json_normalize(results, max_level=1) trials = json_normalize(results, max_level=1)
trials['Best'] = '' trials['Best'] = ''
trials['Stake currency'] = config['stake_currency'] trials['Stake currency'] = config['stake_currency']
trials = trials[['Best', 'current_epoch', 'results_metrics.trade_count',
'results_metrics.avg_profit', 'results_metrics.total_profit', base_metrics = ['Best', 'current_epoch', 'results_metrics.trade_count',
'Stake currency', 'results_metrics.profit', 'results_metrics.duration', 'results_metrics.avg_profit', 'results_metrics.total_profit',
'loss', 'is_initial_point', 'is_best']] 'Stake currency', 'results_metrics.profit', 'results_metrics.duration',
trials.columns = ['Best', 'Epoch', 'Trades', 'Avg profit', 'Total profit', 'Stake currency', 'loss', 'is_initial_point', 'is_best']
'Profit', 'Avg duration', 'Objective', 'is_initial_point', 'is_best'] param_metrics = [("params_dict."+param) for param in results[0]['params_dict'].keys()]
trials = trials[base_metrics + param_metrics]
base_columns = ['Best', 'Epoch', 'Trades', 'Avg profit', 'Total profit', 'Stake currency',
'Profit', 'Avg duration', 'Objective', 'is_initial_point', 'is_best']
param_columns = list(results[0]['params_dict'].keys())
trials.columns = base_columns + param_columns
trials['is_profit'] = False trials['is_profit'] = False
trials.loc[trials['is_initial_point'], 'Best'] = '*' trials.loc[trials['is_initial_point'], 'Best'] = '*'
trials.loc[trials['is_best'], 'Best'] = 'Best' trials.loc[trials['is_best'], 'Best'] = 'Best'

View File

@ -104,6 +104,7 @@ class RPC:
'ticker_interval': config['ticker_interval'], 'ticker_interval': config['ticker_interval'],
'exchange': config['exchange']['name'], 'exchange': config['exchange']['name'],
'strategy': config['strategy'], 'strategy': config['strategy'],
'forcebuy_enabled': config.get('forcebuy_enable', False),
'state': str(self._freqtrade.state) 'state': str(self._freqtrade.state)
} }
return val return val

View File

@ -649,6 +649,7 @@ def test_backtest_start_timerange(default_conf, mocker, caplog, testdatadir):
assert log_has(line, caplog) assert log_has(line, caplog)
@pytest.mark.filterwarnings("ignore:deprecated")
def test_backtest_start_multi_strat(default_conf, mocker, caplog, testdatadir): def test_backtest_start_multi_strat(default_conf, mocker, caplog, testdatadir):
patch_exchange(mocker) patch_exchange(mocker)