Announcement

Collapse
No announcement yet.

Help with IB plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with IB plugin

    Im trying to get the YM #F to trade over to my IB account.

    When I check the symbology menu it says SMART under the exchange even though I specfically just typed in ECBOT. It will not work with smart. How does it keep resetting it to that?

    When I use the manual broker window and type ECBOT in manually, it works. But the symbology database is screwing with my script. I also tried specifying the route in the EFS file but it did nothing as well. Just sat there and didn't take any orders.
    Frustrating! Help appreicated.

  • #2
    IB Order Syntax

    I cant find anything that tells me the correct order syntax for the generic broker buy command. Well I pulled this syntax directly from the EFS help page.

    buyMarket(getSymbol(), 1, "ECBOT", "200612"); // Futures

    IB rejects the order though. The only way I can get it to accept one is if I send it through the built in broker screen in esignal. But it doesnt show you what syntax its using to send it over. Any ideas? Thanks

    P.S. This is for YM #F / YM Z6

    Comment


    • #3
      Hello Geoff,

      The key is to specify the exchange and expiry parameters through the generic broker calls. The symbol parameter should be a string of the eSignal symbol your are trading. You should have YM #F (or other contract symbols) setup in your IB symbology under Trade-->Interactive Brokers-->Symbology. Show me an image of what you have in your Symbology for YM. You don't worry about the exchange value there. The broker call in the EFS will override it.

      For market orders:
      buyMarket(getSymbol(), 1, "ECBOT", "200612");

      For limit orders:
      var myLimit = getMostRecentAsk().toFixed(4);
      buyLimit(getSymbol(), 1, myLimit, "ECBOT", "200612");

      As long as your exchange and expiry parameters are valid it should go through. What is the specific error information that TWS is reporting?
      Jason K.
      Project Manager
      eSignal - an Interactive Data company

      EFS KnowledgeBase
      JavaScript for EFS Video Series
      EFS Beginner Tutorial Series
      EFS Glossary
      Custom EFS Development Policy

      New User Orientation

      Comment


      • #4
        This is strange. It was trading to IB ALL DAY LONG and when it got to my command at 15:57 which is:

        closeAllPositions();

        I got a pop up that said "ADD YM #F to the SYMBOLOGY DATABASE??" ha. What the heck. Its been it there all day long running happily with YM #F in the database. Maybe my symbology database is currupt. Can you tell me what file its in so I can try to delete/refresh it? So I had to put it back in at that point. Here is the screen cap (thx in advance):

        (ES symbology is incorrect in this snap. However I was not trading the ES at all so that shouldnt of effected anything)



        Also i can not get it to work at all with $PLAYBACK. For instance I'll set $PLAYBACK as esig symbol and YM as the IB symbol so I can do some testing that way but it freaks it out and ends up crashing.
        Last edited by glay; 09-12-2006, 02:29 PM.

        Comment


        • #5
          Secondary thought

          Does the symbology database change per layout? Although I didn't switch layouts intra-day. I wonder what caused it to 'reset/lose the data'.

          Comment


          • #6
            Hello Geoff,

            Originally posted by glay
            This is strange. It was trading to IB ALL DAY LONG and when it got to my command at 15:57 which is:

            closeAllPositions();

            I got a pop up that said "ADD YM #F to the SYMBOLOGY DATABASE??" ha. What the heck. Its been it there all day long running happily with YM #F in the database. Maybe my symbology database is currupt. Can you tell me what file its in so I can try to delete/refresh it? So I had to put it back in at that point. Here is the screen cap (thx in advance):

            (ES symbology is incorrect in this snap. However I was not trading the ES at all so that shouldnt of effected anything)

            Just letting you know that I've been trying to reproduce this problem with closeAllPositions(). So far it is working properly with IB and the Paper Broker. I would appreciate it if you could provide any more specific info that will consistently reproduce this problem.

            Reinstalling the interactivebrokers_plugin.exe would fix any corrupt files. Have you tried this?

            The problem with the Symbology window defaulting back to SMART is a known problem, which has yet to be fixed. However, the parameter passed through the GB function calls should override the exchange value set in the Symbology window.

            In testing this today with buyMarket()/sellMarket(), where "ECBOT" and "200612" were used for the route and expiry, the trades did go through to IB properly.

            buyMarket(getSymbol(), 1, "ECBOT", "200612");
            sellMarket(getSymbol(), 1, "ECBOT", "200612");

            eSignal IB broker window:


            TWS:




            Also i can not get it to work at all with $PLAYBACK. For instance I'll set $PLAYBACK as esig symbol and YM as the IB symbol so I can do some testing that way but it freaks it out and ends up crashing.
            In order to use the generic broker functions with $PLAYBACK, you have to have the eSignal paper broker set as the default broker in Trade-->Preferences.

            I don't believe there is a playback demo option for TWS.

            Does the symbology database change per layout? Although I didn't switch layouts intra-day. I wonder what caused it to 'reset/lose the data'.
            The symbology is not page or layout specific. I would recommend reinstalling the IB plug-in first and let me know if that fixes the problem.
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              Hi once again. I took your advice and reinstalled the plugin. I can send trades with sell and buy generic broker commands to IB now. The symbology still says SMART but since I know its a bug now I won't worry about that. The one command I can not get to work is:

              closeAllPositions();

              At the end of day I have 4 open contracts. I issue that command and nothing happens. I dont see anything hit the API. I may just have to keep track of open positions manually and send a close command based on the current short/long positons.

              thx for the info/help once again.

              Comment


              • #8
                Hey Dragon - I can confirm that bug in the symbology as I went round and round like you just did A YEAR AND A HALF AGO. The bug is still not fixed. Also, in case you haven't figured it out you cannot modify a contract through the symbology table. It will look like it worked but it won't. When it comes time to roll over, you have to delete the contract and then re-add it. (I am still on 7.9.1 so it is possible they fixed this in 8.0 but since the other bug isn't fixed, I doubt it).

                Finally, there is also a bug that if you send an order with a whole number price (like 731.00) it will go to IB as garbage and be rejected. I have not found confirmation whether or not this bug was fixed in 8.0 either.

                Once you work around all of this, the integrated functions can work - although with limited functionality since you cannot modify or cancel orders or even get a status on whether or not your order even filled. This functionality was supposed to be in 8.0 but I can't find anything that leads me to believe it is actually there.

                Since this functionality is so limited right now I only use the eSignal functions to manage my swing positions so its not quite so critical if something doesn't fill right when it was supposed to. For shorter-term and time-critical trades I suggest using another front end (I use AutoTrader and I understand NinjaTrader has an interface as well) that you can call and manipulate via EFS.

                Comment


                • #9
                  Enhanced Trading Integration

                  Hi ebr, glay,

                  Thank you for your post.

                  We're re-engineering all our trading integration plugins, and are about to release the enhanced IB integration.

                  We addressed this shortcoming by enhancing the pre-set order defaults, which allows you to customize all order variables (quantity, order type, routing, time in force, etc.) in advance.

                  I'll look into a solution for the decimalization issue, that can probably be added to the Order Default settings too.

                  If you're interested in trying it, you can obtain the most recent IB plugin by downloading and installing VisionTrader from http://www.esignal.com/visiontrader.

                  That will install the IB plugin, which will then appear (with the other plugins) in eSignal's main menu under Trade.

                  If you want a demo, send me an email and a convenient time to contact you.

                  Thanks again,

                  Brent
                  Integrated Trading Product Management
                  [email protected]

                  Comment


                  • #10
                    ebr,

                    Thanks for the most useful info. I have it tamed for now just using MKT orders.

                    I got around the weird characters error by using the math.round java command in the EFS. I use the YM so its computes as whole numbers with no decmails most of the time

                    (unless im using some weird study to get the results).

                    Comment


                    • #11
                      Re: Enhanced Trading Integration

                      Which shortcomings were addressed? I already have the ability to specify quantity, order type and routing in the intial call. The biggest issue is the fact that call does not return an order ID that can later be manipulated (like cancelled or modified).

                      Is this functionality being added?

                      Thanks.

                      Originally posted by eSignal_Brent
                      Hi ebr, glay,

                      Thank you for your post.

                      We're re-engineering all our trading integration plugins, and are about to release the enhanced IB integration.

                      We addressed this shortcoming by enhancing the pre-set order defaults, which allows you to customize all order variables (quantity, order type, routing, time in force, etc.) in advance.

                      I'll look into a solution for the decimalization issue, that can probably be added to the Order Default settings too.

                      If you're interested in trying it, you can obtain the most recent IB plugin by downloading and installing VisionTrader from http://www.esignal.com/visiontrader.

                      That will install the IB plugin, which will then appear (with the other plugins) in eSignal's main menu under Trade.

                      If you want a demo, send me an email and a convenient time to contact you.

                      Thanks again,

                      Brent
                      Integrated Trading Product Management
                      [email protected]

                      Comment


                      • #12
                        Trading Integration Enhancements

                        Hi ebr,

                        We targeted areas in the GUI and the brokers' APIs.
                        For example, in the GUI, we've standardized the order ticket, added functionality to pre-set defaults (eg, you can now set defaults at the symbol level), and fixed things like the routing issue that glay reported.

                        For brokers' APIs, we've improved on targeting relevant features offered by each broker, and are updating the our integrations as brokers change their APIs. For example, we updated the interface with IB to handle order ids, we now support OCOs, etc..

                        All these enhancements have been done to the underlying logic we use in VisionTrader and each plugin. The next phase will be to better integrate VisionTrader and the plugins into eSignal, specifically the charts.

                        Thanks,

                        Brent
                        Integrated Trading Product Management

                        [email protected]
                        Last edited by eSignal_Brent; 09-15-2006, 05:41 PM.

                        Comment


                        • #13
                          Re: Trading Integration Enhancements

                          Originally posted by eSignal_Brent
                          [B]Hi ebr,

                          ... For example, we updated the interface with IB to handle order ids, we now support OCOs, etc..

                          ...
                          Are you saying that I now can get an order ID returned from a placeorder call in EFS and then manipulate it at a later time (like cancel or modify the price)? If so, can you point me to some documentation on how to do this as this is what I've been waiting for. Thanks.

                          Comment


                          • #14
                            Trading Integration

                            Hi ebr,

                            EFS doesn't currently reference order ids - that's one area we'll be investigating/targeting for the next phase of enhancing brokerage integration.
                            The first phase was to re-engineer the integration we'd done with each broker, and release them with our new trading interface, VisionTrader.
                            In that phase, we expanded the scope of IB's integration to include order ids, and took advantage of that by implementing functionality in VisionTrader to support multiple order sets, called VisionTrades (watch video).


                            The next phase of development will be to target how the integration of VisionTrader and each broker's interface can be better integrated into eSignal - one significant improvement would be for EFS to reference order ids.

                            If you have specific ideas about how this functionality could be better implemented, send them directly to "[email protected]", where they'll be stored in our product database for review and prioritization.
                            Your feedback on specific trading functionality not currently offered is much appreciated.

                            Thanks,

                            Brent
                            Trading Integration Product Management

                            [email protected]

                            Comment


                            • #15
                              Thanks for the explanation, Brent.

                              I haven't checked out VisionTrader yet because I already have other front ends and EFS automation doing the job for me right now. However, if it is what I think it is, it seems to me that the best way to enhance your integration between the charts/efs and outside brokers is to make the efs integration with VT instead of the broker calls.

                              You could implement efs functions that allow you to "operate" the functionality of VT (placing OCO groups, modifying prices, cancelling, etc.) via calls from a script running on a chart. This would give you maximum flexibility in EFS and create an interface layer between efs and individual brokers - making it much easier to implement and maintain.

                              That's my .02 anyway as this is what I have basically done with 3rd party front ends that allow me to manipulate them via calls in program code.

                              Comment

                              Working...
                              X