Exemplo n.º 1
0
 def unregisterPositionOrder(self, position, order):
     del self.__orderToPosition[order.getId()]
     if not position.isOpen():
         self.__activePositions.remove(position)
Exemplo n.º 2
0
 def unregisterPosition(self, position):
     assert(not position.isOpen())
     self.__activePositions.remove(position)
Exemplo n.º 3
0
 def unregisterPositionOrder(self, position, order):
     del self.__orderToPosition[order.getId()]
     if not position.isOpen():
         self.__activePositions.remove(position)
Exemplo n.º 4
0
 def registerPositionOrder(self, position, order):
     assert (position.isOpen()
             )  # Why register an order for a closed position ?
     self.__activePositions.add(position)
     assert (order.isActive())  # Why register an inactive order ?
     self.__orderToPosition[order.getId()] = position
Exemplo n.º 5
0
 def registerPositionOrder(self, position, order):
     assert position.isOpen()  # Why register an order for a closed position ?
     self.__activePositions.add(position)
     assert order.isActive()  # Why register an inactive order ?
     self.__orderToPosition[order.getId()] = position
Exemplo n.º 6
0
 def __unregisterOrder(self, position, order):
     del self.__orderToPosition[order]
     if not position.isOpen():
         self.__activePositions.remove(position)
Exemplo n.º 7
0
 def __registerOrder(self, position, order):
     assert(position.isOpen()) # Why would be registering an order for a closed position ?
     self.__activePositions.add(position)
     assert(order.isAccepted())
     self.__orderToPosition[order] = position