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

[amibroker] Re: System development tutorial by Herman van den Bergen



PureBytes Links

Trading Reference Links

Again, thanks Graham,

I will scan around for some example AFL files and study some more how 
barssince works.

Regards,

Graeme Oswin

--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> Graeme
> By saying Barssince(condition) you are providing the number of bars 
since
> that condition occurred. A filter or buy statement requires true or 
false
> conditions, so the barssince must be made into a conditional 
statement
> making it a true or false answer. Thus use barssince(condition)<10 
would
> provide that true or false requirement
> This is the same as what you have within the barssince brackets, it 
must be
> a unique true/false statement or it would never know when to take 
the
> measurement of bars from.
> 
> 
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
> 
> -----Original Message-----
> From: graeme_oswin [mailto:goswin@x...] 
> Sent: Wednesday, May 12, 2004 8:27 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: AFL Logic Question
> 
> Graham,
> 
> Thank you.  So are you saying I could use eg:
> 
> Cond2=  BarsSince(Cross(C,MA(C,150))) < 10;
> 
> in the Buy or Filter condition statement?
> 
> I guess I just don't understand why (in my formula) Cond2 doesn't 
> hold the integer of bars since the cross condition for evaluation 
in 
> the buy or filter line.
> 
> Regards
> 
> Graeme Oswin
> --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> > This cond2 needs to have something to make it unique occurence
> > example
> > Cond2=  BarsSince(Cross(C,MA(C,150))) == 5;
> > 
> > Cheers,
> > Graham
> > http://e-wire.net.au/~eb_kavan/
> > 
> > -----Original Message-----
> > From: graeme_oswin [mailto:goswin@x...] 
> > Sent: Wednesday, May 12, 2004 8:05 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] AFL Logic Question
> > 
> > Fristly thank you to all those who have helped in my developing 
> > understanding of AFL programming.
> > 
> > Secondly what is wrong with the logic of the following code:
> > 
> > Cond1=MA(C,15)>MA(C,150);
> > Cond2=BarsSince(Cross(C,MA(C,150)));
> > Buy=Cond1 AND Cond2<10;
> > Filter=Cond1 AND Cond2<10;
> > AddColumn(Cond2,"Cond2",1.2);
> > 
> > Simply I am attempting to discover stocks that have recently (in 
> the 
> > last ten days) crossed above their 150 moving average and the 15 
> day 
> > moving average is currently above the 150 day moving average.
> > 
> > When I scan or filter I find some stocks that meet these criteria 
> > while others have been able their 150 MA for ages while reporting 
0 
> > for Cond2.
> > 
> > What have I missed in terms of the logic? 
> > 
> > Regards and sincere thanks,
> > 
> > Graeme Oswin
> > 
> > 
> > 
> > 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 
> > Yahoo! Groups Links
> 
> 
> 
> 
> 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 
> Yahoo! Groups Links



------------------------ 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
---------------------------------------------------------------------~->

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