freqtrade / freqtrade

Free, open source crypto trading bot

Home Page:https://www.freqtrade.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FreqAI is dropping almost 100% of my datapoints at feature_engineering_standard

peasant-try opened this issue · comments

My environment:

  • Operating system: Windows 11
  • Python Version: 3.10.11
  • CCXT version: 4.1.76
  • Freqtrade Version: freqtrade 2023.12-dev-7d281602f

Your question

I'm getting the following error when trying to backtest my RL strategy. I downloaded all the datasets for the pairs involved, i even downloaded more data than the one i'm using to backtest accordingly to the following documentation downloading-data-to-cover-the-full-backtest-period.
I also added a check_nan_values function to my strategy code, so i can see if there are any NaN values in the data, and it turns out that there are no NaN values in by the end of both feature engineering expand all and basic, but almost all my features go to NaN on the feature engineering standard function (more details in my logs)

2024-04-13 16:51:44,453 - freqtrade - INFO - freqtrade 2023.12-dev-7d281602f
2024-04-13 16:51:44,456 - freqtrade.configuration.load_config - INFO - Using config: user_data/strategies/saturn_config.json ...
2024-04-13 16:51:44,457 - freqtrade.loggers - INFO - Verbosity set to 0
2024-04-13 16:51:44,457 - freqtrade.configuration.configuration - INFO - Using additional Strategy lookup path: user_data/strategies
2024-04-13 16:51:44,457 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 10 ...
2024-04-13 16:51:44,457 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20230101-20230130 ...
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Using user-data directory: C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data ...
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Using data directory: C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data\data\binance ...
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Parameter --breakdown detected ...
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ...
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20230101-20230130
2024-04-13 16:51:44,458 - freqtrade.configuration.configuration - INFO - Using freqaimodel class name: SaturnReinforcementLearner
2024-04-13 16:51:44,460 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
2024-04-13 16:51:44,469 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2024-04-13 16:51:44,469 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2024-04-13 16:51:44,470 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-04-13 16:51:44,472 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
2024-04-13 16:51:44,473 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2024-04-13 16:51:44,473 - freqtrade.exchange.exchange - INFO - Using CCXT 4.1.76
2024-04-13 16:51:44,473 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-04-13 16:51:44,481 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-04-13 16:51:44,491 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2024-04-13 16:51:50,459 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
2024-04-13 16:51:50,480 - freqtrade.resolvers.iresolver - INFO - Using resolved strategy saturnRsiPivot from 'C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data\strategies\saturnRsiPivot.py'...
2024-04-13 16:51:50,480 - freqtrade.strategy.hyper - INFO - Found no parameter file.
2024-04-13 16:51:50,482 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'timeframe' with value in config file: 15m.
2024-04-13 16:51:50,482 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_currency' with value in config file: USDT.
2024-04-13 16:51:50,482 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_amount' with value in config file: unlimited.
2024-04-13 16:51:50,482 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'unfilledtimeout' with value in config file: {'entry': 10, 'exit': 10, 'exit_timeout_count': 0, 'unit': 'minutes'}.
2024-04-13 16:51:50,483 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'max_open_trades' with value in config file: 10.
2024-04-13 16:51:50,483 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using minimal_roi: {'0': 0.15, '120': 0.14, '240': 0.13, '360': 0.12, '480': 0.11, '600': 0.1, '720': 0.09, '840': 0.08, '960': 0.07, '1080': 0.06, '1440': 0.05}
2024-04-13 16:51:50,483 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using timeframe: 15m
2024-04-13 16:51:50,483 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stoploss: -0.05
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop: False
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive_offset: 0.0
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_only_offset_is_reached: False
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_custom_stoploss: False
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using process_only_new_candles: False
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_types: {'entry': 'limit', 'exit': 'limit', 'stoploss': 'market', 'stoploss_on_exchange': False}
2024-04-13 16:51:50,484 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_time_in_force: {'entry': 'GTC', 'exit': 'GTC'}
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_currency: USDT
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_amount: unlimited
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using protections: []
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using startup_candle_count: 60
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using unfilledtimeout: {'entry': 10, 'exit': 10, 'exit_timeout_count': 0, 'unit': 'minutes'}
2024-04-13 16:51:50,485 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_exit_signal: True
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_only: False
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_roi_if_entry_signal: False
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_offset: 0.0
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using disable_dataframe_checks: False
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_buying_expired_candle_after: 0
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using position_adjustment_enable: False
2024-04-13 16:51:50,486 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_entry_position_adjustment: -1
2024-04-13 16:51:50,487 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_open_trades: 10
2024-04-13 16:51:50,487 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-04-13 16:51:50,500 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from 'C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\freqtrade\plugins\pairlist\StaticPairList.py'...
2024-04-13 16:51:50,509 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai to 2940
2024-04-13 16:51:50,511 - freqtrade.data.history.history_utils - INFO - Using indicator startup period: 2940 ...
2024-04-13 16:51:50,632 - freqtrade.optimize.backtesting - INFO - Loading data from 2022-12-01 09:00:00 up to 2023-01-30 00:00:00 (59 days).
2024-04-13 16:51:50,710 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators
2024-04-13 16:51:50,712 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy saturnRsiPivot
2024-04-13 16:51:52,834 - freqtrade.resolvers.iresolver - INFO - Using resolved freqaimodel SaturnReinforcementLearner from 'C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data\freqaimodels\SaturnReinforcementLearner.py'...
2024-04-13 16:51:52,835 - freqtrade.freqai.freqai_interface - INFO - Backtesting module configured to save all models.
2024-04-13 16:51:52,835 - freqtrade.freqai.data_drawer - INFO - Could not find existing datadrawer, starting from scratch
2024-04-13 16:51:52,835 - freqtrade.freqai.data_drawer - INFO - Could not find existing historic_predictions, starting from scratch
2024-04-13 16:51:52,835 - freqtrade.freqai.freqai_interface - INFO - Set fresh train queue from whitelist. Queue: ['BNB/USDT:USDT', 'BTC/USDT:USDT', 'ETH/USDT:USDT']
2024-04-13 16:51:52,878 - freqtrade.strategy.hyper - INFO - No params for buy found, using default values.
2024-04-13 16:51:52,878 - freqtrade.strategy.hyper - INFO - No params for sell found, using default values.
2024-04-13 16:51:52,879 - freqtrade.strategy.hyper - INFO - No params for protection found, using default values.
2024-04-13 16:51:52,881 - freqtrade.freqai.freqai_interface - INFO - Training 1 timeranges
2024-04-13 16:51:52,883 - freqtrade.freqai.freqai_interface - INFO - Training BNB/USDT:USDT, 1/3 pairs from 2022-12-02 00:00:00 to 2023-01-01 00:00:00, 1/1 trains
2024-04-13 16:51:52,883 - freqtrade.freqai.data_kitchen - INFO - Could not find backtesting prediction file at C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data\models\saturn-bt-ppo\backtesting_predictions\cb_bnb_1672531200_prediction.feather
2024-04-13 16:51:52,885 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai to 60
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 7
%-smoothed_rsi-period: 13
%-smoothed_close-period: 7
%-sma: 13
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 13
%-relative_volume-period: 6
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 9
%-smoothed_rsi-period: 17
%-smoothed_close-period: 10
%-sma: 18
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 18
%-relative_volume-period: 8
feature engineering basic nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
%-pct-change: 1
%-raw_volume: 0
2024-04-13 16:51:52,954 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai to 60
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 7
%-smoothed_rsi-period: 13
%-smoothed_close-period: 7
%-sma: 13
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 13
%-relative_volume-period: 6
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 9
%-smoothed_rsi-period: 17
%-smoothed_close-period: 10
%-sma: 18
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 18
%-relative_volume-period: 8
feature engineering basic nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
%-pct-change: 1
%-raw_volume: 0
2024-04-13 16:51:53,008 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai to 60
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 7
%-smoothed_rsi-period: 13
%-smoothed_close-period: 7
%-sma: 13
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 13
%-relative_volume-period: 6
feature engineering expand all nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi: 9
%-smoothed_rsi-period: 17
%-smoothed_close-period: 10
%-sma: 18
%-sma_cross_below: 0
%-sma_cross_above: 0
%-sma_distance: 18
%-relative_volume-period: 8
feature engineering basic nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
%-pct-change: 1
%-raw_volume: 0
%-pp: 4
%-r1: 4
%-s1: 4
%-r2: 4
%-s2: 4
%-r3: 4
%-s3: 4
%-r4: 4
%-s4: 4
%-r5: 4
%-s5: 4
%-distance_from_pp: 4
%-distance_from_s1: 4
%-distance_from_r1: 4
%-distance_from_s2: 4
%-distance_from_r2: 4
%-distance_from_s3: 4
%-distance_from_r3: 4
%-distance_from_s4: 4
%-distance_from_r4: 4
%-distance_from_s5: 4
%-distance_from_r5: 4
%-above_pp: 0
%-below_s1: 0
%-above_r1: 0
%-below_s2: 0
%-above_r2: 0
%-below_s3: 0
%-above_r3: 0
%-below_s4: 0
%-above_r4: 0
%-below_s5: 0
%-above_r5: 0
%-breakout_above_pp: 0
%-breakout_below_s1: 0
%-breakout_above_r1: 0
%-breakout_below_s2: 0
%-breakout_above_r2: 0
%-breakout_below_s3: 0
%-breakout_above_r3: 0
%-breakout_below_s4: 0
%-breakout_above_r4: 0
%-breakout_below_s5: 0
%-breakout_above_r5: 0
%-range_pp_s1: 4
%-range_pp_r1: 4
%-range_s1_s2: 4
%-range_r1_r2: 4
%-range_pp_s2: 4
%-range_pp_r2: 4
%-range_s2_s3: 4
%-range_r2_r3: 4
%-range_pp_s3: 4
%-range_pp_r3: 4
%-range_s3_s4: 4
%-range_r3_r4: 4
%-range_pp_s4: 4
%-range_pp_r4: 4
%-range_s4_s5: 4
%-range_r4_r5: 4
%-range_pp_s5: 4
%-range_pp_r5: 4
feature engineering standard nan values
Number of NaN values in each column:
date: 0
open: 0
high: 0
low: 0
close: 0
volume: 0
rsi_7_BNB/USDT:USDT_15m: 2887
%-smoothed_rsi-period_7_BNB/USDT:USDT_15m: 2893
%-smoothed_close-period_7_BNB/USDT:USDT_15m: 2887
%-sma_7_BNB/USDT:USDT_15m: 2893
%-sma_cross_below_7_BNB/USDT:USDT_15m: 2880
%-sma_cross_above_7_BNB/USDT:USDT_15m: 2880
%-sma_distance_7_BNB/USDT:USDT_15m: 2893
%-relative_volume-period_7_BNB/USDT:USDT_15m: 2886
rsi_9_BNB/USDT:USDT_15m: 2889
%-smoothed_rsi-period_9_BNB/USDT:USDT_15m: 2897
%-smoothed_close-period_9_BNB/USDT:USDT_15m: 2890
%-sma_9_BNB/USDT:USDT_15m: 2898
%-sma_cross_below_9_BNB/USDT:USDT_15m: 2880
%-sma_cross_above_9_BNB/USDT:USDT_15m: 2880
%-sma_distance_9_BNB/USDT:USDT_15m: 2898
%-relative_volume-period_9_BNB/USDT:USDT_15m: 2888
%-pct-change_gen_BNB/USDT:USDT_15m: 2881
%-raw_volume_gen_BNB/USDT:USDT_15m: 2880
rsi_7_BNB/USDT:USDT_1h: 2731
%-smoothed_rsi-period_7_BNB/USDT:USDT_1h: 2755
%-smoothed_close-period_7_BNB/USDT:USDT_1h: 2731
%-sma_7_BNB/USDT:USDT_1h: 2755
%-sma_cross_below_7_BNB/USDT:USDT_1h: 2703
%-sma_cross_above_7_BNB/USDT:USDT_1h: 2703
%-sma_distance_7_BNB/USDT:USDT_1h: 2755
%-relative_volume-period_7_BNB/USDT:USDT_1h: 2727
rsi_9_BNB/USDT:USDT_1h: 2739
%-smoothed_rsi-period_9_BNB/USDT:USDT_1h: 2771
%-smoothed_close-period_9_BNB/USDT:USDT_1h: 2743
%-sma_9_BNB/USDT:USDT_1h: 2775
%-sma_cross_below_9_BNB/USDT:USDT_1h: 2703
%-sma_cross_above_9_BNB/USDT:USDT_1h: 2703
%-sma_distance_9_BNB/USDT:USDT_1h: 2775
%-relative_volume-period_9_BNB/USDT:USDT_1h: 2735
%-pct-change_gen_BNB/USDT:USDT_1h: 2707
%-raw_volume_gen_BNB/USDT:USDT_1h: 2703
rsi_7_BNB/USDT:USDT_6h: 1691
%-smoothed_rsi-period_7_BNB/USDT:USDT_6h: 1835
%-smoothed_close-period_7_BNB/USDT:USDT_6h: 1691
%-sma_7_BNB/USDT:USDT_6h: 1835
%-sma_cross_below_7_BNB/USDT:USDT_6h: 1523
%-sma_cross_above_7_BNB/USDT:USDT_6h: 1523
%-sma_distance_7_BNB/USDT:USDT_6h: 1835
%-relative_volume-period_7_BNB/USDT:USDT_6h: 1667
rsi_9_BNB/USDT:USDT_6h: 1739
%-smoothed_rsi-period_9_BNB/USDT:USDT_6h: 1931
%-smoothed_close-period_9_BNB/USDT:USDT_6h: 1763
%-sma_9_BNB/USDT:USDT_6h: 1955
%-sma_cross_below_9_BNB/USDT:USDT_6h: 1523
%-sma_cross_above_9_BNB/USDT:USDT_6h: 1523
%-sma_distance_9_BNB/USDT:USDT_6h: 1955
%-relative_volume-period_9_BNB/USDT:USDT_6h: 1715
%-pct-change_gen_BNB/USDT:USDT_6h: 1547
%-raw_volume_gen_BNB/USDT:USDT_6h: 1523
%-pp_gen_BNB/USDT:USDT_6h: 1619
%-r1_gen_BNB/USDT:USDT_6h: 1619
%-s1_gen_BNB/USDT:USDT_6h: 1619
%-r2_gen_BNB/USDT:USDT_6h: 1619
%-s2_gen_BNB/USDT:USDT_6h: 1619
%-r3_gen_BNB/USDT:USDT_6h: 1619
%-s3_gen_BNB/USDT:USDT_6h: 1619
%-r4_gen_BNB/USDT:USDT_6h: 1619
%-s4_gen_BNB/USDT:USDT_6h: 1619
%-r5_gen_BNB/USDT:USDT_6h: 1619
%-s5_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_pp_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_s1_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_r1_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_s2_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_r2_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_s3_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_r3_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_s4_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_r4_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_s5_gen_BNB/USDT:USDT_6h: 1619
%-distance_from_r5_gen_BNB/USDT:USDT_6h: 1619
%-above_pp_gen_BNB/USDT:USDT_6h: 1523
%-below_s1_gen_BNB/USDT:USDT_6h: 1523
%-above_r1_gen_BNB/USDT:USDT_6h: 1523
%-below_s2_gen_BNB/USDT:USDT_6h: 1523
%-above_r2_gen_BNB/USDT:USDT_6h: 1523
%-below_s3_gen_BNB/USDT:USDT_6h: 1523
%-above_r3_gen_BNB/USDT:USDT_6h: 1523
%-below_s4_gen_BNB/USDT:USDT_6h: 1523
%-above_r4_gen_BNB/USDT:USDT_6h: 1523
%-below_s5_gen_BNB/USDT:USDT_6h: 1523
%-above_r5_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_pp_gen_BNB/USDT:USDT_6h: 1523
%-breakout_below_s1_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_r1_gen_BNB/USDT:USDT_6h: 1523
%-breakout_below_s2_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_r2_gen_BNB/USDT:USDT_6h: 1523
%-breakout_below_s3_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_r3_gen_BNB/USDT:USDT_6h: 1523
%-breakout_below_s4_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_r4_gen_BNB/USDT:USDT_6h: 1523
%-breakout_below_s5_gen_BNB/USDT:USDT_6h: 1523
%-breakout_above_r5_gen_BNB/USDT:USDT_6h: 1523
%-range_pp_s1_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_r1_gen_BNB/USDT:USDT_6h: 1619
%-range_s1_s2_gen_BNB/USDT:USDT_6h: 1619
%-range_r1_r2_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_s2_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_r2_gen_BNB/USDT:USDT_6h: 1619
%-range_s2_s3_gen_BNB/USDT:USDT_6h: 1619
%-range_r2_r3_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_s3_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_r3_gen_BNB/USDT:USDT_6h: 1619
%-range_s3_s4_gen_BNB/USDT:USDT_6h: 1619
%-range_r3_r4_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_s4_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_r4_gen_BNB/USDT:USDT_6h: 1619
%-range_s4_s5_gen_BNB/USDT:USDT_6h: 1619
%-range_r4_r5_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_s5_gen_BNB/USDT:USDT_6h: 1619
%-range_pp_r5_gen_BNB/USDT:USDT_6h: 1619
%-raw_close: 0
%-raw_open: 0
%-raw_high: 0
%-raw_low: 0
%-day_of_week: 0
%-hour_of_day: 0
2024-04-13 16:51:53,152 - freqtrade.freqai.freqai_interface - INFO - Could not find model at C:\Users\foo\OneDrive\Documents\Trading\Freqtrade\freqtrade\user_data\models\saturn-bt-ppo\sub-train-BNB_1672531200\cb_bnb_1672531200
2024-04-13 16:51:53,153 - freqtrade.freqai.RL.BaseReinforcementLearningModel - INFO - --------------------Starting training BNB/USDT:USDT --------------------
2024-04-13 16:51:53,175 - freqtrade.freqai.data_kitchen - INFO - BNB/USDT:USDT: dropped 2838 training points due to NaNs in populated dataset 2880.
2024-04-13 16:51:53,180 - datasieve.pipeline - INFO - VarianceThreshold will remove 27 features from the dataset.on transform. ['%-sma_cross_below_9_BNB/USDTUSDT_1h'
 '%-sma_cross_above_9_BNB/USDTUSDT_1h'
 '%-sma_cross_below_7_BNB/USDTUSDT_6h'
 '%-sma_cross_above_7_BNB/USDTUSDT_6h'
 '%-sma_cross_below_9_BNB/USDTUSDT_6h'
 '%-sma_cross_above_9_BNB/USDTUSDT_6h' '%-above_pp_gen_BNB/USDTUSDT_6h'
 '%-below_s1_gen_BNB/USDTUSDT_6h' '%-below_s2_gen_BNB/USDTUSDT_6h'
 '%-above_r2_gen_BNB/USDTUSDT_6h' '%-below_s3_gen_BNB/USDTUSDT_6h'
 '%-above_r3_gen_BNB/USDTUSDT_6h' '%-below_s4_gen_BNB/USDTUSDT_6h'
 '%-above_r4_gen_BNB/USDTUSDT_6h' '%-below_s5_gen_BNB/USDTUSDT_6h'
 '%-above_r5_gen_BNB/USDTUSDT_6h'
 '%-breakout_above_pp_gen_BNB/USDTUSDT_6h'
 '%-breakout_below_s1_gen_BNB/USDTUSDT_6h'
 '%-breakout_below_s2_gen_BNB/USDTUSDT_6h'
 '%-breakout_above_r2_gen_BNB/USDTUSDT_6h'
 '%-breakout_below_s3_gen_BNB/USDTUSDT_6h'
 '%-breakout_above_r3_gen_BNB/USDTUSDT_6h'
 '%-breakout_below_s4_gen_BNB/USDTUSDT_6h'
 '%-breakout_above_r4_gen_BNB/USDTUSDT_6h'
 '%-breakout_below_s5_gen_BNB/USDTUSDT_6h'
 '%-breakout_above_r5_gen_BNB/USDTUSDT_6h' '%-day_of_week']
