ENH: Add a convenience property for open amount of a blotter.Order

Found that when implementing different slippage model, needed the
open amount in several places/functions, having the open amount
as a property of an order should help reduce the need for passing that
around and maintaining the value separately.
This commit is contained in:
Eddie Hebert
2013-06-12 10:10:09 -04:00
parent e24f581dcd
commit d1968429f1
+4
View File
@@ -261,3 +261,7 @@ class Order(object):
return False
return True
@property
def open_amount(self):
return self.amount - self.filled