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

Re: [amibroker] Data mining automation question



PureBytes Links

Trading Reference Links



Then, from what you wrote I think you want a BUY when Newday occurs and setuptype is either a 1, 2,3 OR 4). 
Or the fact that SetupType is NOT zero.  
 
would this work? =
Buy = Newday AND Setuptype != 0;
Sell = Close;

 
Joe
 
----- Original Message -----
From: gucytribe
Sent: Wednesday, April 08, 2009 7:54 AM
Subject: [amibroker] Data mining automation question

Hi,

I want to isolate specific price conditions and then use the optimizer to generate the results in order to automate data mining somewhat.

E.g.:

Newday = DateNum() != Ref(DateNum(),-1);
S1 = Ref(O,-1) > Ref(C,-1);
S2 = Ref(C,-1) > Ref(C,-2);
S3 = Ref(O,-1) > Ref(O,-2);
S4 = Ref(H,-1) > Ref(H,-2);

Setuptype = IIf(S1,1,IIf(S2,2,IIf(S3,3,IIf(S4,4,0))));
SetupIdentifier = Optimize("Setup",1,1,4,1);

Buy = Newday AND Setuptype == SetupIdentifier;
Sell = Close;

This works fine as long as S1, S2, S3 or S4 never occur at the same time (which in the above case they do). When they occur at the same time the Iif statement exits on the first occurrence resulting in a lot of occurrences of S2, S3, etc. not being included in the backtest.

Can anyone suggest another way to do this?

Many thanks.

Angus



__._,_.___


**** 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

__,_._,___