Skip to content

Commit

Permalink
Forgot to assign self.stoploss_trail_order in opening price
Browse files Browse the repository at this point in the history
  • Loading branch information
shercostiniano committed Jun 25, 2021
1 parent 81213e0 commit 5a513e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/fastquant/strategies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def next(self):
if self.stop_trail:
if self.transaction_logging:
self.log("Stop trail: {}".format(self.stop_trail))
self.sell(
self.stoploss_trail_order = self.sell(
exectype=bt.Order.StopTrail,
trailpercent=self.stop_trail,
size=final_size,
Expand Down

0 comments on commit 5a513e6

Please sign in to comment.