[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimization Assistance Needed



PureBytes Links

Trading Reference Links

Hello Tim,
 If you have developed a system to generate buy and sell signals, and if you
are using
this AMA in your system.....you can change the line :

              "Periods := Input("Time Periods",1,1000, 10);"

to:

              "Periods := opt1;"

then set your opt 1 parameters to something like:

             min=3
             max=100
             step=1

Hope this helps,
 Best wishes,
               Adam Hefner.
 e-mail:  VonHef@xxxxxxxxxx

_____________________
-----Original Message-----
From: Tim Gadd <timgadd@xxxxxxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Wednesday, December 16, 1998 4:18 PM
Subject: Optimization Assistance Needed


>I've just started using MetaStock as an "upgrade" (I think) from Window
>on Wall Street and need some help with the optimization function in the
>system tester. I hope this doesn't seem like a "lazy" question, because
>I have looked for the answer in the manual and have tried various
>methods to no avail.
>
>I'm trying to optimize a variable in a custom indicator - Perry
>Kaufman's Adaptive Moving Average. I would like to test for the optimal
>lookback period ("Periods"). I have pasted the formula for the AMA
>below. Any assistance is much appreciated.
>
>Periods := Input("Time Periods",1,1000, 10);
>
>Direction := CLOSE - Ref(CLOSE,-periods);
>
>Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods);
>
>ER := Abs(Direction/Volatility);
>
>FastSC := 2/(2 + 1);
>
>SlowSC := 2/(30 + 1);
>
>SSC := ER * (FastSC - SlowSC) + SlowSC;
>
>Constant := Pwr(SSC,2);
>
>AMA := If(Cum(1) = periods +1, Ref(CLOSE,-1) + constant * (CLOSE -
>Ref(CLOSE,-1)),PREV + constant * (CLOSE - PREV));
>
>AMA
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com