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

[amibroker] Re: Data mining automation question



PureBytes Links

Trading Reference Links

Hi Mike,

That's exactly what I was looking for:) Works perfectly.

Thanks.

Angus

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> Hi,
> 
> I suspect that what you are looking for is to use the array S1 when SetupIdentifier is 1, S2 when SetupIdentifier is 2, etc.
> 
> If so, you can use dynamic variables instead of nested IIF.
> 
> e.g.
> SetupIdentifier = Optimize("Setup",1,1,4,1);
> Setuptype = VarGet("S" + SetupIdentifier);
> 
> Buy = Newday AND Setuptype;
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "gucytribe" <angus@> wrote:
> >
> > 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/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/