ENH: Always process new orders

Allows for updating of new_orders even when handle_data isn't called
This commit is contained in:
Richard Frank
2014-01-10 13:19:02 -05:00
parent dadf867cf4
commit 15dd1f9c0e
+7 -7
View File
@@ -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.