public IPositionInventory OpenPosition(OrderTransaction trans, PositionInventoryMethod positionResolution) { IPositionInventory position; if (positionResolution == PositionInventoryMethod.Fifo) { position = new PositionInventoryFifo(); } else { position = new PositionInventoryLifo(); } position.Add(trans); return(position); }
public IPositionInventory OpenPosition(OrderTransaction trans, PositionInventoryMethod positionResolution) { IPositionInventory position; if (positionResolution == PositionInventoryMethod.Fifo) position = new PositionInventoryFifo(); else { position = new PositionInventoryLifo(); } position.Add(trans); return position; }
public void Setup() { lifo = new PositionInventoryLifo(); fifo = new PositionInventoryFifo(); }