kieran-mackle / AutoTrader

A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.

Home Page:https://kieran-mackle.github.io/AutoTrader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

' Broker' object has no attribute '_allow_dancing_bears '

lanbuithe opened this issue · comments

I got error when deploying in livetrade mode (auto trade in paper environment)

Error log

2024-03-27 03:08:29,557 | ERROR | autobot | Error when updating strategy: 'Broker' object has no attribute '_allow_dancing_bears' (autobot.py:238)
2024-03-27 03:08:29,558 | INFO | autobot | Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.11/site-packages/autotrader/autobot.py", line 236, in _update
strategy_orders = self._strategy.generate_signal(timestamp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/src/autotrader-forex/strategies/ema_crossover.py", line 55, in generate_signal
data = self.broker.get_candles(self.instrument, granularity="1h", count=300)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/autotrader/brokers/oanda.py", line 269, in get_candles
data = self._response_to_df(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/autotrader/brokers/oanda.py", line 438, in _response_to_df
if self._allow_dancing_bears:
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Broker' object has no attribute '_allow_dancing_bears'
(autobot.py:239)

Version of AutoTrader being used
eg. Using version `1.1.2’