This Might Be Stupid???

Discussion in 'Strategy Building' started by wdbaker, Sep 23, 2002.

  1. ZZZ

    ZZZ

    That is a good sign. How about if you remove one of the 3 filters in turn. does that aversely effect the system? e.g. does removing the 5 MA > 50 MA make a difference , maybe 5ma > 30 MA is good enough as a filter ... do the same with the ROC... this will determine if every part of the filter is essential to the system... but what you are saying about the equity curve sounds promising. good work.
     
    #21     Sep 23, 2002
  2. ZZZ

    ZZZ

    another thing might be to test out on different symbols... not sure what you used but maybe try out several different markets to see if its success varies a lot...
     
    #22     Sep 23, 2002
  3. ZZZ

    ZZZ

    OK i see you have used ES 5min data. is it possible for you to use 1min data for better resolution? also are all the signals based on a CLOSING BASIS or can it triggered anytime within the bar?
     
    #23     Sep 23, 2002
  4. wdbaker

    wdbaker

    All I have is five minute data, signals are triggered on close

    wdbaker
     
    #24     Sep 23, 2002
  5. ZZZ

    ZZZ

    Ok. one problem i find with signals on a closing basis is on the exit (entries are fine). what happens if you get a price spike in the bar that generates a huge loss? one way is to have a disaster stop loss (ie max amount you are willing to lose in one trade) but that would probably decrease the system profitability bc some winners would be turned to losers.....
     
    #25     Sep 23, 2002
  6. wdbaker

    wdbaker

    I'll keep that in mind

    wdbaker
     
    #26     Sep 24, 2002
  7. WarEagle

    WarEagle Moderator

    wdbaker,

    I'm coding this in TradeStation, but I'm confused on your short signal. You wrote:

    test2=Filter AND MA(Close,5) Short=test2;

    I understand the time filter, but what do you want the MA(Close,5) to do? Did you intend to enter the opposite of your long signal, i.e. "MA(Close,5) < MA(Close,30) and MA(Close, 5) < MA(Close,50) and ROC(MA(Close,50),2) < -.09" ?

    Thanks.
     
    #27     Sep 24, 2002
  8. wdbaker

    wdbaker

    WarEagle,
    Sorry about that, some how the code got screwed up.

    I think the message board thinks it is html or something, I will post it as a text file.
     
    #28     Sep 24, 2002
  9. wdbaker

    wdbaker

    Here it is, let me know if you have any trouble

    wdbaker
     
    #29     Sep 24, 2002
  10. WarEagle

    WarEagle Moderator

    Ok, here is my TS code. If any EL experts out there see any errors, please point them out. I've never been good at writing tight code, so there may be a short-cut that I missed. If the code looks correct, then I'll post some results.

    Inputs: shortLen(5), exitLen(10), mediumLen(30), longLen(50), longROCval(.09), shortROCval(-.045);

    Vars: shortMA(0), mediumMA(0), longMA(0), ROC(0), exitMA(0), MP(0);

    shortMA = Average(close, shortLen);
    mediumMA = Average(close, mediumLen);
    longMA = Average(close, longLen);
    exitMA = Average(close, exitLen);
    ROC = RateOfChange(longMA, 2);
    MP = MarketPosition;

    If time >= 0800 and time <= 1500 then begin
    If shortMA > mediumMA and shortMA > longMA and ROC > longROCval then buy at market;
    If MP > 0 and longMA crosses above exitMA then ExitLong;
    If shortMA < mediumMA and shortMA < longMA and ROC < shortROCval then sell at market;
    If MP < 0 and longMA crosses below exitMA then ExitShort;
    end;

    If time > 1500 then begin
    ExitLong;
    ExitShort;
    end;
     
    #30     Sep 25, 2002