Order order;
order.action = action;
order.orderType = "STP";
order.totalQuantity = quantity;
order.auxPrice = stopPrice;
order.account = account;
order.tif = i_tif;
order.outsideRth = true;
order.triggerMethod = 7;//7 - Last or bid/ask function https://interactivebrokers.github.io/tws-api/trigger_method_limit.html
triggerMethod не особо что-то сильно поменял (раньше было значение по-умолчанию — Last trade)