You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the bot tries to open a position, a crash occurs with the following traceback:
File "/home/user/FXBot/main.py", line 139, in <module>
trader = MomentumLive(cfg, instrument, granularity, window, units, stop_loss=stop_loss,
File "/home/user/FXBot/livetrading/MomentumLive.py", line 34, in __init__
super().__init__(
File "/home/user/FXBot/livetrading/LiveTrader.py", line 77, in __init__
self.stream_data(self._instrument)
File "/home/user/.local/lib/python3.9/site-packages/tpqoa/tpqoa.py", line 357, in stream_data
self.on_success(msg.time,
File "/home/user/FXBot/livetrading/LiveTrader.py", line 199, in on_success
self.trade()
File "/home/user/FXBot/livetrading/LiveTrader.py", line 206, in trade
if self._data["position"].iloc[-1] == 1:
File "/home/user/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 895, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "/home/user/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1501, in _getitem_axis
self._validate_integer(key, axis)
File "/home/user/.local/lib/python3.9/site-packages/pandas/core/indexing.py", line 1444, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
The text was updated successfully, but these errors were encountered:
What happened with this? I'm getting this error. I'm using a demo account, trying to use momentum strategy. It crashes with the exact error when it tries to open a trade.
What happened with this? I'm getting this error. I'm using a demo account, trying to use momentum strategy. It crashes with the exact error when it tries to open a trade.
When the bot tries to open a position, a crash occurs with the following traceback:
The text was updated successfully, but these errors were encountered: