in Search

Seykota Simple Exponential Crossover System.

Last post 04-19-2008, 19:52 by pumrysh. 1 replies.
Sort Posts: Previous Next
  •  04-19-2008, 4:31 26997

    Seykota Simple Exponential Crossover System.

    Hello,

    I am new to metastock, (got it about a month ago). I have been slowly but surely trying to match the results for the "Simple Exponential Crossover System" on Ed Seykota's Trading Tribe website.

    http://www.seykota.com/tribe/TSP/EA/index.htm

    I have converted the S&P data from Excel into Metastock format. And I have worked around the null bar issue for the exponential averages using the following formula:

    prd:=15;
    data:=CLOSE;
    m:=2/(prd+1);
    ema:=If(Cum(IsDefined(data))=1,data,(m*data)+((1-m)*PREV));
    {plot}
    ema;

    I'm also having trouble matching the ATR (it's a 20 day exponential lag, much like the above formula, but I can't get it to match). And I'm going crazy with the system tester as it's supposed to issue a Buy signal when the 15 day Exponential average crosses the 150 day Exponential average, and vice versa for the Sell signal, but it executes the first trade 2 days early for some reason.

    Any bit of help on how to code this system properly would be GREATLY appreciated. It's a simple system, but I'm pulling my hair out trying to match it.

    Thanks in advance.

  •  04-19-2008, 19:52 27000 in reply to 26997

    Re: Seykota Simple Exponential Crossover System.

    HKguy,

     

    Here's the ema formula which I believe was written by Roy Larsen:

    {Exponential Moving Average}
    N:=Input("Periods",1,99,10);
    R:=2/(N+1); {ratio of new data added each bar}
    X:=If(Cum(1)=1,C,PREV*(1-R)+C*R);
    ValueWhen(1,Cum(1)>=N,X);

     

    It plots exactly as the metastock formula. The last line limits the output until enough data is available for calculation. Results before this can be obtained by changing the last line to simply X but the output would not be correct.

    When using ema based formulas in the system tester make sure that you have more than enough data loaded in order to get accurate results. Since you are looking for 150 days try to use at least 1K bars of data.

     

    Hope this helps,

     

    Preston



    equismetastock@yahoogroups.com
View as RSS news feed in XML