Successful automated trading with Excel + IB TWS

Discussion in 'Automated Trading' started by travis, Oct 1, 2005.

  1. travis

    travis

    I have managed to finally implement an automated trading system that works perfectly with just two programs open - one excel sheet and TWS by IB.

    It's very light, it works fine, sending an order in less than a second, which is enough for me. And it even makes money.

    I won't tell you exactly how the system works, and I won't sell it either, but if anyone has any questions, objections, advice, ideas, please let me know.

    It took me months and months, so I would like to talk a little bit about what I did, and how it's possible, because at the start I had no idea on whether it was even possible. I am very satisfied now.

    If it wasn't for a friend of mine, who's very good at writing excel visual basic macros, I would have never made it.
     
  2. Congratulations on your new implementation!!

    Could you talk a little about what is involved in getting this to work -- I'm not asking for your strategy but the implementation. I've been playing w/ the TwsDde.xls spreadsheet a little. Haven't totally figured out how to implement an automated system yet.

    Again, Good luck with the system.
     
  3. travis

    travis

    First of all I downloaded the example sheet as you did. Then I added 2 excel sheets of my own, and a couple of modules. Actually my friend did that, because he's the coder, and, even though I know the code enough to modify it, I am unable to code a system from scratch.

    One of the excel sheets is needed to calculate a moving average which we use in the system. The other sheet observes the price of the stock index future we trade and, if our conditions are met, sends the trades to the "orders" sheet (it comes with the IB example sheet)

    The system is an intraday system, with about 15 trades per day. I cannot tell you very much about it, without disclosing my trading system insights.

    It monitors the stock index future we trade, continously, all day long, and needs to read price data second by second, and this couldn't be done with tradestation as far as I know, and also tradestation would have needed 5 programs to be running in order to send orders (tradestation, global server, tradebolt...).

    For a few months, I was testing it real-time. I was testing simultaneously about 10 different systems with slightly different parameters, at the start with several hundred dollars losses every day.

    Lately, in the last few weeks, after some changes, I have started getting positive balances, day after day, and I decided to start to invest real money, even though it's early, because I would stop immediately if it suddenly started losing money.

    I know it may not work forever, so I need to use it now while it works, while at the same time I should try to understand under what conditions it works. But it makes no sense to not use it while it's working so well.

    In my opinion, the best way to make money is to have enough to be able diversify. Right now I don't have enough to diversify my investments, so if I ever get a chance like this, I can't waste it. Once I will have more, I will be able to work on different systems, or even no system at all, and trade on a daily basis, with 10 different futures, or 20 different stocks.

    But if you have the money for just one future contract, then this is the best solution there is, as far as I can afford. Of course, C or java would be faster and better, but I can't program them, and it's too complicated and not worth it for me right now.
     
  4. Thanks for your detailed explanation.
    Good work. All the best.
     
  5. bobcows

    bobcows

    FYI: It can be done in TS. I had a coder program it up a few months back. Also it requires is Ts 8, IB account, and a custom DLL that sits in the middle.

    TS handles all the data. IB only is used for sending orders.
     
  6. TickJob

    TickJob

    Are there someones selling similar automated programs for TWS where you can modify some parameters for your own trading?
     
  7. rickty

    rickty

    Travis,

    Which stock index future are you trading?

    It sounds like you haven't done any backtesting of your strategy? 15 trades/day sounds like a lot. Is slippage an issue or is profitability enough even with slippage?

    Richard
     
  8. travis

    travis

    Slippage doesn't prevent it from being profitable. Since I started trading it with real money, it's obviously profitable at the moment, and I would stop the minute (after the first week it loses money) it isn't profitable anymore.

    As I said, I did real time testing, without real money. And now I am trading it with money.

    If by "backtesting" you mean what people do with tradestation by using data from the past, then I haven't backtested it, since I couldn't figure out a way, with the means I have available, to test my method applied to not only tick by tick data, but even further data which I use like the marketdepth and such other things. There's no such data, as far as I know, and there's no program to test my method on that data, and I am not good enough to devise one.

    I'd rather not tell you which future I trade. I would rather keep it a secret.
     
  9. tomhaden

    tomhaden

    If you can't answer even the simplest of questions, which contract you trade, than what is the point of this thread? How the contract's name can be used against you or your system is just being paranoid.

    So you are happy for any advice or ideas, but can't even share which future contract you trade? :confused:
     
  10. hihi

    hihi

    #10     Oct 2, 2005