PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> Bob,
> The
> Buy = IIf(Cum(1)%20,0,1);
> Buy = IIf(Cum(1)%30,0,1);
> will produce Buy signals every 30 bars.
> Try the
> Buy=IIf(Cum(1)%20,0,1);
> Buy=IIf(Cum(1)%30,0,1);
> Filter=Buy;
> AddColumn(Cum(1),"");
> DT
>
> > -----Original Message-----
> > From: Bob Jagow [mailto:bjagow@x...]
> > Sent: Monday, May 05, 2003 5:55 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: RE: [amibroker] Re: Syntax Question
> >
> >
> > Looks like only the last assignment counts, Dimitris.
> > Try
> > ----
> > Buy = IIf(Cum(1)%20,0,1);
> > Buy = IIf(Cum(1)%42,0,1);
> > ----
> > On the other hand, there's always the chance that
> > ----
> > Buy = IIf(Cum(1)%20,0,1);
> > Do_it_now_Dammit;
> > Buy = IIf(Cum(1)%42,0,1);
> > ----
> > could trigger buys every 20 days as well as every 42 days.
> >
> > Regards,
> > Bob
> >
> >
> > -----Original Message-----
> > From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> > Sent: Monday, May 05, 2003 10:18 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Syntax Question
> >
> >
> >
> > > -----Original Message-----
> > > From: Sam Levy [mailto:slevy1220@x...]
> > > Sent: Monday, May 05, 2003 8:48 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Syntax Question
> > >
> > >
> > > Is the following correct?:
> > >
> > > If I want a buy signal if both of two conditions are true, I
> would
> > > code:
> > >
> > > buy=cond1 and cond2;
> > >
> > > If I want a buy signal if either is true, I would code:
> > >
> > > buy=cond1 or cond2;
> > >
> > > What is the difference between those and:
> > >
> > > buy=cond1;
> > > buy=cond2;
> >
> > The main difference is that
> > buy=cond1 or cond2;
> > is one-line code and
> > buy=cond1;
> > buy=cond2;
> > is two-line code.
> > AFL is executed line by line.
> > So, in the second case you ask
> >
> > buy=cond1;// buy when cond1 is true
> > buy=cond2;// buy when cond2 is true
> > AFL will go to the next statement with the last info :
buy=cond2;
> > Sometimes, this property is useful :
> >
> > D=5;
> > M=MA(H,D);
> > PLOT(M,"",1,1);
> > D=10;
> > M=MA(H,D);
> > PLOT(M,"",2,1);
> > D=15;
> > M=MA(H,D);
> > PLOT(M,"",3,1);
> > will plot 3 different MAs, although only one is defined, namely
M.
> > On the other side the
> >
> > D=5;
> > M=MA(H,D);
> > D=10;
> > M=MA(H,D);
> > D=15;
> > M=MA(H,D);
> > PLOT(M,"",1,1);
> > PLOT(M,"",2,1);
> > PLOT(M,"",3,1);
> > will plot 3 MAs identical to MA(H,15)
> > Dimitris Tsokakis
> >
> >
> >
> >
> >
> >
> > > I would be grateful if someone would set me straight on this.
> > >
> > >
> > > Yahoo! Groups Sponsor
> > >
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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.
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/
|