hugocen / freqtrade-gym

A customized gym environment for developing and comparing reinforcement learning algorithms in crypto trading.
GNU General Public License v3.0
223 stars 45 forks source link

'IndicatorforRL' object has no attribute 'ohlcvdata_to_dataframe' #18

Closed evo11x closed 3 years ago

evo11x commented 3 years ago

I have installed the files in freqtrade and get this error in freqtradegym.py at line 45, when I try to run deep_rl.py

Exception has occurred: AttributeError 'IndicatorforRL' object has no attribute 'ohlcvdata_to_dataframe'

I don't know from where comes this ohlcvdata_to_dataframe function, I cannot find it anywhere declared...

evo11x commented 3 years ago

I fixed it by changing the line to preprocessed = ohlcv_to_dataframe(data, pair=pair, timeframe=self.timeframe)

but now I get this error

Exception has occurred: KeyError
'date'
  File "freqtrade-develop\freqtrade\data\converter.py", line 141, in trim_dataframe
    df = df.loc[df[df_date_col] >= start, :]
  File "freqtrade-develop\freqtradegym.py", line 59, in __init__
    dfs.append(trim_dataframe(df, timerange))
  File "freqtrade-develop\deep_rl.py", line 13, in <module>
    env = TradingEnv(config)
perrolokos commented 3 years ago

Use freqtrade 2020.11 version