'Adds a new Position object to the Portfolio. This
requires getting the best bid/ask price from the
price handler in order to calculate a reasonable
"market value".
Once the Position is added, the Portfolio values
are updated.'

def _add_position(self, action, ticker, quantity, price, commission):

    if (ticker not in self.positions):
        if self.price_handler.istick():
            (bid, ask) = self.price_handler.get_best_bid_ask(ticker)
        else:
            close_price = self.price_handler.get_last_close(ticker)
            bid = close_price
            ask = close_price
        position = Position(action, ticker, quantity, price, commission, bid, ask)
        self.positions[ticker] = position
        self._update_portfolio()
    else:
        print ('Ticker    %s    is    already    in    the    positions    list.    Could    not    add    a    new    position.' % ticker)
