fix tests
This commit is contained in:
@@ -16,7 +16,7 @@ class Test18(Strategy):
|
||||
(1, 13)
|
||||
]
|
||||
|
||||
def on_reduced_position(self):
|
||||
def on_reduced_position(self, order):
|
||||
self.take_profit = abs(self.position.qty), self.price
|
||||
|
||||
def go_short(self):
|
||||
|
||||
@@ -45,10 +45,10 @@ class Test29(Strategy):
|
||||
def should_cancel(self):
|
||||
return False
|
||||
|
||||
def on_take_profit(self):
|
||||
def on_take_profit(self, order):
|
||||
self.vars['should_long'] = False
|
||||
self.vars['should_short'] = False
|
||||
|
||||
def on_stop_loss(self):
|
||||
def on_stop_loss(self, order):
|
||||
self.vars['should_long'] = False
|
||||
self.vars['should_short'] = False
|
||||
|
||||
Reference in New Issue
Block a user