2024-04-13 16:51:53,183 - freqtrade.freqai.RL.BaseReinforcementLearningModel - INFO - Training model on 89 features and 33 data points

Also, here's my config.json file (I redacted my keys and sensible data):

{
    "max_open_trades": 10,
    "stake_currency": "USDT",
    "stake_amount": "unlimited",
    "tradable_balance_ratio": 0.99,
    "fiat_display_currency": "USD",
    "dry_run": true,
    "dry_run_wallet": 20000,
    "cancel_open_orders_on_exit": false,
    "trading_mode": "futures",
    "margin_mode": "isolated",
    "unfilledtimeout": {
        "entry": 10,
        "exit": 10,
        "exit_timeout_count": 0,
        "unit": "minutes"
    },
    "freqai": {
        "enabled": true,
        "purge_old_models": 2,
        "train_period_days": 30,
        "expiration_hours": 2,
        "backtest_period_days": 30,
        "identifier" : "saturn-bt-ppo",
        "continual_learning": false,
        "feature_parameters" : {
            "include_timeframes": ["1h","6h"],
            "include_corr_pairlist": [
            ],
            "label_period_candles": 24,
            "indicator_periods_candles": [7, 9]
        },
        "data_split_parameters": {
            "test_size": 0.2
        },
        "randomize_starting_position": false,
        "rl_config": {
            "train_cycles": 30,
            "max_trade_duration_candles": 100,
            "max_training_drawdown_pct": 0.1,
            "cpu_count": 8,
            "model_type": "PPO",
            "policy_type": "MlpPolicy",
            "model_reward_parameters": {
                "win_reward_factor": 3,
                "rr": 2,
                "profit_aim": 0.1
            }
        }
    },
    "entry_pricing": {
        "price_side": "same",
        "use_order_book": true,
        "order_book_top": 1,
        "price_last_balance": 0.0,
        "check_depth_of_market": {
            "enabled": false,
            "bids_to_ask_delta": 1
        }
    },
    "exit_pricing":{
        "price_side": "other",
        "use_order_book": true,
        "order_book_top": 1
    },
    "exchange": {
        "name": "binance",
        "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "secret": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "ccxt_config": {},
        "ccxt_async_config": {},
        "pair_whitelist": [
            "BNB/USDT:USDT",
            "BTC/USDT:USDT",
            "ETH/USDT:USDT"
        ],
        "pair_blacklist": [
            "BNB/.*"
        ]
    },
    "pairlists": [
        {
            "method": "StaticPairList",
            "number_assets": 20,
            "sort_key": "quoteVolume",
            "min_value": 0,
            "refresh_period": 1800
        }
    ],
    "telegram": {
        "enabled": true,
        "token": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "chat_id": "AAAAAAAAAAA"
    },
    "api_server": {
        "enabled": true,
        "listen_ip_address": "127.0.0.1",
        "listen_port": 8080,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "ws_token": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "CORS_origins": [],
        "username": "AAAAAAAAAAAAAAAA",
        "password": "AAAAAAAAAAAAAA"
    },
    "bot_name": "freqtrade",
    "initial_state": "running",
    "force_entry_enable": false,
    "internals": {
        "process_throttle_secs": 5
    },
    "logging": {
        "version": 1,
        "root": {
            "level": "INFO",
            "handlers": ["console", "file"]
        },
        "handlers": {
            "console": {
                "class": "logging.StreamHandler",
                "level": "INFO",
                "formatter": "simple"
            },
            "file": {
                "class": "logging.FileHandler",
                "filename": "freqtrade.log",
                "level": "DEBUG",
                "formatter": "simple"
            }
        },
        "formatters": {
            "simple": {
                "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
            }
        }
    }
}

