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

Re: [amibroker] NUMBER OF SYMBOLS IN WATCHLIST



PureBytes Links

Trading Reference Links




Ron,
 
I am using beta version 4.39.....copy and paste 
formula to AA window...select current stock ....n last quotations and 
n=1...then...you can modify the ** Text *** variable below to reflect the names 
and numbers of your specific watchlists.....( this is for the header output on 
the column).....then enter a watchlist number....and click explore....the total 
of tickers in your watchlist will be displayed....
 

//Count tickers in watchlist function
//Anthony Faragasso
//July 4, 2003
WatchlistNumber0<FONT 
face="Courier New" size=2>=<FONT color=#ff00ff 
size=2>0;<FONT 
color=#ff0000 size=2>//enter watchlist number<FONT 
face="Courier New" size=2>
WatchlistNumber1<FONT 
face="Courier New" size=2>=<FONT color=#ff00ff 
size=2>1;<FONT 
face="Courier New" size=2>
WatchlistNumber2<FONT 
face="Courier New" size=2>=<FONT color=#ff00ff 
size=2>2;<FONT 
face="Courier New" size=2>
WatchlistNumber3<FONT 
face="Courier New" size=2>=<FONT color=#ff00ff 
size=2>3;<FONT 
face="Courier New" size=2>
function 
CountTickersInWatchList( Listnum )
{
// retrive comma-separated list of symbols in watch 
list
list = <FONT face="Courier New" color=#0000ff 
size=2>GetCategorySymbols<FONT face="Courier New" 
size=2>( categoryWatchlist, listnum );
 
for( i = 
<FONT face="Courier New" color=#ff00ff 
size=2>0; ( sym = <FONT 
face="Courier New" color=#0000ff size=2>StrExtract<FONT 
face="Courier New" size=2>( list, i ) ) != <FONT 
face="Courier New" color=#ff00ff size=2>""<FONT face="Courier New" 
size=2>; i++ )
{
if( i == 
0<FONT 
face="Courier New" size=2> ) i = <FONT 
face="Courier New" color=#ff00ff size=2>0<FONT face="Courier New" 
size=2>;<FONT face="Courier New" color=#800000 
size=2>
else i = i 
;
}
return i; 

}
//Sample header output for watchlist number<FONT 
face="Courier New" size=2>
text0<FONT 
face="Courier New" size=2>=WriteIf<FONT 
face="Courier New" size=2>(watchlistnumber0<FONT 
face="Courier New" size=2>==<FONT face="Courier New" 
color=#ff00ff size=2>0<FONT face="Courier New" 
size=2>,<FONT face="Courier New" color=#ff00ff 
size=2>"NDX"<FONT face="Courier New" 
size=2>,""<FONT 
size=2>);
text1=<FONT color=#0000ff 
size=2>WriteIf<FONT face="Courier New" 
size=2>(watchlistnumber1<FONT face="Courier New" 
size=2>==<FONT face="Courier New" color=#ff00ff 
size=2>1,<FONT 
face="Courier New" color=#ff00ff size=2>"DJI"<FONT face="Courier New" 
size=2>,""<FONT 
size=2>);
text2=<FONT color=#0000ff 
size=2>WriteIf<FONT face="Courier New" 
size=2>(watchlistnumber2<FONT face="Courier New" 
size=2>==<FONT face="Courier New" color=#ff00ff 
size=2>2,<FONT 
face="Courier New" color=#ff00ff size=2>"DJT"<FONT face="Courier New" 
size=2>,""<FONT 
size=2>);
text3=<FONT color=#0000ff 
size=2>WriteIf<FONT face="Courier New" 
size=2>(watchlistnumber3<FONT face="Courier New" 
size=2>==<FONT face="Courier New" color=#ff00ff 
size=2>3,<FONT 
face="Courier New" color=#ff00ff size=2>"DJU"<FONT face="Courier New" 
size=2>,<FONT face="Courier New" color=#ff00ff 
size=2>"")<FONT 
size=2>;
Filter=<FONT face="Courier New" color=#ff00ff 
size=2>1<FONT face="Courier New" 
size=2>;<FONT face="Courier New" color=#0000ff 
size=2>
AddColumn<FONT face="Courier New" 
size=2>(CountTickersInWatchList( WatchlistNumber<FONT 
size=2>0),<FONT 
size=2>text0,<FONT 
face="Courier New" color=#ff00ff size=2>1<FONT face="Courier New" 
size=2>);<FONT face="Courier New" color=#0000ff 
size=2>
AddColumn<FONT face="Courier New" 
size=2>(CountTickersInWatchList( WatchlistNumber<FONT 
size=2>1),text<FONT 
size=2>1,<FONT 
face="Courier New" color=#ff00ff size=2>1<FONT face="Courier New" 
size=2>);<FONT face="Courier New" color=#0000ff 
size=2>
AddColumn<FONT face="Courier New" 
size=2>(CountTickersInWatchList( WatchlistNumber<FONT 
size=2>2),text<FONT 
size=2>2,<FONT 
face="Courier New" color=#ff00ff size=2>1<FONT face="Courier New" 
size=2>);<FONT face="Courier New" color=#0000ff 
size=2>
AddColumn<FONT face="Courier New" 
size=2>(CountTickersInWatchList( WatchlistNumber<FONT 
size=2>3),text<FONT 
size=2>3,<FONT 
face="Courier New" color=#ff00ff size=2>1<FONT face="Courier New" 
size=2>);
 
Anthony
 <FONT 
face=Arial>
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  mrdavis9 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibrokeryahoogroups 
  Sent: Friday, July 04, 2003 2:58 PM
  Subject: [amibroker] NUMBER OF SYMBOLS IN 
  WATCHLIST
  
  How can I  find  the number 
  of symbols  in a watch list?  Thanks in advance.  Ron 
  D
  Send BUG REPORTS to <A 
  href="">bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  <A 
  href="">suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: <A 
  href="">amiquote@xxxxxxxxxxxxxxx (Web 
  page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.495 
  / Virus Database: 294 - Release Date: 
6/30/2003






Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.