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

Re: [amibroker] Optimizing


  • Date: Wed, 6 Jan 2010 06:19:27 -0700
  • From: Howard B <howardbandy@xxxxxxxxx>
  • Subject: Re: [amibroker] Optimizing

PureBytes Links

Trading Reference Links



Hi Markus --

When the relationship between the two moving average lengths changes, the system changes from being a trend following system to being a mean reversion system.  It remains a "long" system when the signals generated are Buy = cross(MA1,MA2);  It becomes a "short" system when the signals generated are Short = cross(MA1,MA2);

Why exclude them?  You may very well find that the system works best as a mean reversion system.

But if you insist on limiting the variables, try this:

//////////////////////////////////

MA1Length = Optimize("MA1Length",50,50,200,1);
MA2Length = Optimize("MA2Length",100,100,300,1);

MA1 = MA(C,MA1Length);
MA2 = MA(C,MA2Length);

// Generate a Buy signal when MA1 crosses up through MA2,
// but only when the length of MA1 is less than the length of MA2
Buy = (MA1Length<MA2Length) AND Cross(MA1,MA2);
Sell = Cross(MA2,MA1);

///////////////////////////////////



Thanks,
Howard


On Wed, Jan 6, 2010 at 5:44 AM, Markus Witzler <funnybiz@xxxxxx> wrote:
 

Hello,
 
let´s say I intend to optimize a 2 MA crossover system with MA1 and MA2.
 
Possible range for MA1: 50-200
Possible range for MA2: 100-300
 
Now, there are some instances in which periodicity of MA1 is higher than the one of MA2, thereby creating a "short" system.
 
How does one exclude these "redundant" combinations from optimization?
 
Thanks
 
Markus



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___