Hi Mr. Murthymsr,
I have been following ur very enlightening posts in this forum with great admiration. I am taking my first tentative steps with AFL and wud appreciate if u cud answer/ throw some light on the following with regards to the AFL code that has been posted in this thread:
1. In the AllMySymbolsAfl.txt posted by u to retrieve all the symbols in the database, u have used the following code:
"Buy = Close > myclose AND Volume > myvolume AND Close * Volume / 100000 > mylakhs;"
I believe that we need to filter out quotations with 0 volume (in case of some indices in the symbol list), so the volume test condition is understandable. Why are we testing for "Close > 0" and the 3rd condition above.
2. If we really wanted ALL the symbols then wud the following code be valid?:
.....
Buy = 1; //includes all quotes
//no need for Sellsignal
Buy = ExRem(Buy,0);
Thanks in advance for your feedback
With regards
thanks paul for your interest in this thread and the good words.
/* AllMyStocks.AFL : To get All stocks in the database for assigning sectors and Industries
written by murthymsr
*/
// inputs
myvolume = 0;
myclose = 0;
myLakhs = 0;
// list stocks symbols meeting the inputted criteria
// Buy = Volume > myvolume;
Buy = Close > myclose AND Volume > myvolume AND Close * Volume / 100000 > mylakhs;
Sell=0;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
the AFL referred is reproduced above.
this is a type of standard format of stock selection template i would prefer to have.
with this you may select stocks meeting different set of filter conditions.
however, as you want ALL the stocks, at this time, with
myvolume=0;
myclose=0;
myLakhs=0;
Buy = Close > myclose AND Volume > myvolume AND Close * Volume / 100000 > mylakhs;
is the same as :
Buy = close>0 AND Volume>0 AND close*volume>0;
and
buy=volume>0;
which is what you wanted to say.
if you wanted to use the AFL for generating the list of ALL traded symbols, and for NOTHING else,
buy=volume>0;
is more than adequate, as you rightly pointed out.
further, you may assign different vaslues to myclose,myvolume & mylakhs to get a reduced set of stocks meeting the specified criteria.
such template will have many applications
you may also read my post at:
http://www.traderji.com/66542-post419.html
to get the template in a different way. i too, like you all studying and improvising my knowledge as time passes by and sharing my observations in this forum.
thanks again for the interest.
murthymsr