And, here's my strategy code:

# pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement
# flake8: noqa: F401
# isort: skip_file
# --- Do not remove these libs ---
import numpy as np
import pandas as pd
from pandas import DataFrame
from datetime import datetime
from typing import Optional
from functools import reduce
from freqtrade.strategy import (IStrategy, CategoricalParameter)
# --------------------------------
# Add your lib to import here
import talib.abstract as ta
from technical import qtpylib as qt
from freqtrade.optimize.space import Categorical, Dimension, Integer, SKDecimal


class saturnRsiPivot(IStrategy):
    """
    This is a strategy template to get you started.
    More information in https://www.freqtrade.io/en/latest/strategy-customization/

    You can:
        :return: a Dataframe with all mandatory indicators for the strategies
    - Rename the class name (Do not forget to update class_name)
    - Add any methods you want to build your strategy
    - Add any lib you need to build your strategy

    You must keep:
    - the lib in the section "Do not remove these libs"
    - the methods: populate_indicators, populate_entry_trend, populate_exit_trend
    You should keep:
    - timeframe, minimal_roi, stoploss, trailing_*
    """
    # Strategy interface version - allow new iterations of the strategy interface.
    # Check the documentation or the Sample strategy to get the latest version.
    INTERFACE_VERSION = 3

    # Optimal timeframe for the strategy.
    timeframe = '30m'

    # Can this strategy go short?
    can_short: bool = True

    # Minimal ROI designed for the strategy.
    # This attribute will be overridden if the config file contains "minimal_roi".
    minimal_roi = {
        "0": 0.15,
        "120": 0.14,
        "240": 0.13,
        "360": 0.12,
        "480": 0.11,
        "600": 0.10,
        "720": 0.09,
        "840": 0.08,
        "960": 0.07,
        "1080": 0.06,
        "1440": 0.05
    }

    # Optimal stoploss designed for the strategy.
    # This attribute will be overridden if the config file contains "stoploss".
    stoploss = -0.05
    use_custom_stoploss = False
    # Trailing stoploss
    #trailing_stop = True
    # trailing_only_offset_is_reached = False
    # trailing_stop_positive = 0.01
    # trailing_stop_positive_offset = 0.0  # Disabled / not configured

    # Run "populate_indicators()" only for new candle.
    process_only_new_candles = False

    # These values can be overridden in the config.
    use_exit_signal = True
    exit_profit_only = False
    ignore_roi_if_entry_signal = False

    # Number of candles the strategy requires before producing valid signals
    startup_candle_count: int = 60

    piv_num = 5

    # Strategy parameters
    #atr_factor = 0.012
    #buy_rsi = 30
    #sell_rsi = 70
    #inf_tf = '3d'

    # Optional order type mapping.
    order_types = {
        'entry': 'limit',
        'exit': 'limit',
        'stoploss': 'market',
        'stoploss_on_exchange': False
    }

    # Optional order time in force.
    order_time_in_force = {
        'entry': 'GTC',
        'exit': 'GTC'
    }

    @property
    def plot_config(self):
        return {
            # Main plot indicators (Moving averages, ...)
            'main_plot': {
                'tema': {},
                'sar': {'color': 'white'},
            },
            'subplots': {
                # Subplots - each dict defines one additional plot
                #"MACD": {
                #    'macd': {'color': 'blue'},
                #    'macdsignal': {'color': 'orange'},
                #},
                "RSI": {
                    'rsi': {'color': 'red'},
                    '%-smoothed_rsi': {'color':'blue'}
                }
            }
        }
    def feature_engineering_expand_all(self, dataframe: DataFrame, period: int,
                                       metadata: dict, **kwargs) -> DataFrame:
        """
        *Only functional with FreqAI enabled strategies*
        This function will automatically expand the defined features on the config defined
        `indicator_periods_candles`, `include_timeframes`, `include_shifted_candles`, and
        `include_corr_pairs`. In other words, a single feature defined in this function
        will automatically expand to a total of
        `indicator_periods_candles` * `include_timeframes` * `include_shifted_candles` *
        `include_corr_pairs` numbers of features added to the model.

        All features must be prepended with `%` to be recognized by FreqAI internals.

        Access metadata such as the current pair/timeframe with:

        `metadata["pair"]` `metadata["tf"]`

        More details on how these config defined parameters accelerate feature engineering
        in the documentation at:

        https://www.freqtrade.io/en/latest/freqai-parameter-table/#feature-parameters

        https://www.freqtrade.io/en/latest/freqai-feature-engineering/#defining-the-features

        :param dataframe: strategy dataframe which will receive the features
        :param period: period of the indicator - usage example:
        :param metadata: metadata of current pair
        dataframe["%-ema-period"] = ta.EMA(dataframe, timeperiod=period)
        """
        #def trend_of_values(values):
        #    if all(x < y for x, y in zip(values, values[1:])):
        #        return 1
        #    elif all(x > y for x, y in zip(values, values[1:])):
        #        return -1
        #    return 0


        #def min_2(series):
        #    return trend_of_values(
        #        series[series.nsmallest(2).index.sort_values(ascending=True).values])
        #def max_2(series):
        #    return trend_of_values(
        #        series[series.nlargest(2).index.sort_values(ascending=True).values])

        #RSI_DIV
        #Bullish
        #dataframe['trend_rsi_bull'] = dataframe['smoothed_rsi'].rolling(
        #    window=self.rsi_signal_roll.value).apply(min_2, raw=False)
        #dataframe.loc[find_peaks(-1*dataframe['smoothed_close'],
        #            distance=self.rsi_signal_roll.value,width=3,
        #            prominence=dataframe['atr'].iloc[-1])[0],'price_peaks'] = 1
        #dataframe['trend_price_bull'] = (
        #    dataframe[dataframe['price_peaks'] == 1]['close']).rolling(2).apply(min_2,raw=False)
        ##Bearish
        #dataframe['trend_rsi_bear'] = dataframe['rsi'].rolling(
        #    window=self.rsi_signal_roll.value).apply(max_2, raw=False)
        #dataframe.loc[find_peaks(dataframe['smoothed_close'],
        #            distance=self.rsi_signal_roll.value,width=3,
        #            prominence=dataframe['atr'].iloc[-1])[0],'price_troughs'] = -1
        #dataframe['trend_price_bear'] = (
        #    dataframe[dataframe['price_troughs'] == -1]['close']).rolling(2).apply(max_2,raw=False)

        # RSI
        dataframe['rsi'] = ta.RSI(dataframe,period)
        dataframe['%-smoothed_rsi-period'] = ta.SMA(dataframe['rsi'], timeperiod=period)
        # Smoothed price
        dataframe['%-smoothed_close-period'] = ta.WMA(2 * ta.WMA(dataframe['close'],
            timeperiod=int(period/2)) - ta.WMA(dataframe['close'],
            timeperiod=period), timeperiod=int(np.sqrt(period)))
        # SMA
        dataframe['%-sma'] = ta.SMA(dataframe['%-smoothed_close-period'],timeperiod=period)
        dataframe['%-sma_cross_below'] = qt.crossed_below(dataframe['%-smoothed_close-period'],
                dataframe["%-sma"])
        dataframe['%-sma_cross_above'] = qt.crossed_above(
            dataframe["%-sma"],dataframe['%-smoothed_close-period'])
        # Distance from SMA indicator
        # positive values mean the close is above the sma
        dataframe['%-sma_distance'] = (dataframe['%-smoothed_close-period'] - dataframe["%-sma"])

        dataframe["%-relative_volume-period"] = (
            dataframe["volume"] / dataframe["volume"].rolling(period).mean()
        )
        print("feature engineering expand all nan values")
        check_nan_values(dataframe)
        return dataframe

    def feature_engineering_expand_basic(
            self, dataframe: DataFrame, metadata: dict, **kwargs) -> DataFrame:
        """
        *Only functional with FreqAI enabled strategies*
        This function will automatically expand the defined features on the config defined
        `include_timeframes`, `include_shifted_candles`, and `include_corr_pairs`.
        In other words, a single feature defined in this function
        will automatically expand to a total of
        `include_timeframes` * `include_shifted_candles` * `include_corr_pairs`
        numbers of features added to the model.

        Features defined here will *not* be automatically duplicated on user defined
        `indicator_periods_candles`

        All features must be prepended with `%` to be recognized by FreqAI internals.

        Access metadata such as the current pair/timeframe with:

        `metadata["pair"]` `metadata["tf"]`

        More details on how these config defined parameters accelerate feature engineering
        in the documentation at:

        https://www.freqtrade.io/en/latest/freqai-parameter-table/#feature-parameters

        https://www.freqtrade.io/en/latest/freqai-feature-engineering/#defining-the-features

        :param dataframe: strategy dataframe which will receive the features
        :param metadata: metadata of current pair
        dataframe["%-pct-change"] = dataframe["close"].pct_change()
        dataframe["%-ema-200"] = ta.EMA(dataframe, timeperiod=200)
        """
        dataframe["%-pct-change"] = dataframe["close"].pct_change()
        dataframe["%-raw_volume"] = dataframe["volume"]
        if metadata["tf"] == '6h':
            dataframe = pivot_points(dataframe,4,self.piv_num)
            # Distance from Pivot Points
            dataframe['%-distance_from_pp'] = (
                dataframe["close"] - dataframe['%-pp'])
            for i in range(1, self.piv_num + 1):
                dataframe[f'%-distance_from_s{i}'] = (
                dataframe['close'] - dataframe[f'%-s{i}'])
                dataframe[f'%-distance_from_r{i}'] = (
                dataframe['close'] - dataframe[f'%-r{i}'])

            # Relative Position to Pivot Points
            dataframe['%-above_pp'] = (
                dataframe['close'] > dataframe['%-pp'])
            for i in range(1, self.piv_num + 1):
                dataframe[f'%-below_s{i}'] = (
                    dataframe['close'] < dataframe[f'%-s{i}'])
                dataframe[f'%-above_r{i}'] = (
                    dataframe['close'] > dataframe[f'%-r{i}'])

            # Pivot Point Breakout
            dataframe['%-breakout_above_pp'] = (
                (dataframe['close'] > dataframe['%-pp']) & \
                (dataframe['close'].shift(1) <= \
                dataframe['%-pp'].shift(1)))
            for i in range(1, self.piv_num + 1):
                dataframe[f'%-breakout_below_s{i}'] = ((dataframe['close'] < \
                    dataframe[f'%-s{i}']) & \
                    (dataframe['close'].shift(1) >= \
                    dataframe[f'%-s{i}'].shift(1)))
                dataframe[f'%-breakout_above_r{i}'] = ((dataframe['close'] > \
                    dataframe[f'%-r{i}']) & \
                    (dataframe['close'].shift(1) <= \
                    dataframe[f'%-r{i}'].shift(1)))

            # Pivot Point Range
            for i in range(1, self.piv_num + 1):
                dataframe[f'%-range_pp_s{i}'] = (
                    dataframe['%-pp'] - \
                    dataframe[f'%-s{i}'])
                dataframe[f'%-range_pp_r{i}'] = (
                    dataframe[f'%-r{i}'] - \
                    dataframe['%-pp'])

                if i < self.piv_num:
                    dataframe[f'%-range_s{i}_s{i+1}'] = (
                        dataframe[f'%-s{i}'] - \
                        dataframe[f'%-s{i+1}'])
                    dataframe[f'%-range_r{i}_r{i+1}'] = (
                        dataframe[f'%-r{i+1}'] - \
                        dataframe[f'%-r{i}'])
        print("feature engineering basic nan values")
        check_nan_values(dataframe)
        return dataframe

    def feature_engineering_standard(
            self, dataframe: DataFrame, metadata: dict, **kwargs) -> DataFrame:
        """
        *Only functional with FreqAI enabled strategies*
        This optional function will be called once with the dataframe of the base timeframe.
        This is the final function to be called, which means that the dataframe entering this
        function will contain all the features and columns created by all other
        freqai_feature_engineering_* functions.

        This function is a good place to do custom exotic feature extractions (e.g. tsfresh).
        This function is a good place for any feature that should not be auto-expanded upon
        (e.g. day of the week).

        All features must be prepended with `%` to be recognized by FreqAI internals.

        Access metadata such as the current pair with:

        `metadata["pair"]`

        More details about feature engineering available:

        https://www.freqtrade.io/en/latest/freqai-feature-engineering

        :param dataframe: strategy dataframe which will receive the features
        :param metadata: metadata of current pair
        usage example: dataframe["%-day_of_week"] = (dataframe["date"].dt.dayofweek + 1) / 7
        """
        dataframe["%-raw_close"] = dataframe["close"]
        dataframe["%-raw_open"] = dataframe["open"]
        dataframe["%-raw_high"] = dataframe["high"]
        dataframe["%-raw_low"] = dataframe["low"]
        dataframe["%-day_of_week"] = dataframe["date"].dt.dayofweek
        dataframe["%-hour_of_day"] = dataframe["date"].dt.hour
        print("feature engineering standard nan values")
        check_nan_values(dataframe)
        return dataframe

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        """
        Adds several different TA indicators to the given DataFrame

        Performance Note: For the best performance be frugal on the number of indicators
        you are using. Let uncomment only the indicator you are using in your strategies
        or your hyperopt configuration, otherwise you will waste your memory and CPU usage.
        :param dataframe: Dataframe with data from the exchange
        :param metadata: Additional information, like the currently traded pair
        :return: a Dataframe with all mandatory indicators for the strategies
        """
        dataframe = self.freqai.start(dataframe, metadata, self)
        # ------------------------------------
        # first check if dataprovider is available
        if self.dp:
            if self.dp.runmode.value in ('live', 'dry_run'):
                ob = self.dp.orderbook(metadata['pair'], 1)
                dataframe['best_bid'] = ob['bids'][0][0]
                dataframe['best_ask'] = ob['asks'][0][0]
        return dataframe


    def populate_entry_trend(self, df: DataFrame, metadata: dict) -> DataFrame:

        enter_long_conditions = [df["do_predict"] == 1, df["&-action"] == 1]

        if enter_long_conditions:
            df.loc[
                reduce(lambda x, y: x & y, enter_long_conditions), ["enter_long", "enter_tag"]
            ] = (1, "long")

        enter_short_conditions = [df["do_predict"] == 1, df["&-action"] == 3]

        if enter_short_conditions:
            df.loc[
                reduce(lambda x, y: x & y, enter_short_conditions), ["enter_short", "enter_tag"]
            ] = (1, "short")
        return df

    def populate_exit_trend(self, df: DataFrame, metadata: dict) -> DataFrame:
        exit_long_conditions = [df["do_predict"] == 1, df["&-action"] == 2]
        if exit_long_conditions:
            df.loc[reduce(lambda x, y: x & y, exit_long_conditions), "exit_long"] = 1

        exit_short_conditions = [df["do_predict"] == 1, df["&-action"] == 4]
        if exit_short_conditions:
            df.loc[reduce(lambda x, y: x & y, exit_short_conditions), "exit_short"] = 1
        return df

    def set_freqai_targets(self, dataframe: DataFrame, metadata: dict, **kwargs):

        dataframe["&-action"] = 0

        return dataframe

    def confirm_trade_entry(
        self,
        pair: str,
        order_type: str,
        amount: float,
        rate: float,
        time_in_force: str,
        current_time,
        entry_tag,
        side: str,
        **kwargs,
    ) -> bool:

        df, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
        last_candle = df.iloc[-1].squeeze()

        if side == "long":
            if rate > (last_candle["close"] * (1 + 0.0025)):
                return False
        else:
            if rate < (last_candle["close"] * (1 - 0.0025)):
                return False

        return True

    def leverage(self, pair: str, current_time: datetime, current_rate: float,
                 proposed_leverage: float, max_leverage: float, entry_tag: Optional[str],
                 side: str, **kwargs) -> float:

        max_leverage = 10

        return max_leverage

