This is read-only version of AFL library entry. Ability to add user formulas
and comment is only available from members-only area.
Details:
Formula name:
Compare Sectors against Tickers
Author/Uploader:
goldfreaz - goldfreaz [at] thelion.com
Date/Time added:
2002-05-09 13:44:50
Origin:
Keywords:
Level:
advanced
Flags:
exploration
DISCLAIMER: Most formulas present in AFL on-line library are submitted
by the users and are provided here on an "as is" and "as available" basis.
AmiBroker.com
makes no representations or warranties of any kind to the contents or the operation
of material presented here. We do not maintain nor provide technical support
for 3rd party formulas. Description:
Compares relative strength, StochRSI, relative volume, and RSI. Good stocks must be assigned to the right sectors...garbage in / garbage out. Scan the enclosed AFL then set up the indicators that follow.
/* Relaive Strength Indicator */
EnableScript("vbscript");
sid=SectorID(1);
<%
Select Case AFL.var("sid")
Case "Healthcare"
Afl.var("sector")="~drug"
Case "Financial"
Afl.var("sector")="~bank"
Case "Technology"
Afl.var("sector")="~techy"
Case "Basic Materials"
Afl.var("sector")="~raw"
Case else
Afl.var("sector")="~market"
end select
%>
/* Rate of Change */
xp=0.1*(4.0*(O+C)+H+L);
Chan=EMA(ROC(xp,1),2);
Schan=Foreign(sector,"C",1)/Foreign(sector,"V",1);
RS=EMA((Chan-Schan),19);
/* Sector RSI Indicator */
EnableScript("vbscript");
sid=SectorID(1);
<%
Select Case AFL.var("sid")
Case "Healthcare"
Afl.var("sector")="~drug"
Case "Financial"
Afl.var("sector")="~bank"
Case "Technology"
Afl.var("sector")="~techy"
Case "Basic Materials"
Afl.var("sector")="~raw"
Case else
Afl.var("sector")="~market"
end select
%>
/* Sector Relative Volume Indicator */
EnableScript("vbscript");
sid=SectorID(1);
<%
Select Case AFL.var("sid")
Case "Healthcare"
Afl.var("sector")="~drug"
Case "Financial"
Afl.var("sector")="~bank"
Case "Technology"
Afl.var("sector")="~techy"
Case "Basic Materials"
Afl.var("sector")="~raw"
Case else
Afl.var("sector")="~market"
end select
%>
/* Sector StochRSI Indicator */
EnableScript("vbscript");
sid=SectorID(1);
<%
Select Case AFL.var("sid")
Case "Healthcare"
Afl.var("sector")="~drug"
Case "Financial"
Afl.var("sector")="~bank"
Case "Technology"
Afl.var("sector")="~techy"
Case "Basic Materials"
Afl.var("sector")="~raw"
Case else
Afl.var("sector")="~market"
end select
%>