@property
def pending(self):
- return list(filter(lambda t: not t.is_fullfiled, self.all))
+ return list(filter(lambda t: t.pending, self.all))
def compute_trades(self, values_in_base, new_repartition, only=None):
computed_trades = []
orders.append(trade.prepare_order(compute_value=compute_value))
self.market.report.log_orders(orders, only, compute_value)
+ def close_trades(self):
+ for trade in self.all:
+ trade.close()
+
def print_all_with_order(self, ind=""):
for trade in self.all:
trade.print_with_order(ind=ind)