Limit orders

Alex_KollarosAlex_Kollaros Posts: 7
edited March 2017 in FAQs

What are the arguments for "Buy Limit BATS at Script Price"? Is there a time in force value?
Thanks

Comments

  • All limit orders are created as GTX (Good through Extended) unless the title of the voodoo indicates IOC or a specific order type isn't available in the extended hours. A "Peg" order type for example, which is only good during core hours, would have a DAY Time in Force. There is nothing in the title of the voodoo that indicates this.

  • Awesome Chris! Thanks. Do we have any public scripts that put a limit order and then cancel after X number of seconds?

  • That's how I did it..
    self.id = order.algo_sell(md.symbol, voodooGuid, 'init',order_quantity=orderShares, price=md.L1.bid, allow_multiple_pending=True, user_key=None, collect=trade_data )
    self.orderTime = event.timestamp
    self.stateF = 1

    if self.stateF == 1:
    self.cancelOrders(event,md,order,service,account)

    def cancelOrders(self, event, md, order, service, account):

        if account[md.symbol].position.shares == 0 and (account[md.symbol].pending.shares_long !=0 or account[md.symbol].pending.shares_short!=0) and (event.timestamp > self.orderTime + service.time_interval(0, 0, 10, 0) or event.timestamp == self.endtime):
            order.cancel(md.symbol,order_id = self.id)
    
Sign In or Register to comment.