API can help to have better fills on IB TWS

Discussion in 'Index Futures' started by allesim, Mar 24, 2002.

  1. allesim


    Dear Tripack
    Dear DEF

    Thanks to both of you for your smart and useful posts.
    And thanks to IB for trying to improve their quote issue.

    Can you, Tripack please spend more words about your post?
    I do have eSignal as source of quotes
    I trade futures emini (NQM2 ESM2)

    Yes I do experience, expecially between 9:30 and 9:50 some occasional delays of IB quotes, even some freeziing...

    Using API I can create an execution tool like this:
    - I get Real realtime quotes from eSignal source
    - based on eSignal quotes, when my price-condition is met, my API tool generates (on IB TWS) an Order, say, (Limit or Market) Buy n ESM2 contracts.

    But will this order execute if IB quotes are lagging, say, 10 secs behind eSignal quotes?

    I guess YES if IB immediatly forward my order to Globex
    (Limit orders?)
    I guess NO if IB keep my order on its server, supposing its server sees the wrong lagging quote.
    (Stop Orders ?)

    Def what is your opinion?

    Tripack wrote:
    I agree with your points Catoosa. I too would like timely quotes. However IB has provided the tools necessary to circumvent this problem in the form of the ActiveX API. It would be feasible to create an order placing program that uses data from a different source and transmits orders via ActiveX. This is probably a bit of work but if it is costing you money you might be motivated to do this.
  2. oneway


    What is an API? And why would you want a computer to do the order entry for you?

    I trade ES and NQ and just use the marketorder. I never experience delays or problems with my trades. The order fill is instantaneous (I only trade up to 10 contracts). I send the order when their is an abundence of either buyers or sellers..

    Just wondering
  3. allesim:

    There are a few ways you can go with this. The first is to create a tool in either Excel or a full programming language like C++ Delphi or VB etc., and pump Data Vendor #2's quotes into it (by whatever mechanism Data Vendor #2 allows eg: ActiveX, DDE). Use this tool for your order entry. Manually switch to using the IB TWS for order entry when you notice that Data Vendor #2's quotes are slow. Send orders via IB's API.

    To answer your question, IB will forward your limit orders directly to Globex so if they are marketable you will get a fill right away, even if IB's quotes are off a bit. IB uses separate connections for quotes and for orders so just because the quotes are slow doesn't mean that the orders will be too. Hope that answers it.

    Or if you want a tool that uses the faster of the datafeeds automatically... The basic idea is to hook up both IB's quotes and Data Provider #2 (in this case eSignal) to your tool. Then your tool must determine which quotes to use for trading based on which quotes are real time and which are delayed. This is the tricky part. IB doesn't send a time stamp from the exchange. eSignal probably does but it may or may not be down to the second. If it is down to the second with eSignal, you could by default use eSignal, and if the quotes are x seconds late (measure this by current time which is set by atomic time synch on your computer minus time of current tick as reported by eSignal) you would automatically switch over to IB.

    If eSignal doesn't send timestamps with resolution down to the second then you might have a bit more of a challenge in figuring ou which quotes are realtime and which are delayed.

    As a postscript, IB will be much better if/when it installs a redundant line to the Globex for orders so that outages like those that have occurred recently might be avoided. There was talk on the chatroom by [IB]Kristian about IB doing just that.
  4. def

    def Interactive Brokers

    what you state will work as IB does send orders immediately to Globex. Tripacks comments pretty much are accurate.

    Just to note: IB's globex quotes are usually pretty good and often are faster than other quote providers - during quiet periods. Comments from you guys point to delays during active markets. HOWEVER ---- I am hoping it is solved. There was some tinkering on the programming and hardware ends this past weekend which may make a big difference towards resolving the issue.

    as for a duplicate server. IB has numerous T1's or T3's to Globex. Kristian is on the tech side and would know more than me about the reduncies in place. For the markets we trade in Asia, some things will fail over effortlessly, others require human intervention. I'm sure the same is in place in the states and it sounds like a project is underway to make things fail over more effortlessly.
  5. Hello,

    I noticed that not all trades are reported, and the inside market refreshes only about every 1 sec.
    It's obvious when comppared with T&S and inside market sizes from esignal.
    my question is: is that an issue that will be resolved in future versions of TWS? (Def?)


    /Kad from Paris
  6. my post was about E-minis....
  7. This is true and this is a way to infer when IB's datafeed is slow. Between ES and NQ and during RTH there will pretty much always be an update in one of the fields, such as bid/ask size EVERY SECOND. When you see a break in the regular 1 second rhythm you will know you are experiencing some delays. They could be IB caused delays or traceroute caused delays or ISP caused delays - no way to know without checking everything (which is the last thing a trader wants to do while trading).
  8. stevet



    I dont understand what causes the delays at IB with the globex feed for futures to the TWS

    You seem to agree that it happens and specifically when the market is moving quicky, but why does it happen? its just a stream of dats that IB sends out and then gets distriburted to all the TWS's - so it does not need to be processed by IB - just passed through to the customers

    It's a shame as this data is real useful since it should always be ahead of any data feed for charts etc as that data has to go via the 3rd party data distributor - who falls behind the broker data distribution