PureBytes Links
Trading Reference Links
|
<SPAN
class=303151005-20022003>Actually flip holds cond1 true until condition2
triggers. So you could try.....
<SPAN
class=303151005-20022003>
<SPAN
class=303151005-20022003>x=flip(cond1,cond2);
<SPAN
class=303151005-20022003>buy=ref(x,-1)==1 and x==0;
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: tchan95014
<tchan95014@xxxxxxxxx> [mailto:tchan95014@xxxxxxxxx]Sent:
Wednesday, February 19, 2003 6:34 PMTo:
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: Need coding
helpSteve,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@xxxx]> 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: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)>
> Check group FAQ at:> <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html>
> Your use of Yahoo! Groups is subject to <A
href="">http://docs.yahoo.com/info/terms/Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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.
|