Might work in simulation, but remember in real trade there will be delay after placing order:
?
? ? stop_loss_trade = ib.placeOrder(contract, stop_loss_order)
# BELOW might not be true always so quickly!
? ? if stop_loss_trade.isActive():
?
You should stick to event driven for robustness as you had before.