chore: fix further np.NaN occurances

This commit is contained in:
Matthias
2025-12-01 19:31:40 +01:00
parent 7c383585cd
commit b8a90bebeb
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ class Low_BB(IStrategy):
# dataframe['mfi'] = ta.MFI(dataframe)
# dataframe['rsi'] = ta.RSI(dataframe, timeperiod=7)
# dataframe['canbuy'] = np.NaN
# dataframe['canbuy2'] = np.NaN
# dataframe['canbuy'] = np.nan
# dataframe['canbuy2'] = np.nan
# dataframe.loc[dataframe.close.rolling(49).min() <= 1.1 * dataframe.close, 'canbuy'] == 1
# dataframe.loc[dataframe.close.rolling(600).max() < 1.2 * dataframe.close, 'canbuy'] = 1
# dataframe.loc[dataframe.close.rolling(600).max() * 0.8 > dataframe.close, 'canbuy2'] = 1
@@ -142,7 +142,7 @@ class TDSequentialStrategy(IStrategy):
Based on TA indicators, populates the sell signal for the given dataframe
:param dataframe: DataFrame
:param metadata: Additional information, like the currently traded pair
:return: DataFrame with buy columnNA / NaN values
:return: DataFrame with buy columnNA / nan values
"""
dataframe["exit_long"] = 0
dataframe.loc[((dataframe['exceed_high']) |
@@ -238,7 +238,7 @@ class FSupertrendStrategy(IStrategy):
)
# Mark the trend direction up/down
df[stx] = np.where(
(df[st] > 0.00), np.where((df["close"] < df[st]), "down", "up"), np.NaN
(df[st] > 0.00), np.where((df["close"] < df[st]), "down", "up"), None
)
# Remove basic and final bands from the columns