forked from mementum/backtrader
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Hi,
Using Bitmex feed and Bitmex broker on BTC/USD production. (same before and after 0ce07e5)
I have a strange position object.
First self.getposition().size does not exist :
File "D:\Dev2\Anaconda3\lib\site-packages\backtrader\strategy.py", line 325, in _next
super(Strategy, self)._next()
File "D:\Dev2\Anaconda3\lib\site-packages\backtrader\lineiterator.py", line 266, in _next
self.next()
File "D:\Dev2\Dev\JimTrading\BTStrategies.py", line 150, in next
if self.getposition().size>0:
AttributeError: 'float' object has no attribute 'size'
And if I run :
def __init__(self):
print(self.getposition())
I get a float :
0.01
which seems to be the account value and not my position on future perpetual contract XBTUSD.
Could it be CCXT error ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels