def __init__(self, **kwargs): super(OandaBroker, self).__init__() self.o = oandastore.OandaStore(**kwargs) self.orders = collections.OrderedDict() # orders by order id self.notifs = collections.deque() # holds orders which are notified self.startingcash = self.cash = 0.0 self.startingvalue = self.value = 0.0 self.positions = collections.defaultdict(Position) self.addcommissioninfo(self, OandaCommInfo(mult=1.0, stocklike=False))
def __init__(self, **kwargs): super(OandaBroker, self).__init__() self.o = oandastore.OandaStore(**kwargs) self.orders = collections.OrderedDict() # orders by order id self.notifs = collections.deque() # holds orders which are notified self.opending = collections.defaultdict(list) # pending transmission self.brackets = dict() # confirmed brackets self.startingcash = self.cash = 0.0 self.startingvalue = self.value = 0.0 self.positions = collections.defaultdict(Position)