mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 12:47:08 +08:00
BUG: Added sorting back to orders. This isn't a functional bug so much
as it is a backwards compat. Without sorting the orders are filled by order date. With sorting the orders are moved to back of queue after partil fills. If all orders are fully filled, there is no deviation. Also there is no portfolio difference as this is about assigning fills to equivalent orders.
This commit is contained in:
@@ -200,6 +200,7 @@ class Blotter(object):
|
||||
return
|
||||
|
||||
orders = self.open_orders[trade_event.sid]
|
||||
orders.sort(key=lambda o: o.dt)
|
||||
# Only use orders for the current day or before
|
||||
current_orders = filter(
|
||||
lambda o: o.dt <= trade_event.dt,
|
||||
|
||||
Reference in New Issue
Block a user