mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Merge branch 'freqtrade:develop' into feat/telegram-profit-direction
This commit is contained in:
@@ -258,6 +258,7 @@ def patch_exchange(
|
||||
"._supported_trading_mode_margin_pairs",
|
||||
PropertyMock(
|
||||
return_value=[
|
||||
(TradingMode.SPOT, MarginMode.NONE),
|
||||
(TradingMode.MARGIN, MarginMode.CROSS),
|
||||
(TradingMode.MARGIN, MarginMode.ISOLATED),
|
||||
(TradingMode.FUTURES, MarginMode.CROSS),
|
||||
|
||||
@@ -10,7 +10,6 @@ from freqtrade.configuration.timerange import TimeRange
|
||||
from freqtrade.data import history
|
||||
from freqtrade.data.dataprovider import DataProvider
|
||||
from freqtrade.enums import RunMode
|
||||
from freqtrade.enums.candletype import CandleType
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.freqai.data_kitchen import FreqaiDataKitchen
|
||||
from freqtrade.optimize.backtesting import Backtesting
|
||||
@@ -142,7 +141,7 @@ def test_freqai_backtest_consistent_timerange(mocker, freqai_conf):
|
||||
|
||||
gbs = mocker.patch("freqtrade.optimize.backtesting.generate_backtest_stats")
|
||||
|
||||
freqai_conf["candle_type_def"] = CandleType.FUTURES
|
||||
freqai_conf["trading_mode"] = "futures"
|
||||
freqai_conf.get("exchange", {}).update({"pair_whitelist": ["XRP/USDT:USDT"]})
|
||||
freqai_conf.get("freqai", {}).get("feature_parameters", {}).update(
|
||||
{"include_timeframes": ["5m", "1h"], "include_corr_pairlist": []}
|
||||
|
||||
@@ -354,6 +354,7 @@ def test_informative_decorator(mocker, default_conf_usdt, trading_mode):
|
||||
default_conf_usdt["strategy"] = "InformativeDecoratorTest"
|
||||
strategy = StrategyResolver.load_strategy(default_conf_usdt)
|
||||
exchange = get_patched_exchange(mocker, default_conf_usdt)
|
||||
default_conf_usdt["candle_type_def"] = candle_def
|
||||
strategy.dp = DataProvider({}, exchange, None)
|
||||
mocker.patch.object(
|
||||
strategy.dp, "current_whitelist", return_value=["XRP/USDT", "LTC/USDT", "NEO/USDT"]
|
||||
|
||||
Reference in New Issue
Block a user