Backtesting with 3 time frames in TradeStation

Discussion in 'Strategy Building' started by dstangier, Aug 14, 2006.

  1. I am to the point where I would like to formally backtest some strategies. I have read a lot of posts here and I'm leaning towards TradeStation. I don't need another broker, I'd be getting it strictly for the backtesting function. There is one question I have been unable to answer even after countless hours of looking. The answer is probably in the Tradestation forum but every time I got close, the log in screen popped up and wouldn't let me proceed. I'm willing to spend the month or so to learn the easy language if it will preform what seems like an easy task to me.

    I want to test a very simple strategy but do it in three time frames at the same time with a different rule in each of the three time frames. For example: 1. have a rising MACD on the 15-minute chart, plus 2. have a rising stochastic between 20 and 50 on the 5-minute chart, then buy when 3. there is a MA crossover on the 1-minute chart.

    If I learned easy language, could I get TradeStation to backtest something like the above example? If the answer is yes, as far as the coding goes, would it be in the beginner, intermediate, or advanced category?

    I read one thread where they were talking about collecting the data in one time frame (one minute bars) and then using that data in different multiples (like 5 and 15 in my example) to simulate the other time frames. They referred to it as a workaround like it wasn't something normally done in TradeStation.

    I would really appreciate it if a TradeStation user would explain to me what is and what isn't possible with TradeStation.

    Dirk
     
  2. Tradestation has a feature called

    data2
    and data3

    this is easily implementatable

    And also as you said the 1 minute -> 15 minute, -> 60 minute data converted

    I do that as well

    I'd say its medium easy considering I'm not a good programmer and I can get my way around multi time frame coding as well.


    I prefer the converted data for faster access without having to load data2 or data3.

    For each data, you need to "load" it.
    I believe its only in chart format where you insert the data.
     
  3. you need to put up the 3 data sources in the same chart and refer to them as data2 and data3. The tradable data is always data1 but you never need to reference that.

    I'd say it's intermediate to advance.

    Here's and example using 2 data streams in 1 system.

    Good Luck!

    **************************************************

    Inputs: multi(1.03), multi2(.97), mystop(.99);

    Vars: Hi(0), Lo(9999999);

    If MarketPosition<>1 then begin
    If Low of data2<Lo then Lo=Low of data2;
    If h of data2>(Lo*multi) then buy on close; HI=0;
    End;

    If MarketPosition=1 then begin
    If High of data2>Hi then Hi=High of data2;
    If L of data2<(Hi*multi2) then Sell on close; LO=999999;
    End;
     
  4. Thanks for your help.