Api TWS IB trading software

Discussion in 'Automated Trading' started by james2hunt, Feb 12, 2012.

  1. Another free TWS API application has a nice UI all java. You can write compile and deploy strategies in the UI but its better to develop them in a Java IDE such as Eclipse and just pop them in the UI.


    Back testing seems fast on my p.c 7i processor it went through 1500 stocks intra-day on 5min bars in 150seconds. Reports are basic gives you simple sharpe ratio and batting avg (by mth and date range). Shows stocks that traded and those that did'nt (and reason) and has click thru to the charts so you can quickly do analysis. Very useful when you have a lot of stock to analyse. As with all back testing there are limits as it does not store tick by tick just each bar for the time-frame you have chosen to trade.

    Charts are clean and update every 5seconds during trading hours. Strategies can be configured to fire every 5secs or just when the bar completes. I like the fact that you can split the strategy into one that manages and one that enters the position, or just go with one. Broker interface is implemented as an interface so you could easily write and deploy new interfaces for different brokers. I could see that it would be very easy to change the TWS interface to run live data vs 5sec bars as the base candle series are just data-sets with a listener.

    Seems to be very configurable i.e. you can develop your own indicators and pop them into the app without changing DB to add properties for the new indicator. A lot of stuff like time-zones, default values, logging levels all in a config.properties file.

    Good starting point for most people who want a simple automated trading app based on technical trading strategies.
  2. Does anyone have any feature they would like to see or feel I am lacking ?

    As I'm just refactoring the packaging then after that I've run out of features to code.

    I will add an option to use the IB real-time level I data API vs the 5sec updates that I currently support.

    All ideas changes will be considered. You can post here or just add as an issue on the google-code site.

  3. Thank you so much for sharing this, James
  4. UI is just about feature complete so if anyone has any features they think I should add please let me know. I have the basics for Technical Intra-day trading for candlestick charts re time-frames from 30sec thru 60min candles. Most people trade of the 2min or 5min early in the day with tgts/stops taken from S/R on the 15min/60min charts. Gapping stocks are good because they usually have 2-4X vol and predictable direction due to the fear they can cause to those already in the position.

    I mainly trade gapping stocks so usually I'm finished trading within the first hr of the day. So that gives me lots of time to play with this.

    I'm currently doing a course at Stanford University re Probabilistic Graphical Models (i.e. nodes and their relationships where nodes would be candles in our case). I hope this will give me some ideas re how to code a model that will predict what will happen next. This theory is used in many applications such as GPS Maps to find the best route, predicting traffic jams so traffic light sequencing, models to determine from symptoms what your ailment is, pixel recognition in photos e.t.c
  5. Thank you for sharing these! Both of the projects look interesting