I have already created a sheet which can display bid, ask, last, etc. Say, my user id is edemo, and I want to buy 200 shares of MSFT stock at SMART exchange. I set the id for the ticker at 10. It seems to be =edemo|ord!10?place?field2 What exact will the field2 be? Thanks for your help.
Hello, field2 = orderdescription 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_clientId_accountCode_goodAfterTime_ goodTillDate_faGroup_faMethod_faPercentage_faProfile_shortSaleSlot_ PRIMARYEXCHANGE _shortSaleLocation_ocaType_rthOnly_rule80A_settlingFirm_allOrNone_minimumQty_percentOffset_ electronicTradeOnly_firmQuoteOnly_nbboPriceCap_auctionStrategy_startingPrice_stockRefPrice_ delta_stockRangeLower_stockRangeUpper_volatility_volatilityType_referencePriceType_hedgeDelta_ continuousUpdate} More details on IB website > api > reference guide > excel DDE > DDE syntax for excel. BYE
Here is an example for futures: =yourserver|ord!'id2?place?BUY_1_YM_FUT_200812_ECBOT_USD_LMT_8000_{}_DAY_{}_{\}_O_0_HelloWorld_1_{}_0_0_0_0_0_0' id must always be greater than the last used id to transmit an order.
It's not complicated at all, it just means "buy 1 ym LIMIT @ 8000". You just have to replace" FUT" by "STK", "ECBOT" by "SMART"... It can't be any simpler than that... all the {} at the the end are empty fields for extended attributes, combos, complex order types.
Hi, I have never placed order using DDE before. So, after writing this formula, I need to paste it into a cell. Then the order will go out? Thanks.
Yep, replace also"yourserver" with your paper account name and don't forget the "=" at the beginning of the sentence. I have been in your shoes not a long time ago.It took me like one month to submit my first order since IB documentation is not really explicit and nobody was answering my questions on the net. If you have problems, go to the TWSAPI yahoo group... They are helpful for newbies.