The limit order is placed at 9:31 but then immediately canceled in the next line.
At 9:31 on 1-2..
The current open is 48.18
The current price (ie the last close) is 48.31.
The limit price is 47.83.
Therefore the following executes (ie the open price is > limit)
if ESTdate.hour == 9 and ESTdate.minute == 31 and data.current(stock, 'open') > limit:
Therefore, the above if statement is true and and and order is created. So far so good. However the following if statement is now executed.
if data.current(stock, 'price') > 1.01 * limit or data.current(stock, 'price') < 0.95 * limit:
The current price (48.31) is greater than 1.01 x limit (48.308) so the if statement executes and the order is canceled.
Orders aren't filled 'in-line' but rather are simply placed in queue. They are executed at the beginning of the next minute. So, if it's canceled immediately then it will immediately be deleted from the queue and never fill.