tradestation / easylanguage - test multiple instruments

Discussion in 'Automated Trading' started by qtmspin, Jan 8, 2011.

  1. qtmspin

    qtmspin

    I was watching a video by Murry Ruggiero from 1992 and he was using tradestation to find intermarket relationships with the help of tradestation optimization.

    I have yet to discover how he did this. Does anyone have any insight on how I can test multiple instruments in easylanguage code?

    Thanks,
    Matt
     
  2. qtmspin

    qtmspin

    I think that this is possible using the following idea:

    put all intermarket data on charts - ie
    gold - data2
    silver - data3
    xau - data4
    copper - data5

    then create an input like (IMV) intermarket variable:
    IMV(2) - you will use this for optimization 2-5 in this case

    then an if statement in the code

    if IMV=2 then
    IMVClose=Close of data2
    if IMV=3 then
    IMVClose=Close of data3

    and so on...

    running optimization you could use this idea to go through all data on the chart testing each dataset for it's results.
     
  3. could you please post the video link?

    Inputs: MkLen(10),InterLen(10),Relate(0),LSB(0);
    Vars: MarkInd(0),InterInd(0);
    MarkInd=Close-Average(Close,MkLen);
    InterInd=Close of data2-Average(Close,InterLen) of data2;
    If Relate=0 then begin
    If InterInd<0 and MarkInd<0 and LSB>=0 then buy at open;
    If InterInd>0 and MarkInd>0 and LSB<=0 then sell at open;
    If InterInd<0 and MarkInd<0 and LSB=-1 then exitshort at open;
    If InterInd>0 and MarkInd>0 and LSB=1 then exitlong at open;
    end;

    If Relate<>0 then begin
    If InterInd>0 and MarkInd<0 and LSB>=0 then buy at open;
    If InterInd<0 and MarkInd>0 and LSB<=0 then sell at open;
    If InterInd>0 and MarkInd<0 and LSB=-1 then exitshort at open;
    If InterInd<0 and MarkInd>0 and LSB=1 then exitlong at open;
    end;
     
  4. ADE, all date everywhere, works a lot better.
     
  5. qtmspin

    qtmspin

  6. I have a problem with text_delete in easy language.
    I need to update a text so I check for its existence, then delete it by text_delete and finally write the new text by text_new.
    The problem is text_delete fails sometimes and from that point on all text disappears.

    Any thoughts?