mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-25 13:10:33 +08:00
ENH: Always process new orders
Allows for updating of new_orders even when handle_data isn't called
This commit is contained in:
@@ -155,13 +155,13 @@ class AlgorithmSimulator(object):
|
||||
self.algo.handle_data(self.current_data)
|
||||
updated = False
|
||||
|
||||
# run orders placed in the algorithm call
|
||||
# above through perf tracker before emitting
|
||||
# the perf packet, so that the perf includes
|
||||
# placed orders
|
||||
for order in self.algo.blotter.new_orders:
|
||||
self.algo.perf_tracker.process_event(order)
|
||||
self.algo.blotter.new_orders = []
|
||||
# run orders placed in the algorithm call
|
||||
# above through perf tracker before emitting
|
||||
# the perf packet, so that the perf includes
|
||||
# placed orders
|
||||
for order in self.algo.blotter.new_orders:
|
||||
self.algo.perf_tracker.process_event(order)
|
||||
self.algo.blotter.new_orders = []
|
||||
|
||||
# If we are instantly filling we execute orders
|
||||
# in this iteration rather than the next.
|
||||
|
||||
Reference in New Issue
Block a user