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

[amibroker] Re: exploration help



PureBytes Links

Trading Reference Links


--- In amibroker@xxxxxxxxxxxxxxx, "iascool" <sai20_2000@xxxx> wrote:
> 
> Thanks Dimitris,
> I was trying to cut short the length of array for the closes.I 
have 
> modified it accordingly and results r satisfactory.Can u pls 
advise 
> to end this code how should I write sell if I want to close  "n" 
> days after buy 
> 
> SetBarsRequired(-5,0);
> a=Ref(C,-1)< Ref(C,-2)AND
> Ref(C,-2)< Ref(C,-3) AND
> Ref(C,-3)< Ref(C,-4) ;
> Ref(L,-1)>Ref(L,-2) AND Ref(H,-1)<Ref(H,-2) OR
>  H> Ref(H,-2) AND L<Ref(L,-1);//this preceding bar is insideday()
bar 
> OR breakout bar is ouside() to Inside bar
> d=C>Ref(H,-2) ;//signifies a breakout
>  Filter=1;
>  AddColumn(IIf( IsTrue(a AND  d),1,0),"bullish",1);
> SetTradeDelays(1,1,1,1);
> Buy=IIf(a  AND d, 1,0);
> Sell="?"( for eg sell on 3rd days close)
> 
> Regards
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> <TSOKAKIS@xxxx> wrote:
> > 
> > a=Ref(C,-1)< Ref(C,-2);
> >  b=MA(a,3);
> > 
> > a is a binary condition, it will be equal to 1 or 0.
> > b is the 3-day MA of a and it will be equal to 1 or 0.666 or 
> 0.3333 
> > or 0.
> > It will NEVER be equal to 4, it is impossible.
> > The value of your b in
> > b=MA(a,3)==4;
> > will be equal to 0, because the MA(a,3)==4 is ALWAYS false.
> > Dimitris
> > --- In amibroker@xxxxxxxxxxxxxxx, "iascool" <sai20_2000@xxxx> 
> wrote:
> > > 
> > > I want to find the the following
> > > 1)3 consecutive lower  closes
> > > 2)yesterdays close to be inside bar(4rth bar)
> > > 3)todays breakout bar is ouside bar to lastbar and its high is 
> > > greater than previous 2 bars high .(5 th bar)
> > > 
> > > 
> > > 
> > > SetBarsRequired(-5,0);
> > > a=Ref(C,-1)< Ref(C,-2);
> > > b=MA(a,3)==4;// signifies yday C< day before ydays close and 
so 
> on 
> > > till last 4 closes
> > > Ref(L,-1)>Ref(L,-2) AND Ref(H,-1)<Ref(H,-2) OR
> > > H> Ref(H,-2) AND L<Ref(L,-1);//this preceding bar is insideday
() 
> > bar 
> > > or    breakout bar is ouside() to inside bar
> > > d=H>Ref(H,-1) AND Ref(H,-2);//sinifies a breakout
> > > Filter=1;
> > > AddColumn(IIf( IsTrue(a AND b AND d),1,0),"bullish",1);
> > > 
> > > However the exploration runs, it do not shows the results as 
> seen 
> > in 
> > > charts.Can any one help me to correct this exploration, please.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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