diff --git a/catalyst/exchange/exchange_blotter.py b/catalyst/exchange/exchange_blotter.py index d4957e31..6ded5adf 100644 --- a/catalyst/exchange/exchange_blotter.py +++ b/catalyst/exchange/exchange_blotter.py @@ -214,7 +214,7 @@ class ExchangeBlotter(Blotter): # that this is safer until we have a robust way to track # the trades already processed by the algo. We can't loose # them if the algo shuts down. - if transactions and order.open_amount == 0: + if transactions and order.status == ORDER_STATUS.FILLED: avg_price = np.average( a=[t.price for t in transactions], weights=[t.amount for t in transactions],