Merge branch 'freqtrade:develop' into develop

This commit is contained in:
Robert Roman 2021-09-27 11:35:34 -05:00 committed by GitHub
commit 193b22475d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -4,6 +4,7 @@ from copy import deepcopy
from fastapi import APIRouter, BackgroundTasks, Depends from fastapi import APIRouter, BackgroundTasks, Depends
from freqtrade.configuration.config_validation import validate_config_consistency
from freqtrade.enums import BacktestState from freqtrade.enums import BacktestState
from freqtrade.exceptions import DependencyException from freqtrade.exceptions import DependencyException
from freqtrade.rpc.api_server.api_schemas import BacktestRequest, BacktestResponse from freqtrade.rpc.api_server.api_schemas import BacktestRequest, BacktestResponse
@ -42,6 +43,7 @@ async def api_start_backtest(bt_settings: BacktestRequest, background_tasks: Bac
# Reload strategy # Reload strategy
lastconfig = ApiServer._bt_last_config lastconfig = ApiServer._bt_last_config
strat = StrategyResolver.load_strategy(btconfig) strat = StrategyResolver.load_strategy(btconfig)
validate_config_consistency(btconfig)
if ( if (
not ApiServer._bt not ApiServer._bt
@ -61,12 +63,12 @@ async def api_start_backtest(bt_settings: BacktestRequest, background_tasks: Bac
not ApiServer._bt_data not ApiServer._bt_data
or not ApiServer._bt_timerange or not ApiServer._bt_timerange
or lastconfig.get('timeframe') != strat.timeframe or lastconfig.get('timeframe') != strat.timeframe
or lastconfig.get('timerange') != btconfig['timerange']
): ):
ApiServer._bt_data, ApiServer._bt_timerange = ApiServer._bt.load_bt_data() ApiServer._bt_data, ApiServer._bt_timerange = ApiServer._bt.load_bt_data()
lastconfig['timerange'] = btconfig['timerange'] lastconfig['timerange'] = btconfig['timerange']
lastconfig['timeframe'] = strat.timeframe lastconfig['timeframe'] = strat.timeframe
lastconfig['protections'] = btconfig.get('protections', []) lastconfig['protections'] = btconfig.get('protections', [])
lastconfig['enable_protections'] = btconfig.get('enable_protections') lastconfig['enable_protections'] = btconfig.get('enable_protections')
lastconfig['dry_run_wallet'] = btconfig.get('dry_run_wallet') lastconfig['dry_run_wallet'] = btconfig.get('dry_run_wallet')

View File

@ -18,10 +18,10 @@ isort==5.9.3
time-machine==2.4.0 time-machine==2.4.0
# Convert jupyter notebooks to markdown documents # Convert jupyter notebooks to markdown documents
nbconvert==6.1.0 nbconvert==6.2.0
# mypy types # mypy types
types-cachetools==4.2.0 types-cachetools==4.2.0
types-filelock==0.1.5 types-filelock==0.1.5
types-requests==2.25.8 types-requests==2.25.9
types-tabulate==0.8.2 types-tabulate==0.8.2

View File

@ -2,7 +2,7 @@ numpy==1.21.2
pandas==1.3.3 pandas==1.3.3
pandas-ta==0.3.14b pandas-ta==0.3.14b
ccxt==1.56.86 ccxt==1.57.3
# Pin cryptography for now due to rust build errors with piwheels # Pin cryptography for now due to rust build errors with piwheels
cryptography==3.4.8 cryptography==3.4.8
aiohttp==3.7.4.post0 aiohttp==3.7.4.post0