def setUp(self): home_currency = "GBP" position_type = "short" currency_pair = "GBPUSD" units = Decimal("2000") ticker = TickerMock() self.position = Position(home_currency, position_type, currency_pair, units, ticker)
def add_new_position( self, position_type, currency_pair, units, ticker ): ps = Position( self.home_currency, position_type, currency_pair, units, ticker ) self.positions[currency_pair] = ps
def add_new_position(self, side, market, units, exposure, add_price, remove_price): ps = Position(side, market, units, exposure, add_price, remove_price) self.positions[market] = ps
def add_new_position(self, position_type, market, units, exposure, bid, ask): ps = Position(position_type, market, units, exposure, bid, ask) self.positions[market] = ps