mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Merge branch 'freqtrade:develop' into bt-metrics
This commit is contained in:
@@ -128,12 +128,6 @@ This warning can point to one of the below problems:
|
||||
* Barely traded pair -> Check the pair on the exchange webpage, look at the timeframe your strategy uses. If the pair does not have any volume in some candles (usually visualized with a "volume 0" bar, and a "_" as candle), this pair did not have any trades in this timeframe. These pairs should ideally be avoided, as they can cause problems with order-filling.
|
||||
* API problem -> API returns wrong data (this only here for completeness, and should not happen with supported exchanges).
|
||||
|
||||
### I'm getting the "RESTRICTED_MARKET" message in the log
|
||||
|
||||
Currently known to happen for US Bittrex users.
|
||||
|
||||
Read [the Bittrex section about restricted markets](exchanges.md#restricted-markets) for more information.
|
||||
|
||||
### I'm getting the "Exchange XXX does not support market orders." message and cannot run my strategy
|
||||
|
||||
As the message says, your exchange does not support market orders and you have one of the [order types](configuration.md/#understand-order_types) set to "market". Your strategy was probably written with other exchanges in mind and sets "market" orders for "stoploss" orders, which is correct and preferable for most of the exchanges supporting market orders (but not for Bittrex and Gate.io).
|
||||
|
||||
@@ -284,6 +284,10 @@ class FreqaiDataDrawer:
|
||||
new_pred["date_pred"] = dataframe["date"]
|
||||
hist_preds = self.historic_predictions[pair].copy()
|
||||
|
||||
# ensure both dataframes have the same date format so they can be merged
|
||||
new_pred["date_pred"] = pd.to_datetime(new_pred["date_pred"])
|
||||
hist_preds["date_pred"] = pd.to_datetime(hist_preds["date_pred"])
|
||||
|
||||
# find the closest common date between new_pred and historic predictions
|
||||
# and cut off the new_pred dataframe at that date
|
||||
common_dates = pd.merge(new_pred, hist_preds, on="date_pred", how="inner")
|
||||
@@ -294,7 +298,9 @@ class FreqaiDataDrawer:
|
||||
"predictions. You likely left your FreqAI instance offline "
|
||||
f"for more than {len(dataframe.index)} candles.")
|
||||
|
||||
df_concat = pd.concat([hist_preds, new_pred], ignore_index=True, keys=hist_preds.keys())
|
||||
# reindex new_pred columns to match the historic predictions dataframe
|
||||
new_pred_reindexed = new_pred.reindex(columns=hist_preds.columns)
|
||||
df_concat = pd.concat([hist_preds, new_pred_reindexed], ignore_index=True)
|
||||
|
||||
# any missing values will get zeroed out so users can see the exact
|
||||
# downtime in FreqUI
|
||||
|
||||
@@ -45,7 +45,7 @@ class XGBoostRFRegressor(BaseRegressionModel):
|
||||
|
||||
model = XGBRFRegressor(**self.model_training_parameters)
|
||||
|
||||
model.set_params(callbacks=[TBCallback(dk.data_path)], activate=self.activate_tensorboard)
|
||||
model.set_params(callbacks=[TBCallback(dk.data_path)])
|
||||
model.fit(X=X, y=y, sample_weight=sample_weight, eval_set=eval_set,
|
||||
sample_weight_eval_set=eval_weights, xgb_model=xgb_model)
|
||||
# set the callbacks to empty so that we can serialize to disk later
|
||||
|
||||
@@ -45,7 +45,7 @@ class XGBoostRegressor(BaseRegressionModel):
|
||||
|
||||
model = XGBRegressor(**self.model_training_parameters)
|
||||
|
||||
model.set_params(callbacks=[TBCallback(dk.data_path)], activate=self.activate_tensorboard)
|
||||
model.set_params(callbacks=[TBCallback(dk.data_path)])
|
||||
model.fit(X=X, y=y, sample_weight=sample_weight, eval_set=eval_set,
|
||||
sample_weight_eval_set=eval_weights, xgb_model=xgb_model)
|
||||
# set the callbacks to empty so that we can serialize to disk later
|
||||
|
||||
@@ -20,7 +20,7 @@ isort==5.12.0
|
||||
time-machine==2.13.0
|
||||
|
||||
# Convert jupyter notebooks to markdown documents
|
||||
nbconvert==7.11.0
|
||||
nbconvert==7.12.0
|
||||
|
||||
# mypy types
|
||||
types-cachetools==5.3.0.7
|
||||
|
||||
@@ -19,7 +19,7 @@ technical==1.4.0
|
||||
tabulate==0.9.0
|
||||
pycoingecko==3.1.0
|
||||
jinja2==3.1.2
|
||||
tables==3.9.2
|
||||
tables==3.9.1
|
||||
joblib==1.3.2
|
||||
rich==13.7.0
|
||||
pyarrow==14.0.1; platform_machine != 'armv7l'
|
||||
|
||||
@@ -24,7 +24,7 @@ from tests.conftest import (EXMS, generate_test_data_raw, get_mock_coro, get_pat
|
||||
|
||||
|
||||
# Make sure to always keep one exchange here which is NOT subclassed!!
|
||||
EXCHANGES = ['bittrex', 'binance', 'kraken', 'gate', 'kucoin', 'bybit', 'okx']
|
||||
EXCHANGES = ['binance', 'kraken', 'gate', 'kucoin', 'bybit', 'okx']
|
||||
|
||||
get_entry_rate_data = [
|
||||
('other', 20, 19, 10, 0.0, 20), # Full ask side
|
||||
@@ -3901,11 +3901,11 @@ def test_set_margin_mode(mocker, default_conf, margin_mode):
|
||||
("kraken", TradingMode.SPOT, None, False),
|
||||
("kraken", TradingMode.MARGIN, MarginMode.ISOLATED, True),
|
||||
("kraken", TradingMode.FUTURES, MarginMode.ISOLATED, True),
|
||||
("bittrex", TradingMode.SPOT, None, False),
|
||||
("bittrex", TradingMode.MARGIN, MarginMode.CROSS, True),
|
||||
("bittrex", TradingMode.MARGIN, MarginMode.ISOLATED, True),
|
||||
("bittrex", TradingMode.FUTURES, MarginMode.CROSS, True),
|
||||
("bittrex", TradingMode.FUTURES, MarginMode.ISOLATED, True),
|
||||
("bitmart", TradingMode.SPOT, None, False),
|
||||
("bitmart", TradingMode.MARGIN, MarginMode.CROSS, True),
|
||||
("bitmart", TradingMode.MARGIN, MarginMode.ISOLATED, True),
|
||||
("bitmart", TradingMode.FUTURES, MarginMode.CROSS, True),
|
||||
("bitmart", TradingMode.FUTURES, MarginMode.ISOLATED, True),
|
||||
("gate", TradingMode.MARGIN, MarginMode.ISOLATED, True),
|
||||
("okx", TradingMode.SPOT, None, False),
|
||||
("okx", TradingMode.MARGIN, MarginMode.CROSS, True),
|
||||
|
||||
@@ -14,14 +14,6 @@ EXCHANGE_FIXTURE_TYPE = Tuple[Exchange, str]
|
||||
|
||||
# Exchanges that should be tested online
|
||||
EXCHANGES = {
|
||||
'bittrex': {
|
||||
'pair': 'BTC/USDT',
|
||||
'stake_currency': 'USDT',
|
||||
'hasQuoteVolume': False,
|
||||
'timeframe': '1h',
|
||||
'leverage_tiers_public': False,
|
||||
'leverage_in_spot_market': False,
|
||||
},
|
||||
'binance': {
|
||||
'pair': 'BTC/USDT',
|
||||
'stake_currency': 'USDT',
|
||||
|
||||
@@ -10,9 +10,8 @@ from freqtrade.data.dataprovider import DataProvider
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.freqai.data_kitchen import FreqaiDataKitchen
|
||||
from tests.conftest import get_patched_exchange
|
||||
from tests.freqai.conftest import (get_patched_data_kitchen, get_patched_freqai_strategy,
|
||||
from tests.freqai.conftest import (get_patched_data_kitchen, get_patched_freqai_strategy, is_mac,
|
||||
make_unfiltered_dataframe)
|
||||
from tests.freqai.test_freqai_interface import is_mac
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -109,7 +109,6 @@ def get_telegram_testobject(mocker, default_conf, mock=True, ftbot=None):
|
||||
_start_thread=MagicMock(),
|
||||
)
|
||||
if not ftbot:
|
||||
mocker.patch('freqtrade.exchange.exchange.Exchange._init_async_loop')
|
||||
ftbot = get_patched_freqtradebot(mocker, default_conf)
|
||||
rpc = RPC(ftbot)
|
||||
telegram = Telegram(rpc, default_conf)
|
||||
|
||||
Reference in New Issue
Block a user