mkajnar / DailyBuyStrategy

GNU General Public License v3.0
26 stars 17 forks source link

Pandas FutureWarning: 'rsi_momentum_ha_enter_long' has dtype incompatible with float64, #8

Open MuhammadElsaeed opened 7 months ago

MuhammadElsaeed commented 7 months ago

Hello, Whenever I run the HPStrategy strategy e.g, backtesting, I get many warning logs that makes it hard to track information in the terminal.

dataframe.loc[final_conditions, ['enter_long', 'enter_tag']] = (1, 'rsi_momentum_ha_enter_long') /freqtrade/user_data/strategies/HPStrategy.py:144: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'rsi_momentum_ha_enter_long' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.

I tried to add these lines to the strategy code with no good. import warnings warnings.filterwarnings("ignore")