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

Re: Stock specific scan



PureBytes Links

Trading Reference Links

Hi Schildroth,
If ticker name is IBM, the function 
f1=relstrength("IBM");
gives an array equal to 1000.
So, the
filter=ma(f1,50)==1000;
will work only for IBM.
(Do not use f1==1000, because if some day IBM and XXX have
the same close price, you will get unwanted signals)
In columns you may have the results of whatever is defined before.
Example:


/*AFL CODE*/
f1=relstrength("IBM");
D1=STOCHD(14);
filter=ma(f1,50)==1000;
NUMCOLUMNS=3;
COLUMN0=C;
COLUMN1=V;
COLUMN2=D1;

Selecting Apply to "all stocks" and Range From 14/6 to 15/6 
hit EXPLORE and you will have

IBM...14/6/2001...115,75...7502500...20,34
IBM...15/6/2001...113,60...12470100...19,22

Does it help ?

Dimitris Tsokakis
--- In amibroker@xxxx, schildroth@xxxx wrote:
> Is there a way to filter the stock ticker within AFL?
> 
> I am trying to write one daily scan routine that incorporates all 
my 
> different scans. Since some of the scans look at all the stocks in 
> my database I don't want to filter any out using the "Apply to" 
> selection.
> 
> However, several of the scans only look at the S&P500 or NDX. Is 
> there a way to check the ticker name within AFL? It seems like name
> () should do the trick, but I only get errors. Here's what I'm 
> using: rightstock=name()==SP-500;
> 
> Thanks in advance,
> 
> Schildroth