The BBRSI strategy is a backtesting strategy implemented in Python for trading cryptocurrencies. It utilizes the Bollinger Bands and Relative Strength Index (RSI) indicators to generate buy and sell signals. Here's a breakdown of the important parts of the strategy:
Indicators:
RSI: Calculates the RSI indicator for the given dataframe.
Bollinger Bands: Calculates the lower, middle, and upper bands of the Bollinger Bands indicator using the typical price.
Buy Signal:
The buy signal is generated when the following conditions are met:
RSI is below 74.
The closing price is below the middle Bollinger Band. Sell Signal:
The sell signal is generated when the following condition is met:
The closing price is above the upper Bollinger Band. Trading Parameters:
Minimal ROI: Specifies the minimum desired return on investment (ROI) for the strategy at different stages. Stoploss: Defines the optimal stop-loss level for the strategy. Trailing Stop: Enables trailing stop functionality. Timeframe: Specifies the timeframe for the strategy, which is set to 15 minutes. Order Types and Time in Force:
Defines the order types for different scenarios (buy, sell, emergency sell, force buy, force sell, stop loss). Specifies the time in force for buy and sell orders (set to 'gtc', meaning "good 'til canceled"). The BBRSI strategy aims to capture potential buying opportunities when the RSI is below a certain threshold and the price is below the middle Bollinger Band. It attempts to sell when the price exceeds the upper Bollinger Band. The strategy also incorporates a stop-loss mechanism and trailing stop functionality to manage risk. Please note that the strategy provided is the default implementation in the Freqtrade bot framework, and it can be overridden or customized to fit specific trading preferences and market conditions.
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 1364, in start
self.load_bt_data_detail()
File "/freqtrade/freqtrade/optimize/backtesting.py", line 266, in load_bt_data_detail
self.detail_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: Not an Arrow file