Package com.ib.client

Examples of com.ib.client.Order


        this.interactiveBrokers.client().reqAutoOpenOrders(autoBind);
    }

    public void open(String action, int quantity, String timeInForce, String type) {

        Order order = new Order();
        order.m_orderType = type;
        order.m_totalQuantity = quantity;
        order.m_tif = timeInForce;
        order.m_action = action;
View Full Code Here


        this.order(order);
    }

    public void open(String action, int quantity, String timeInForce, String type, double limit) {

        Order order = new Order();
        order.m_orderType = type;
        order.m_totalQuantity = quantity;
        order.m_tif = timeInForce;
        order.m_lmtPrice = limit;
        order.m_action = action;
View Full Code Here

        this.order(order);
    }

    public void open(String action, int quantity, String timeInForce, String type, double limit, double aux) {

        Order order = new Order();
        order.m_orderType = type;
        order.m_totalQuantity = quantity;
        order.m_tif = timeInForce;
        order.m_lmtPrice = limit;
        order.m_action = action;
View Full Code Here

        m_orderDlg.show();
        if( !m_orderDlg.m_rc ) {
            return;
        }

        Order order = m_orderDlg.m_order;
       
        // save old and set new value of whatIf attribute
        boolean savedWhatIf = order.m_whatIf;
        order.m_whatIf = whatIf;
       
View Full Code Here

        m_orderDlg.show();
        if( !m_orderDlg.m_rc ) {
            return;
        }

        Order order = m_orderDlg.m_order;
       
        // save old and set new value of whatIf attribute
        boolean savedWhatIf = order.m_whatIf;
        order.m_whatIf = whatIf;
       
View Full Code Here

        contract.m_exchange = "SMART";
        contract.m_primaryExch = "ISLAND";
        contract.m_currency = "USD";
        contract.m_localSymbol = "IBM";

        Order order = new Order();
        order.m_action = "BUY";
        order.m_totalQuantity = 100;
        order.m_orderType = "LMT";
        order.m_lmtPrice = 99.10;
        order.m_outsideRth = true;
View Full Code Here

        m_orderDlg.show();
        if( !m_orderDlg.m_rc ) {
            return;
        }

        Order order = m_orderDlg.m_order;
       
        // save old and set new value of whatIf attribute
        boolean savedWhatIf = order.m_whatIf;
        order.m_whatIf = whatIf;
       
View Full Code Here

                        Contract callContract = filterContracts("C");
                        Contract putContract = filterContracts("P");
                       
                        if (RequestIDManager.singleton().isOrderIdInitialized()) {
                            // Place buy straddle for 1 contract as market order
                            Order callOrder = createOrder("BUY", 1, "MKT");
                            Order putOrder = createOrder("BUY", 1, "MKT");
                       
                            eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), callContract, callOrder);
                            eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), putContract, putOrder);
                            System.out.println(" [Info] Buy straddle market order submitted for: " + underlyingData.toString());
                            sleep(WAIT_TIME * 30); // Hang around for order status updates...
View Full Code Here

            eClientSocket.eDisconnect();
        }
    }

    protected Order createOrder(String action, int quantity, String orderType) {
        Order order = new Order();

        order.m_action = action;
        order.m_totalQuantity = quantity;
        order.m_orderType = orderType;
        // order.m_transmit = true;
View Full Code Here

                        Contract callContract = filterContracts("C");
                        Contract putContract = filterContracts("P");
                       
                        if (RequestIDManager.singleton().isOrderIdInitialized()) {
                            // Place buy straddle for 1 contract as market order
                            Order callOrder = createOrder("BUY", 1, "MKT");
                            Order putOrder = createOrder("BUY", 1, "MKT");
                       
                            eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), callContract, callOrder);
                            eClientSocket.placeOrder(RequestIDManager.singleton().getNextOrderId(), putContract, putOrder);
                            System.out.println(" [Info] Buy straddle market order submitted for: " + underlyingData.toString());
                            sleep(WAIT_TIME * 30); // Hang around for order status updates...
View Full Code Here

TOP

Related Classes of com.ib.client.Order

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.