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

[amibroker] [AFL help] exploration for relative strength.


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] [AFL help] exploration for relative strength.
  • From: kris45mar <kris45mar@xxxxxxxxx>
  • Date: Sat, 11 Dec 2004 19:45:50 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

PureBytes Links

Trading Reference Links

Greetings All..

I want to explore for stocks where the Relative
strength is currently greater than its own EMA for
more than the last 5 *sequential* periods.

So far I am using the following filter… Filter =
Sum(Cond1,10) > 5 ; as in…

BaseIndex = "XAO";

rs =RelStrength("BaseIndex");
MA_rs= EMA(rs,30);

Cond1 = rs > MA_rs;

Filter = Sum(Cond1,10) > 5 ;

AddColumn(RelStrength("BaseIndex"),"RS vs  XAO",1.2);
AddColumn(EMA(RelStrength("BaseIndex"),30),"EMA30 RS",
1.2);
AddColumn(Sum(Cond1,10),"days over",1.2);

Plot(rs,"RS",colorGreen,1);
Plot(EMA(rs,30),"ema RS",colorBlue,1);

PROBLEM: this gives me total no. of times Cond1 has
occurred within the last 10 periods, even if the
condition does not apply at the last bar, and only
*totals* the number of times this has occurred, and
they may or may not be sequential/continuous.

GOAL: I want to be able to explore for stocks where
the Relative Strength is *currently* greater than its
own EMA for more than say 5 continuous/sequential
periods, and then rank them according to those that
outperformed for the longest.

I NEED: AFL code for a filter that returns shares
where the cond1 has been true for > 5 sequential
periods and is still true at the moment.

What functions in AFL code can I use here?

TIA

ChrisB






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/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/