From 3ba93296e56323370ce0a1fd8fdf080f3e24089f Mon Sep 17 00:00:00 2001 From: iterativ Date: Fri, 8 Mar 2024 09:31:20 +0200 Subject: [PATCH] X4: check if enter tag is not available for current open trades. --- NostalgiaForInfinityX4.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/NostalgiaForInfinityX4.py b/NostalgiaForInfinityX4.py index a27ab582f4..b9b1f6d6aa 100644 --- a/NostalgiaForInfinityX4.py +++ b/NostalgiaForInfinityX4.py @@ -68,7 +68,7 @@ class NostalgiaForInfinityX4(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "v14.1.305" + return "v14.1.306" stoploss = -0.99 @@ -26333,9 +26333,10 @@ def populate_entry_trend(self, df: DataFrame, metadata: dict) -> DataFrame: open_trades = Trade.get_trades_proxy(is_open=True) for open_trade in open_trades: enter_tag = open_trade.enter_tag - enter_tags = enter_tag.split() - if all(c in self.long_grind_mode_tags for c in enter_tags): - num_open_grind_mode += 1 + if enter_tag is not None: + enter_tags = enter_tag.split() + if all(c in self.long_grind_mode_tags for c in enter_tags): + num_open_grind_mode += 1 # if BTC/ETH stake is_btc_stake = self.config["stake_currency"] in self.btc_stakes allowed_empty_candles = 144 if is_btc_stake else 60