PureBytes Links
Trading Reference Links
|
Jayson,
Thanks for the info. Appreciated all the helps from the list.
Thomas
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Actually flip holds cond1 true until condition2 triggers. So you
could
> try.....
>
> x=flip(cond1,cond2);
> buy=ref(x,-1)==1 and x==0;
>
> Jayson
> -----Original Message-----
> From: tchan95014 <tchan95014@xxxx> [mailto:tchan95014@x...]
> Sent: Wednesday, February 19, 2003 6:34 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Need coding help
>
>
> Steve,
>
> Thanks for offering help, but flip() needs 2 arrays, so cond1
against
> cond2?
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Steve Davis" <sdavis@xxxx> wrote:
> > Use the Flip() function to keep cond1 enabled.
> >
> > -----Original Message-----
> > From: tchan95014 <tchan95014@xxxx> [mailto:tchan95014@x...]
> > Sent: Wednesday, February 19, 2003 6:16 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Need coding help
> >
> >
> > Hello,
> >
> > I am trying to code the following conditions into AFL, but
> > have difficulties doing it,
> > please advise. Thanks.
> >
> > cond1 = xxx; // a condition can come and go.
> > cond2 = yyy;
> > buy = cond1 AND cond2;
> >
> > What I want is when cond1 triggers, I want to disregard its
> > status and track only cond2.
> >
> > For example,
> >
> > SetTradeDelays(0, 0, 0, 0);
> > cond1 = ref(cmo() > 80, -1);
> > cond2 = h > ref(h, -1);
> > buy = cond1 and cond2;
> >
> > when cond1 is triggered, I want to buy this stock only when
> > cond2 becomes true, which might take
> > a couple of days (Of course they can come at the same day).
> > During these confirming days the cmo()
> > might come down to less than 80, but I do not care, as long
> > as cond1 has been triggered I want cond2
> > to take over and disregard cond1 all together.
> >
> >
> > Thanks for any ideas.
> >
> >
> > Thomas
> >
> >
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> >
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|