Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'BollingerBandsLive' object has no attribute '_position' #37

Open
milandijhon opened this issue Mar 17, 2023 · 1 comment

Comments

@milandijhon
Copy link

i been getting this issue all day. everything was fine last night.

Traceback (most recent call last):
File "C:\Users\BNard\Documents\GitHub\FXBot-main\FXBot-main\main.py", line 143, in
trader = BollingerBandsLive(cfg, instrument, granularity, sma, deviation, units, stop_loss=stop_loss,
File "C:\Users\BNard\Documents\GitHub\FXBot-main\FXBot-main\livetrading\BollingerBandsLive.py", line 37, in init
super().init(
File "C:\Users\BNard\Documents\GitHub\FXBot-main\FXBot-main\livetrading\LiveTrader.py", line 45, in init
raise Exception("Sorry, markets are closed")
Exception: Sorry, markets are closed
Exception ignored in: <function LiveTrader.del at 0x00000242455913F0>
Traceback (most recent call last):
File "C:\Users\BNard\Documents\GitHub\FXBot-main\FXBot-main\livetrading\LiveTrader.py", line 82, in del
self.close_position()
File "C:\Users\BNard\Documents\GitHub\FXBot-main\FXBot-main\livetrading\LiveTrader.py", line 257, in close_position
if self._position != 0:
AttributeError: 'BollingerBandsLive' object has no attribute '_position'

@trentstauff
Copy link
Owner

Will look into this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants