¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Is it possible to place order at 15:59 or 16:00 and get a fill?


 

Thanks for the suggestion, how would I put this MOC order within my bracket order, would this work?

Or do I not need to add a timecondition to an MOC order within this bracket?

# previous code replacing last part in bracket
# 3rd part: Sell Market order
moc = Order()
moc.orderId = opening.orderId + 3
moc.action = "SELL" if quantity > 0 else "BUY"
moc.orderType = "MOC"
moc.totalQuantity = abs(quantity)
moc.parentId = parentOrderId
moc.tif = "DAY" 

timeCondition = TimeCondition()
timeCondition.time = timeswitch
timeCondition.isMore = True
moc.conditions.append(timeCondition)

bracketOrder = [opening, trailingStopLoss, moc]
return bracketOrder

Join [email protected] to automatically receive all group messages.