from my expirience better to short first and then -buy long side. spread calculations and everything else(including orders handling) can be done in excel. use IB DDE example . there no guarantee at all. even liquid stocks can't be borrowed from tme to time. not to mention price\size match.
thanks BOB11 for response, the problem is that I do not use excel. I just understand that I should be possible from the TWS. Concerning the short sale I can inform you that I checked it and my symbol is shortable so that's not the problem. For my strategy it would be the best to do both trades just at once (its a kind of arb trade and as you know these opportunities will be there for a very short term period (seconds can be long)
Try the following test (assuming that you have no position in stocks A and B): Buy 100 shares of stock A. As a spread: Sell 100 of A and Buy 100 of B. This way you should see that the system gives you a fill almost immediately (assuming that your spread price touches the spread NBBO). By establishing the long position in A first, you get around the down-tick rules for short, etc.
then-it's a must to create your own application. even if it excel. i would calculate spread then not from last price but between bid on short side and ask on long. plus-signal must be given only if sizes on both sides equal or greater yours. then-there better possibility of getting filled on both sides at same time.
o.k., I tried a trade between 2 Nasdaq symbols and I was able to get an execution, so it worked. For my strategy I need an execution between a NYSE and Nasdaq symbol. Therefore there might be some problem with up tick rule or something else. Thanks all for answers.
1. Just to be clear, you are using the bid for the short and the ask for the buy in determining that your order should be executed, right? That is, if it's: Ticker Bid-Ask BidSizexAskSize AMD 20.50-20.55 10x10 INTC 17.45-17.50 10x10 Sell AMD/Buy INTC needs a spread of $3.00 or less to be marketable. 2. In this example, AMD is a Reg SHO "A" stock, and so does not require an uptick. In other cases, you need to be sure that the short stock is either uptick-exempt, or that the bid price you are attempting to hit is either a legal upbid (for Naz stocks), or would result in a zero-plus-tick for NYSE stocks. 3. In the case of listed stocks (i.e. NYSE/AMEX), IB may require that the bid/offer you are attempting to hit/take be on an ECN (and probably that the ECN be at the NBBO or better and that the market is not locked/crossed), so they can be assured of an instant execution. They may possibly loosen this up for NYSE stocks if the current quote appears to be NX-eligible (allowing for auto-ex at NYSE). I'd suggest turning on auditing (Configure->Misc->Create Audit Trail) and, if you get a situation where the order should qualify under the above guidelines (at least) and does not get filled, send a trouble ticket with the audit trail for the specific order that didn't work so they can research it.