IB TWS DDE Place Order

Discussion in 'Automated Trading' started by zentrader, Apr 21, 2006.

  1. I want to learn how to use IB's DDE spreadsheet so I can build my own customised bracket orders.

    As a first step I am trying to use the order macro to send off a limit order for the ES futures in twsdemo. In the orders sheet I fill out the order description, run the macro, and the formula it places in the ctrl column is :

    =edemo|ord!'id1829480289?place?BUY_1_ES_FUT_200606_GLOBEX_USD_LMT_1300_{}_DAY_{}_{}_O_0_{}_1_{}_0_0_0_0_0_0_{}_{}_{}_{}_{}_{}_{}_{}_EMPTY_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_{}'

    Nothing happens in the TWS. My connection is valid because I have been able to get the ES quote data into the ticker sheet.

    According to TWS help, the order description parameters are as follows:
    orderDescription = side_quantity_symbol_secType_exp_strike_right_exchange_orderType_lmtPrice_auxPrice
    _timeInForce_ocaGroup_account_open/close_origin_orderRef_transmit_parentId_blockOrder
    _sweepToFill_displaySize_triggerMethod_ignoreRth_hidden_

    The two don't match up, not sure if this is a problem.

    Any suggestions to get this working greatly appreciated.