Closed Nai-mul closed 3 years ago
Traceback (most recent call last):
File "/home/n/bot/freqtrade/main.py", line 37, in main
return_code = args'func'
File "/home/n/bot/freqtrade/commands/optimize_commands.py", line 54, in start_backtesting
backtesting.start()
File "/home/n/bot/freqtrade/optimize/backtesting.py", line 534, in start
min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
File "/home/n/bot/freqtrade/optimize/backtesting.py", line 492, in backtest_one_strategy
preprocessed = self.strategy.ohlcvdata_to_dataframe(data)
File "/home/n/bot/freqtrade/strategy/interface.py", line 712, in ohlcvdata_to_dataframe
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair})
File "/home/n/bot/freqtrade/strategy/interface.py", line 712, in
your definition of generateTillsonT3 is def generateTillsonT3(self, dataframe, volume_factor, t3Length):
.
as such - you'll need to pass in the whole dataframe, not seperate close / high / low columns.
Hi, can you copy and check this code? after your comment i remove dataframe['high'] and dataframe['low'] from populate_indicators.
tillsont3 = self.generateTillsonT3(dataframe['close'], dataframe['high'], dataframe['low'], volume_factor, t3length)
and edit that like below
tillsont3 = self.generateTillsonT3(dataframe['close'], volume_factor, t3length).
after adding It's, backtest was start but It's crash suddenly.
021-08-09 01:08:15,370 - freqtrade.optimize.backtesting - INFO - Loading data from 2021-07-26 12:00:00 up to 2021-07-30 00:00:00 (3 days).
2021-08-09 01:08:15,370 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators
2021-08-09 01:08:15,371 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy tillsont3
2021-08-09 01:08:15,371 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/home/n/bot/freqtrade/main.py", line 37, in main
return_code = args'func'
File "/home/n/bot/freqtrade/commands/optimize_commands.py", line 54, in start_backtesting
backtesting.start()
File "/home/n/bot/freqtrade/optimize/backtesting.py", line 534, in start
min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
File "/home/n/bot/freqtrade/optimize/backtesting.py", line 492, in backtest_one_strategy
preprocessed = self.strategy.ohlcvdata_to_dataframe(data)
File "/home/n/bot/freqtrade/strategy/interface.py", line 712, in ohlcvdata_to_dataframe
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair})
File "/home/n/bot/freqtrade/strategy/interface.py", line 712, in
Your call is wrong again.
tillsont3 = self.generateTillsonT3(dataframe['close'], volume_factor, t3length).
should be tillsont3 = self.generateTillsonT3(dataframe, volume_factor, t3length).
What i don't understand - you seem to have written both methods - but you don't know how to call your method ?
Anyway - for this type of issues - best use the search engine of your preference. It's not relate to freqtrade directly, but to simple programming / pandas topics.
below is my code. i cant understand where is the problem.