How to begin with an automated system?

Discussion in 'Automated Trading' started by oraclewizard77, May 11, 2009.

  1. oraclewizard77

    oraclewizard77 Moderator

    I currently trade futures through ninjatrader, and would like to automate some of my trades.

    1) What developmental package or tools did you who trade futures, use to create your automated systems and what did you use to back test them?

    2) I have not programmed for a long time, but what programming book should I read to help get started.

    3) I would be interested in using something where I could do as little programming as possible.

    4) Have any of you hired any programmers to help design your automated system or does everyone do it themselves.

    5) If I see certain patterns on my chart, can these be automated or is that beyond the possibility of these programs to automate patterns?

    6) Once you are automated, how do you have the signals send orders to your account and do you have the broker run the software on their servers or you run it through your computer.

    7) What do you use to back test your strategies, and how do you optimize them without the strategy being only good for working on the past market and not the current or future markets.
  2. travis


    1) IB TWS and Tradestation
    2) For Excel (functions and VBA), I recommend the two Walkenbach 1000 pages books ("Power Programming with VBA" and "Excel 2003 Bible").
    3) IB API with Excel
    4) I did it myself with the help of a friend I met on a financial forum and another I met playing online Risk (strategy game).
    5) Shouldn't everything on a chart come from a price value? Then you can program it and automate it. Of course I didn't say it will be simple or easy.
    6) Everything is on my computer. My excel workbook gets the data from TWS and sends the orders to TWS (IB's trading platform).
    7) I test it on Tradestation. I don't optimize it by using as few parameters as possible. For me it's better a 60% of wins with 2 or 3 parameters than 80% of wins with twice as many parameters. Also, once the strategy is finished you can test it on similar markets (like the EUR/USD strategy can be tested on the EUR/GBP) and if it still works as well, then most likely it's a good one.
  3. Not to distract from anything that you are saying, but he already has Ninjatrader. He really just needs a book on the basic principles of programming for the markets, and a book on C#, which is what Ninjatrader uses.

    I can't help in this regard. I am self taught C#, and that was by writing other people's code -- by hand -- to get used to the syntax of C#, and then from there, I just spent my time here:

    Eventually, you'd either want to program a system execution program yourself (not using Ninjatrader), or pay someone else to do it. For the system that I use (currently) however, Ninjatrader works just fine.

    At the end of the day, OP, you had better have a system that works, because what would be the point of automating quick losses...
  4. monti1a


    I currently have my strategies automated in ninjatrader. I would do the following:

    1. Start with "C# 2008 for Dummies" to get a refresher on the C# language. I'm serious. The book is well written in layman's terms.

    2. Read through Ninjatrader's Support Forums (Strategy Development, Indicator Development) in order to familiarize yourself with the issues you will encounter.

    3. Ask questions on the Ninjatrader Support forum. Questions are usually answered promptly.

    4. Try and find similar indicator code on the forums that you can potentially employ with your strategies.

    I have a programming background from my past life in the IT field, so it all came back quickly for me, but I think that you will find that the ninjatrader platform gives you what you need to automate robust strategies inexpensively.
  5. oraclewizard77

    oraclewizard77 Moderator

    Ok, I will check out my local bookstore on C# books, and read through the ninjatrader support forum.

    I have made over $ 100 per day trading the es the last couple days, but would have done much better if I did not let fear get in the way of my trading. I really should have made $ 400 today. Easy setups all day long, but I was killing the trades after 1 point of profit.

    This is why I think automating some of my setups would work since it would get rid of fear and greed.

  6. monti1a


    Automating a strategy will not totally remove fear from your trading because even with an automated strategy you will still have to monitor the system and trades for unanticipated problems and issues (ex., loss of connection, bugs in the program/strategy code that cause the strategy to not place orders as expected, news releases, fomc).

    Automating my strategies only allow me to trade many more markets that I would not have otherwise been able to trade. However, I would never leave the system unattended under any circumstances. Hence, I still have to sit there and watch the trades as they are occurring.

    One other thing. Also, read through the Ninjatrader manual as it is also a well written source for coding your strategies.
  7. Excellent system. I'm currently considering it for my automation.

    Visual Basic, Excel, Metastock, Tradestation, NinjaTrader, MetaTrader, to name a few.

    Programming has changed dramatically from "a long time" ago. IMO a trader should not be wasting time programming. You can hire an expert for that task. It will save you time and money and all the aggravation. On the other hand, programming systems is becoming a thing of the past.

    There are systems you can use to develop fully disclosed systems automatically based on your own performance criteria. This is the way to go to savetime and money.

    This program is more general but very expensive. It discloses the systems in EL, Java, C# and WL code.

    This other program is relatively cheap but limited to price formations. It discloses the systems in EL, WL, Metastock, TeleChart code and pseudoce. You can easily modify the code to develop system in NinjaTrader and MetaTrader.

    There are a couple more but they are based on combinatorics and take a long time to run. Also, the ones above are not based on the highly failed neural network concept. The first is based on genetic programming and the second on data mining.

    Numerous times in the past. There are several issues to deal with, one is copyright and the other is people leaving you at the middle of a project because they got a full time job they were looking for.

    Chart patterns can be very illusive and subject to interpretation. A H&S can indicate a bottom or a continuation of a bear market if it fails. You only find out after you make your bet:)

    Better to run it locally and send the orders via an API, such as the one provided by IB.

    42 million $$$$$$$$ question!
  8. Well, only two things.

    First, ninja is extremely limited in the IDE section, and attaching VIsual Studio is possible, but not supported and tiresome. THat sadly makes debugging more complex things a pain in ones back. I would LOVE to have "time breakpoints" and an IDE, so I could check, go to one particular bar and get a debugger WITHIN NINJA so I can find out which of my logic goes wrong and why a particular stop is not set ;)

    Second, Chart pattern recognition is tricky. All the basics are there (you can see the back bars), but coding the logic to identify individual patterns is tricky from a programming point of view ;) Just saying - this is one of the areas where the visual breakpoint and a proper debugger would come in REALLY REALLY HANDY ;)

    Ninja 7 is out soon as beta - let's hope ;)
  9. monti1a


    strategically placing print statements helps me determine where my code is failing in the absence of a debugger.
  10. From the Trading Systems Lab website:


    For that price, I might as well hire a programmer from Elance or Rent A coder for a year!
    #10     May 14, 2009