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

[amibroker] InWatchList and ATC question/problem



PureBytes Links

Trading Reference Links

Hi All,
I've posted something similar to this before and received some 
ideas, thanks for those responses.  I am by no stretch of the 
imagination a programmer, but I am trying to learn.

I calculate several formula for ATC against indices maintained in 
Watch Lists.  As an Example: if I use this formula (separate formula 
for each index):
YestClose = Ref( Close, -1 );
Advanced = Close > YestClose;
Declined = Close < YestClose;

AddToComposite( Advanced, "~Adv "+"MID--X" ,"X" );
AddToComposite( Declined, "~Dec "+ "MID--X" ,"X");

and run it against a watch list containing S&P midcap components 
watch list number 11 - Today's result is 109.

If however I run this against all stocks in the system:
if (InWatchList(07)) sym="DJ-15"; 
if (InWatchList(08)) sym="DJ-20"; 
if (InWatchList(09)) sym="DJ-30"; 
if (InWatchList(10)) sym="SP-500"; 
if (InWatchList(11)) sym="MID--X"; 
if (InWatchList(12)) sym="SML--X"; 
if (InWatchList(13)) sym="RUI-X"; 
if (InWatchList(14)) sym="RUT-X"; 
if (InWatchList(15)) sym="NDX--X"; 

AddToComposite( Advanced, "~Adv "+sym,"X" );
AddToComposite( Declined, "~Dec "+sym,"X");
The result value for today on watchlist 11 MID--X is 1661.

watch list 11 & 12 give differing results.  Watch list 07 thru 09 
return no results at all. The remaining results are identical. What 
is going on? What am I missing?

Any help will be greatly appreciated. 
And a Big Thanks in advance.

Bill




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006