private void UpdateTradesNotFullyOffsetEachOther(PositionRowUpdater updater, MockFutureInstrument instrument,
                                                  string qty1, string price1, string qty2,
                                                  string price2)
 {
     //Todo: check the sign qty2 and qty1 is opposite and qty2 not equal to qty1
     updater.UpdateTrade(createMockFutureTrade(instrument, qty1, price1));
     updater.UpdateTrade(createMockFutureTrade(instrument, qty2, price2));
 }
 public void Init()
 {
     _futureInstrument            = new MockFutureInstrument("HSI16J");
     _futureInstrumentSymbol2     = new MockFutureInstrument("HSI16K");
     _positionRow                 = new PositionRowImpl(_futureInstrument, "Account1");
     _positionRowWithAccount2     = new PositionRowImpl(_futureInstrument, "Account2");
     _positionRowWithSymbol2      = new PositionRowImpl(_futureInstrumentSymbol2, "Account1");
     _futureMarketData            = new MockFutureMarketData(_futureInstrument);
     _futureMarketDataWithSymbol2 = new MockFutureMarketData(_futureInstrumentSymbol2);
     _rowUpdater             = new PositionRowUpdater(_positionRow, _futureMarketData);
     _rowUpdaterWithAccount2 = new PositionRowUpdater(_positionRowWithAccount2, _futureMarketData);
     _rowUpdaterWithSymbol2  = new PositionRowUpdater(_positionRowWithSymbol2, _futureMarketDataWithSymbol2);
 }
 private MockFutureTrade createMockFutureTrade(MockFutureInstrument futureInstrument, string quantity,
                                               string price)
 {
     return(new MockFutureTrade(futureInstrument, Convert(quantity).Value, Convert(price).Value));
 }
 public void Init()
 {
     _calculator       = new PositionMetricsCalculatorImpl();
     _futureInstrument = new MockFutureInstrument("HSI16J");
 }