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

RE: [amibroker] how to optimize



PureBytes Links

Trading Reference Links

Robert,

 

Here’s your code with the syntax corrected:

 

a = RelStrength("^ixic"); // today’s relative strength

x = MA(a,5); //  moving average of relative strength last 5 days

aa = Ref(a,-5); // relative strength 5 bars back

y = MA(aa,5); // moving average of relative strength starting 5 days ago.

 

Buy = Cross(x,y);

Sell = 0;

 

 

You do not have any variables to optimize.  As a suggestion, you could substitute the moving average period and bars back with optimizing variables:

 

myPeriod = Optimize("MA Periods",5, 2, 50, 1);

myLookBack = Optimize("RSI bars back",5, 2, 50, 1);

 

a = RelStrength("^ixic"); // todays relative strength

x = MA(a,myPeriod); //  moving average of relative strength last myPeriod days

aa = Ref(a,-myLookBack); // relative strength myLookBack # of bars back

y = MA(aa,myPeriod); // moving average of relative strength starting myPeriod days ago.

 

Buy = Cross(x,y);

Sell = 0;

 

Regards,

 

David


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Robert
Sent: 03/22/2007 9:47 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] how to optimize

 

I have had a go at trying to optimize the following but I just can't
seem to get it to work any suggestion would be appreciated.

a = relativestrength(^ixic)- todays relative strength
x = ma(a,5); - moving average of relative strength last 5 days
aa = (a,-5); - relative strength 5 bars back
y = ma(aa,5); - moving average of relative strength starting 5 days
ago.

would like to optimize cross(x,y);

for a period default 10 min 5 max 20 but it seems every time I try to
get it to work I get error on error.

tia

Robert

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___