The "MADisplaceV3" strategy is designed to backtest trading strategies. It has three main functions: "populate_indicators," "populate_buy_trend," and "populate_sell_trend."
The "populate_indicators" function is responsible for calculating and populating the necessary indicators for the strategy. It takes a DataFrame and metadata as inputs and returns the updated DataFrame with indicators.
If the strategy is running in "hyperopt" mode, it retrieves an informative DataFrame and merges it with the input DataFrame.
Then it calculates the main indicators and adds them to the DataFrame.
The "populate_buy_trend" function determines the buy signals for the strategy. It takes a DataFrame and metadata as inputs and returns the updated DataFrame with buy signals. In "hyperopt" mode, if the 'uptrend' indicator is not present in the DataFrame, it retrieves informative indicators, merges them with the DataFrame, and calculates the main indicators. Then it applies specific conditions to identify buy signals based on various factors such as RSI, uptrend, close price, moving averages, and volume. The "populate_sell_trend" function determines the sell signals for the strategy. It takes a DataFrame and metadata as inputs and returns the updated DataFrame with sell signals. Similar to the "populate_buy_trend" function, it retrieves informative indicators, merges them with the DataFrame, calculates the main indicators, and then applies conditions to identify sell signals based on factors such as uptrend, close price, moving averages, and volume. The code also includes additional lines to merge informative pairs, rename columns, and handle data skipping. Overall, the strategy uses a combination of indicators and specific conditions to generate buy and sell signals based on the given input DataFrame.
Traceback (most recent call last):
File "/freqtrade/freqtrade/main.py", line 42, in main
return_code = args['func'](args)
^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/commands/optimize_commands.py", line 58, in start_backtesting
backtesting.start()
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1363, in start
data, timerange = self.load_bt_data()
^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 237, in load_bt_data
data = history.load_data(
^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/data/history/history_utils.py", line 99, in load_data
hist = load_pair_history(pair=pair, timeframe=timeframe,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/data/history/history_utils.py", line 57, in load_pair_history
return data_handler.ohlcv_load(pair=pair,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/data/history/idatahandler.py", line 319, in ohlcv_load
pairdf = self._ohlcv_load(
^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/data/history/featherdatahandler.py", line 62, in _ohlcv_load
pairdata = read_feather(filename)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/io/feather_format.py", line 148, in read_feather
return feather.read_feather(
^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pyarrow/feather.py", line 226, in read_feather
return (read_table(
^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pyarrow/feather.py", line 252, in read_table
reader = _feather.FeatherReader(
^^^^^^^^^^^^^^^^^^^^^^^
File "pyarrow/_feather.pyx", line 79, in pyarrow._feather.FeatherReader.__cinit__
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: File is too small to be a well-formed file