The Schism6 trading strategy is designed to backtest and analyze trading performance. Here is a short description of what the strategy does:
It populates various technical indicators such as RMI (Relative Momentum Index), ROC (Rate of Change), and RSI (Relative Strength Index) on the input dataframe. It calculates additional indicator values based on the existing indicators and rolling window calculations.
If the stake currency is BTC or ETH, it retrieves additional data for the corresponding coin and fiat pairs and calculates RSI values.
It retrieves informative data for the given pair and timeframe and calculates additional indicators such as RSI, 1d high, 3d low, and average daily range (adr).
It merges the informative data with the input dataframe, filling any missing values. It generates buy signals based on various conditions. If there is an active trade, it considers factors like profit factor and linear growth. Otherwise, it checks conditions related to inf-guard (upper or lower), RSI, RMI trends, and other parameters. If the stake currency is BTC or ETH, it considers additional conditions based on RSI values for the stake currency and fiat. It checks for positive volume and applies the buy signal to the corresponding rows in the dataframe. It generates sell signals based on specified conditions. The implementation partially replaces the previous sell logic with a custom stop loss. The goal is to provide a pre-stop loss bailout, but most sell actions at a loss are expected to be triggered by the stop loss mechanism in live trading. Please note that the code provided is a partial implementation of the strategy and may require further validation, testing, and optimization.
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 1401, in start
min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1318, in backtest_one_strategy
preprocessed = self.strategy.advise_all_indicators(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1378, in advise_all_indicators
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair}).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1378, in
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair}).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1410, in advise_indicators
return self.populate_indicators(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/user_data/strategies/Schism_v1_6.py", line 168, in populate_indicators
dataframe.to_csv('user_data/foo.csv')
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/generic.py", line 3902, in to_csv
return DataFrameRenderer(formatter).to_csv(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/io/formats/format.py", line 1152, in to_csv
csv_formatter.save()
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/io/formats/csvs.py", line 247, in save
with get_handle(
^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/io/common.py", line 863, in get_handle
handle = open(
^^^^^
OSError: [Errno 30] Read-only file system: 'user_data/foo.csv'