Skip to content

Commit

Permalink
Fix calling sizer with isbuy always True
Browse files Browse the repository at this point in the history
  • Loading branch information
mementum committed Apr 22, 2017
1 parent 9ecb54e commit b119eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtrader/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def sell(self, data=None,
data = self.getdatabyname(data)

data = data or self.datas[0]
size = size if size is not None else self.getsizing(data, isbuy=True)
size = size if size is not None else self.getsizing(data, isbuy=False)

if size:
return self.broker.sell(
Expand Down

0 comments on commit b119eaa

Please sign in to comment.