def check_nan_values(df):
    print("Number of NaN values in each column:")
    for column in df.columns:
        nan_count = df[column].isnull().sum()
        print(f"{column}: {nan_count}")

def pivot_points(dataframe, timeperiod, pivot_num):
    dataframe['%-pp'] = (dataframe['high'].rolling(timeperiod).max().shift(1) +
                        dataframe['low'].rolling(timeperiod).min().shift(1) +
                        dataframe['close'].rolling(timeperiod).mean().shift(1)) / 3

    dataframe['%-r1'] = dataframe['%-pp'] + (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 0.382
    dataframe['%-s1'] = dataframe['%-pp'] - (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 0.382

    dataframe['%-r2'] = dataframe['%-pp'] + (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 0.618
    dataframe['%-s2'] = dataframe['%-pp'] - (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 0.618
    dataframe['%-r3'] = dataframe['%-pp'] + (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 1.000
    dataframe['%-s3'] = dataframe['%-pp'] - (dataframe['high'].rolling(
        timeperiod).max().shift(1) -
        dataframe['low'].rolling(timeperiod).min().shift(1)) * 1.000
    for i in range(4, pivot_num + 1):
        if i == 4:
            dataframe[f'%-r{i}'] = dataframe['%-pp'] + (
                dataframe['high'].rolling(timeperiod).max().shift(1) -
                dataframe['low'].rolling(timeperiod).min().shift(1)) * 1.382
            dataframe[f'%-s{i}'] = dataframe['%-pp'] - (
                dataframe['high'].rolling(timeperiod).max().shift(1) -
                dataframe['low'].rolling(timeperiod).min().shift(1)) * 1.382
        else:
            dataframe[f'%-r{i}'] = dataframe['%-pp'] + (
                dataframe['high'].rolling(timeperiod).max().shift(1) -
                dataframe['low'].rolling(timeperiod).min().shift(1)) * ((i - 2)+0.618)
            dataframe[f'%-s{i}'] = dataframe['%-pp'] - (
                dataframe['high'].rolling(timeperiod).max().shift(1) -
                dataframe['low'].rolling(timeperiod).min().shift(1)) * ((i - 2)+0.618)
    return dataframe

Please, i would appreciate if anyone helps me with this, i tried changing config values and stuff to check if something changes, but no.
I used the following command to backtest:
freqtrade backtesting --strategy saturnRsiPivot --strategy-path user_data/strategies --freqaimodel SaturnReinforcementLearner --timerange=20230101-20230130 --config user_data/strategies/saturn_config.json --breakdown month
I already tried using another identifier for this run. Thanks in advanced.
Also, this line in my log really catches my attention:
2024-04-13 16:51:50,509 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai to 2940 2024-04-13 16:51:50,511 - freqtrade.data.history.history_utils - INFO - Using indicator startup period: 2940 ...

I tested and it also happens with one of the example strategies, so... is it an expected behavior? i messed up my config file maybe? or... there's something else im not seeing? If its expected, then that's weird af, since it means that ill not be able to backtest my strategy since the results will all be messed up since it runs some cycles with less than 10 datapoints.

Yeah, now i tested with an example RL template, the default reward function and an example freqai config, and it just behaves the same. Is it there any explaination for this? i dont understand why does it happen, but at this point it obviously isn't a configuration/strategy issue. Thanks beforehand.

Hello, as i said, i actually downloaded the data. I'm backtesting this timerange: 20240101-20240130. and i downloaded the needed data for the timeframes and pairs between 2020-01-01 up to 2024-03-31

The files you provided do not correspond to your logs, your whitelist says you dont include BNB/USDT:USDT, but your logs indicate that this pair is where you are having the issue. It is a wild goose chase if you aren't going to provide exact files.

Best would be to backup, start with the quick start command files, run your backtest, then make changes one a time to identify which change is causing your problem. This is how you remove complexity from the problem - the quick start files are a benchmark between user and developer.

In other words, the quick start files eliminate the wild goose chase :).

A scan of your config etc I see some issues that you'd likely find by following the recommended approach above.

It may be undefined behavior, you are setting your backtest_period_days > your timerange. Generally you would be setting backtest_period_days << timerange.

Have a look at the parameter to better understand how to use backtest_period_days https://www.freqtrade.io/en/stable/freqai-parameter-table/#parameter-table

If you seek further assistance, please go ahead and follow the steps of starting with quick start files and identifying the change that causes your problem.

Ok, ill go with the quick start method, thanks.

Ok, i just tested with the docker quick start method and it runs like a charm, not a single data point dropped, same commands, same config, same strategy file (i just copy pasted those), so i dont know what the hell is wrong with my local environment. Well, ill just keep using the docker environment. Thanks, for your guidance!