Announcement

Collapse
No announcement yet.

Automated Trading w IB from Yahoo

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

  • Automated Trading w IB from Yahoo

    Has anyone who trades with IB ever successfully implemented an automated trading system using Esignal efs?

    If so, can you please share your experiences?

    Thanks.

    signed WaveTrader

  • #2
    IB trading and DO with EFS..

    David,

    I have developed multiple scripts that execute trades with WTS (IB) using DO within an EFS file. My files accomplish the following..

    1. execute entry signals, place stops and place profit target orders.
    2. execute profit target trades and trail stop orders.
    3. execute reversal orders, cancel open orders and place new PT and stop orders.
    4. execute EOD and "Go Flat" orders when needed.
    5. tracks all order conditions and order IDs (used to cancel and re-issue PT and stop orders - also to go FLAT.

    The systems are mechanical and trade on their own. I just watch them to see how they are doing.

    I have recently added BUTTONS to the charts to control features within the trading systems - like...

    Reversal Code ON/OFF button - turns on and off the ability to net reverse.

    Exit ON/OFF - the ability to force a "Go Flat" at any time. Then turn it off if necessary to begin trading gain.

    It did take some playing with the code, but it can be done...

    What are you using to issue the orders?? DO?? If so, I will try to assist you. If you want, visit my web site and print the NDA, sign it and fax it to me (www.ment.com). This is an agreement to protect your code and system. I will then be able to assist you with your file.

    Best regards,

    Brad
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Automated IB Trading..

      David,

      I just posted a "Template" file into my group (Matheny Enterprises) to illustrate how I create a RT DO trading system.

      This example file will EXECUTE TRADES if DO and IB TWS are loaded - so be aware!!

      It also illustrates how I handle stops and profit targets.

      It also includes two EFS buttons that allow users to...

      Turn ON/OFF the reversal code
      Turn ON/OFF the EXIT routine.

      The EXIT routine will force the system to go FLAT (when ON) or let it trade (when OFF).

      I hope this helps.. go get it..

      Brad
      Brad Matheny
      eSignal Solution Provider since 2000

      Comment


      • #4
        Cant seem to find that location, how about a pointer?

        I looked in the list of groups and thought it would be there.

        Comment


        • #5
          Here you go...

          David,

          http://share.esignal.com/groupconten...les&groupid=33

          That should take you there..

          Brad
          Brad Matheny
          eSignal Solution Provider since 2000

          Comment


          • #6
            Thanks, once my application for membership is approved I'll check it out

            Comment


            • #7
              I am on this as well . . .

              Guys,

              I am finally working on this again, I was busy for the last three months, but I am ready to go ahead once again. I will write you guys some stuff off-line as well, but just a quick question. I have not kept up with e-signal updates, can we fully trade directly from the EFS now, or are you guys going through DynaOrder or some third party?

              Thomas.

              Comment


              • #8
                EFS with DO...

                Thomas,

                I am using Dynaorder currently. I looked at the available options and decided that this would work for now.

                I know Matt has plans to revise much of the EFS trading code, but until then I'm using DO.

                Brad
                Brad Matheny
                eSignal Solution Provider since 2000

                Comment


                • #9
                  thanks for the info . . .

                  Look for my mail off-line, I will look in your folder and check things out, and as soon as I get somewhere (slow freaking progress), I will post some stuff.

                  Can you share with me any thoughts on what to watch for using dynaorder, anything that was part of the learning experience which would help my implementation.

                  You guys seem to be the forerunners in this area, so naturally I am curious to some of the mishaps that might have taught new ideas. Let me know if you can,

                  Thomas.

                  Comment


                  • #10
                    Hints and pitfalls...

                    Thomas,

                    Take a look at my DO Template and you'll see that I develop the code to run in RT and track all of the conditions of the system. This way, I can run it in eSignal and watch it before I try to trade it.

                    My code is set to track the POINTS accumulated and total number of trades for the day. It also illustrates how I execute the DO order functions (through a function I call "TradeMarket". This way, all of my DO execution is located in one code segment - easy to manipulate.

                    Other tricks I have found are...

                    TimeStamping - using variables to time-stamp trading action allows your system to NOT take multiple actions on a single bar.

                    Like...

                    PHP Code:
                    var tradetimestamp 0;

                    function 
                    main()
                    {

                      if ((
                    ENTRYCONDITION) && (getValue("rawtime"0) != tradetimestamp)) {
                        
                    ///  enter our trade and timestamp the bar...
                        
                    tradetimestamp getValue("rawtime"0);
                      }


                    My example shows this clearly.

                    The other hint I would suggest is to TEST TEST TEST. Use my example template as a guide to help you.

                    There are a few other hints I can offer you (like....)

                    Testing for LIMIT orders - remember to test for 1 tick above/below the limit price before your system executes any code.

                    Using DO - track all orders in your code (including Order ID - see my example).

                    Using DO to place orders - use variables to control the types and QTY of your orders. TWS will automatically cancel an order for 0 ZERO qty.

                    Use time variables (see my example) to control your system's trading times.

                    More later..
                    Brad Matheny
                    eSignal Solution Provider since 2000

                    Comment


                    • #11
                      I've been running automated trading using DO to TWS since December. While DO has become more reliable, problems still occur due to problems at IB. The problem where DO sends an order and TWS just misses it seems to have been eliminated. Still, I've had TWS reject an order for no known reason and I've had SMART route an order to ARCA only to have ARCA quotes hang and screw up my order with them (ARCA seems to have a lot of problems). I know that I could avoid a lot of problems by switching from SPY to the ES but there are other issues involved (and those Globex trades that got broken a couple of weeks ago should be a reminder about the risks there).

                      Mark

                      Comment

                      Working...
                      X