Jumping into Auto Trading; Sample Code?

Discussion in 'Automated Trading' started by bscully27, Sep 22, 2011.

  1. Hey Guys,

    I tried scanning this forum for sample code of momentum trading (any language will do). Currently I am using Matlab & R but am wondering do I go with something like Ninja Trader or a competitor or another language.


    Back to my main point: With sample code, I am not looking for something incredibly simple, nor am I looking for anything overly complex, or anything that makes money for that matter. Doubt someone would share that in the first place..

    I am just looking for some basic code to get a sense of how to setup the strategy, how to identify start and stop points to execute trades.

    Note - already have a data feed setup.

    Appreciate anyone's sincere help,

    Ben
     
  2. flip

    flip

    Platforms like Ninjatrader, Tradestation (and all it's clones) and so on usually provide several sample scripts and systems, either when you buy/lease the software or you find smthg. in the documentation, on their website etc.

    For Matlab / R it will be difficult to provide sample code, as you have to write a full library (everything from data collection and import, data transformation, indicators, money management, output etc.) on your own before being able to test systems.
    The actual system is only the last step, so a code snippet from someone else won't help you much without having all the relevant functions.
     
  3. rosy2

    rosy2

    1) connect to the feed
    2) usually you have to implement some method like
    onUpdate(Data data) where the data comes in
    3) in the body of that method you do your strategy ...ie.
    void onUpdate(Data data){
    if( data.price() > 100){ sell();}
    else{ buy();}
    }
     
  4. Why don't you give me our Bank account no. and I wire it to you ?

    $ 1 million is that enough ?

    It took me 5 years learning IT programming, 5 years as a developer, 5 years as a portfolio manager and trader, and some 15k losses.

    Now I have a well coded automated trading platform with IB's TWS and with humble my 15 years experience.

    The coding process itself is already a pain, takes alot of time and effort. Less the 1. algo, 2. strategy, 3. trade risk management and 4. processing trades, all of these done via the programming codes.

    This isnt a school project involving one database and some data manipulation. Its making real cash from the rest of the smartest people out there. Why would someone "give" it to you?

    If i meant to be hush I wouldnt even bother to reply ya. You said you are looking at strategy and how to setup Buy/Sell signals. its obvious you are going to fail even if its automated because you cannot automated a manual process you dont even know.

    Look at 1. 2. 3. 4. and see if you can answer them NOW =).
     
  5. savagemp5, don't waste your time with those type of posts and just remember, there is always someone out there better than you...
     
  6. Well it was after markets hours, kinda of bored and markets are damn good these days for automated trading hehe.
     
  7. I would say take a look at wl4.wealth-lab.com. There's some strategies written in Wealth Script there.

    Also, keep in mind that most of the industry is based on EasyLanguage, and since Tradestation will always drag ass on their portfolio simulators the most state of the art software that you can possibly buy is MultiCharts, with chart and dom window trading.
     
  8. timpain

    timpain

    As a guide individual it is almost unattainable to take every business that your program provides you because currency dealing trading areas business 24 a long time per day. To obtain uniformity you are necessary to take every business that your program provides you. As people we may have good and bad dealing days.