'Generates a buy :class:`pyalgotrade.broker.MarketOrder` to enter a long position.
:param instrument: Instrument identifier.
:type instrument: string.
:param quantity: Entry order quantity.
:type quantity: int.
:param goodTillCanceled: True if the entry order is good till canceled. If False then the order gets automatically canceled when the session closes.
:type goodTillCanceled: boolean.
:param allOrNone: True if the orders should be completely filled or not at all.
:type allOrNone: boolean.
:rtype: The :class:`pyalgotrade.strategy.position.Position` entered.'

def enterLong(self, instrument, quantity, goodTillCanceled=False, allOrNone=False):

    return pyalgotrade.strategy.position.LongPosition(self, instrument, None, None, quantity, goodTillCanceled, allOrNone)
