options automatic trading (probably with IB)

Discussion in 'Automated Trading' started by Shay, Aug 11, 2016.

  1. Shay

    Shay

    Hi,

    i want to open an account with a broker that support the following things -
    1. support automatic trading using API (or using language inside a tool)
    2. trade options ! (ninja trader doesn't support it as far as i know)
    3. low commisions (Interactive Brokers...)
    4. support non-us resident (which i am)

    so after some searching it seems that IB is my winner as the broker.

    my questions -
    1. how do i program my strategies -
    should i use different tool like tradestation/MultiCharts (they cost...)
    or can i just create a new C# program with Visual Studio, and use IB API ?
    or i am missing some easier way ???

    2. does the API have access to the data feed (even if it's delayed), so i can scan the feed with my programming ?

    Thanks,
    Shay
     
    Last edited: Aug 11, 2016
  2. rmorse

    rmorse Sponsor

    Shay,

    Will you be trading options on futures or options on equities? What country do you reside in?

    Bob
     
  3. just21

    just21

    1. If you want to send an option order when a condition is met then you probably have to write a program yourself as I do not think any third party packages do that.

    2. yes
     
  4. marsman

    marsman

    You need to learn the API (Application Programming Interface) of the broker.
    You need to be an experienced programmer, or hire such a one for your automation project.
    The IB API is mighty, but due to the asynchronous nature of the API you should have experience in thread programming (multithreading),
    incl. resource access sharing (ie. locking via mutex etc.).
    Check the info here:
    https://www.interactivebrokers.com/en/index.php?f=1325
    My advice: hire only experienced people...
     
    Last edited: Aug 11, 2016
  5. Shay

    Shay

    rmorse - options on equities and ETFs, and i'm from the middle east.

    marsman - i know programming, i did a lot of systems and indicators on MetaStock in my Forex days, and i am a DBA in my day job.
    my question is if i should write my program in plain C# (using IP API) or using another tool like tradestation or MultiCharts
     
  6. marsman

    marsman

    You can do it in many languages the IB API supports (see given link for more info). C# is among them as well C++ and also Java.

    Ie. here you can find more info:
    https://www.interactivebrokers.com/en/index.php?f=5041
     
    Shay likes this.
  7. rmorse

    rmorse Sponsor

  8. 2rosy

    2rosy

    since you know how to program then use c# and the ib api. Easier and more flexible than tradestation or MultiCharts. It will take you less than a day to get a simple hello world system going (subscribe to data, place an order, get a fill,...)
     
    Shay likes this.
  9. Shay

    Shay

    :thumbsup::)
     
  10. With the IB API you can program all your strategies (it allows to enter orders and have them executed or simply appear in TWS so you can manually click on it).

    You can create the program in C#, Java, C. Visual Studio with C# works perfectly fine (and is of course free).

    The IB API is pretty simple to use and rather straightforward. There are some nuances and a few weird behaviours. But there is also a very active Yahoo Group on IB API with lots of helpful people and full of information. So googling or searching there is a great way to solve issues.

    The IB API also comes with sample code. A pretty good solution which showcases most of what you need to get going. You can copy the parts of code you need to get yourself going.

    The IB API gives you access to the data feed (real time or delayed if you wish). You'll have access to the same data feed that your main account has subscribed to.

    You can launch an IB Gateway tool either on the machine you run your program from or another machine. This is light weight compared to TWS and allows you to run your code through that. Alternatively you can connect programmatically directly to TWS which allows you to do some other neat things.

    Getting start with the IB API with C# is pretty quick. Launch the sample code, peruse the docs, and if you are comfortable with C# you should be able to whip together something to pull account information or real time feed or quotes in half a day or so. Once that part is in, the rest is your algos you'll be working on. Don't be deterred by Marsman's comments: It's no where near complicated for someone who has a couple years of software development experience under their belt.

    If you don't know how to write code you can learn and use the sample code to help you. If you are hesitant, you can always try the Excel approach which may be easier (I do not know, I don't use that since I do C#).

    If you got any questions, feel free to post here and I'm sure someone will be able to answer :)
     
    #10     Aug 12, 2016
    Shay likes this.