Example #1
0
 def __init__(self):
     """ Initializes an empty queue with given tickSize
     and remembers order book the queue belong to if any
     """
     from marketsim.gen._out.orderbook._lasttradeimpl import LastTradeImpl
     self.lastTrade = LastTradeImpl()
     self.reset()
     from marketsim.gen._out.orderbook._bestpriceimpl import BestPriceImpl
     self.bestPrice = BestPriceImpl(self)
Example #2
0
 def __init__(self):
     self.queue.bestPrice += _(self)._onBestChanged
     self.bestPrice = BestPriceImpl(self)
     self.lastTrade = LastTradeImpl()
     self.queue.lastTrade += _(self)._onTraded
     self.reset()