Help a newbie with automated trading API programming

Discussion in 'Automated Trading' started by ezbentley, Mar 17, 2009.

  1. Baywolf

    Baywolf

    Dummies guide? Not that I'm aware of. There is a level of programming knowledge that is assumed if you are jumping into API programming. You should take a look at the API documentation for code examples and how to properly use exposed methods and properties.
     
    #11     Mar 18, 2009
  2. I agree that a certain level of programming expertise is needed to program API. But even with enough knowledge, it would still be a faster learning process if there are "examples" to look at as a starting point.

    I mean let's say you are proficient in C and you want to learn Java. I would assume most people would not just open java doc and read about all the libraries. Instead, it's much faster to pick up a book and look at the example codes inside. Look at the syntax and how to use the objects and how to make the objects work together.

    To me I get the feeling that reading those API documentation is just like reading only java doc without having a big picture of how things work together.

    I think working with excel is an interesting idea. I will look into that.

    Thanks for the inputs.
     
    #12     Mar 18, 2009
  3. DaveN

    DaveN

    Another good perspective can be gained from visiting the community over at the MB Trading SDK site and the associated Yahoo! groups. (http://sdk.mbtrading.com/) You can open a demo account for free, download the API/Navigator, check out the library of code samples (VB6, VB.NET, C#.NET) that you can download in a zip file and pick up from the files area in Y! groups.

    That should give you some examples of how to employ various approaches in your coding to use the objects in the SDK.
     
    #13     Mar 18, 2009
  4. Davdse

    Davdse

    #14     Mar 22, 2009
  5. FaceOff

    FaceOff

    IMO, for someone with coding experience, writing the ordering and price database in VB, C++, Java, etc yourself is the easy part of the project (so using AMIBroker etc is only saving you from the easy coding).

    By far the most difficult (and time consuming) part is developing the trading strategy that is consistently profitable over a long period of time. And it's not the actual strategy that's tricky, it's "proving that it is profitable" that is the problem. To do this you'll need to develop a walk-forward testing engine that removes all curve-fitting - and this is not an insignificant task.
     
    #15     Mar 22, 2009
  6. CBuster

    CBuster


    bingo - totally agree with FaceOff. Coding using an API really is the simple part if you are an experienced programmer. This time last year I knew zero C# and had a limited VBA background. one year later I have a working, robust, trading algo. i find the code samples that come with most broker APIs to be very useful - learning by doing... For me, learning C# was much trickier / more time consuming than how to implement the API.

    Excel can make things even more simple. It depends on how quick and robust you intend everything to be. Before i built in C# I had an Excel based model. that was fine but I decided to up the trading frequency and stock universe I looked at (from 30 to 150 stocks) and then Excel couldn't hack it any more. This was all for an intraday model (0 - 15 min holding time).

    generating high quality strategy idea is the difficult part IMO. consistent profitablilty is fairly elusive. The one point to add to FaceOff here is that a forward testing engine may not be needed - I never built one. I just forward test my ideas with tiny share size.

    good luck
     
    #16     Mar 23, 2009
  7.  
    #17     Mar 23, 2009
  8. Does anyone have any idea on the limitation of excel in terms of number of symbols and data feed update frequency?

    If a strategy trades 2000 symbols with 1-minute bar resolution, can excel handle that? Or what's the limit?
     
    #18     Mar 23, 2009
  9. ezbentley, I am working on an ATS. I use IB and program in java. There is a decent amount of info on the web that I used to get up and running. There is a yahoo and a google group for IB API and there are very basic examples on http://www.stockbotprogramming.com/basicdesign.php. Hope this helps.
     
    #19     Mar 23, 2009
  10. travis

    travis

    No idea about 1000 symbols on excel.

    I am only trading 9 symbols and it executes about 30 trades a day (not now, it has in the past), within less than a second, all things included (prices update several times per second). It never freezes. My 2 charts updating every minute (with moving averages and other things) slow it down though, I can sense it. Also, I have about 50 sheets on this one file, all with vba code behind them and plenty of functions in all cells - the whole file is 4.5 megabytes.

    If you can program better than vba everyone advises against it, but personally I think it's great. (But I am not a programmer, except for some vba I learned for building this thing).
     
    #20     Mar 23, 2009