private void submitOrder(String label, OrderCommand orderCmd) throws JFException {
        this.order = engine.submitOrder(label, this.instrument, orderCmd, this.amount);

        while (order.getState() == IOrder.State.CREATED || order.getState() == IOrder.State.OPENED) {
            order.waitForUpdate(2, TimeUnit.SECONDS);
        }

        if (order.getState() == IOrder.State.CANCELED) {
            this.order = null;
        }
    }