Hi,
I have this code which was working but now no longer reports when the stop order is filled.
if ( order_id ):
stopQty = order_id.amount
if ( order_id.stop_reached ):
if ( order_id.filled != stopQty ):
salePrice = context.portfolio.positions[sid].last_sale_price
msg = "{s} {t} STOP order @ {p} waiting to be filled: ordered {o}, filled {f}"
msg = msg.format(s = sid, t = now, p = salePrice, o = stopQty, f = order_id.filled)
log.info(msg)
else:
context.stopFilled = True
msg = "{s} {t} STOP order filled ({o})"
msg = msg.format(s = sid, t = now, o = stopQty)
log.info(msg)
But I'm finding now that order_id.stop_reached is no longer true once order_id.filled == order_id.amount
Has this functionality changed recently?
Thanks,